Output file

15 pts.
Tags:
RPG ILE
I have an logical file,3 physical files and i need to create an output file which will extract all the data present in the files how can i do that using RPG.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    We need more specifications What do the input files look like? What should the output file look like? How would the data be collated? Phil
    50,595 pointsBadges:
    report
  • TomLiotta
    I have an logical file,3 physical files... Does that mean you have four files? Or does it mean that you have a logical file that is built over three physical files? how can i do that using RPG. I don't seem to understand the question. The answer is to read records from each input file and write every one of those to the output file. But that is so obvious that it doesn't seem like it makes sense. Please describe the circumstances more fully. Tom
    125,585 pointsBadges:
    report
  • Shpin
    logical file is not dependent on those physical file In logical file i have some 30 columns but i need only 8 of them and all the columns from physical files should be extracted here is the sample dow the indicator is off read logical file if indicator is off den i wll be moving the fields similarly, i will be reading the physical files and writing dem in output file but i don't where i went wrong not getting the output.
    15 pointsBadges:
    report
  • philpl1jb
    We don't know .. Not getting the output! Do you have an output command after the Move of fileds WRITE to an open file or EXCEPT to an open spool file. .. Not getting the output! Because the spool file isn't being sent to a printer? or because you haven't looked in the output file? Phil
    50,595 pointsBadges:
    report
  • TomLiotta
    You description of the logic seems okay. But we can't tell what is wrong without seeing the program code, and we might need a little more explanation of what happens beyond "...not getting the output." Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    As Tom said, it's hard to tell without seeing your code and we can not tell if there are records in the files. If you are using the same indicator for all loops you're logic will never enter the second, third or fourth files. I would always perfer to write a read loop like this Read file1 Dow not %EOF(file1) <-- if this is RPG as opposed to RPG IV then an indicator is needed move stuff write RecOut Read file1 Enddo Phil
    50,595 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following