Display output of RPG program in physical file

10 pts.
Tags:
Physical File
RPG
I want to display output of my RPG program in a new physical file. How can I do that?

Answer Wiki

Thanks. We'll let you know when a new response is added.
If you are referring to printed output, create a flat file with a length equal to your spool file definition. Then when you job is done you can use CPYSPLF and copy it to the flat file   ex.  CPYSPLF    FILE(QSYSPRT) TOFILE(QTEMP/WORK132).  If you want to do it the had way, eliminate the spool from your program and replace it with the flat file. Then you need to define each printed line as a data structure, then move that to the filed name in your flat file.
Or just override the spooled file directly to the flat file.

Discuss This Question:  

 
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.

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.

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

Following

Share this item with your network: