Suppose you want to write an RPG program which will create print files with varying spool file names. Normally, the spool file name which is created is the same as the file name in the RPG program. You can give the spooled file any name you wish by specifying the spooled file name in the SPLFNAME parameter of the Override Print File (OVRPRTF) command. If you want to do it all in RPG, code UC in columns 71-72 of the F-spec for the printer file. Then run the OVRPRTF command using QCMDEXC before you open the printer file manually in the RPG program.
... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 .
FQPRINT O F 132 OF PRINTER UC
I 'OVRPRTF QPRINT - C CMD
I 'SPLFNAME(INVOICE)'
C CALL 'QCMDEXC'
C PARM CMD COMAND 50
C PARM 32 LENGTH 155
C OPEN QPRINT
... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 .
Thursday, February 7, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment