510 pts.
 Printer file in AS/400 subfile
[strong]Hi, I need to generate a separate spool file,I have 10 records displayed in subfile,if i enter option 6 in subfile,for five records,these five records should generate a separate spool file... each record separate spool file[/strong]

Software/Hardware used:
AS400
ASKED: April 6, 2011  7:24 AM
UPDATED: April 7, 2011  12:32 AM

Answer Wiki:
If I am understanding correctly, you want to select multiple records in a subfile, and print a report (spoolfile) for each record. you can do this by specifying the USROPN keyword on the spool files F-spec, and then in your program, after EXFMT of the subfile, do a READC loop to find the records with the option 6. for each record found with option 6, OPEN the spool file, do any necessary processing to generate the spoolfile, and then CLOSE the spool file.
Last Wiki Answer Submitted:  April 6, 2011  1:48 pm  by  BigKat   7,185 pts.
All Answer Wiki Contributors:  BigKat   7,185 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

BigCat – He has it right on the money.

In more detail:
Loop for testing subfile options
.
> OPEN Spool file
> .
> calculations for printing the spool file
> .
> CLOSE Spool file
.
End Loop

Simple as that.

Enjoy,
MIS

 940 pts.