I have been tasked with creating a process of duplicating spool files from one outq to another. There are 2 scenarios that I need to deal with.
An on Demand process that creates a spool file of a bill. This process I put code in the CL to CPYSPFL to a flat file then overide the print file then copy the flat file back to the outq that I need it top be in for feeding another system.
CPYSPLF FILE(qsysprt) TOFILE(tstbsydtaa/BILLDET) +
SPLNBR(*LAST) CTLCHAR(*FCFC)
OVRPRTF FILE(laserarc) CTLCHAR(*FCFC)
CPYF FROMFILE(TSTBSYDTAA/BILLDET) TOFILE(laserarc)
This works perfectly.
The second procecess is a bit more complicated. The batch process potentially creates multiple types of spools files. My dilema is determining spool file(s) that I need and selecting them. In the on demand process it is easy because I can use *LAST. Here I need to be more specific.
File User User Data Sts Pages
BPBC92T1 BSYPGMR BPBC92 HLD 2
QSYSPRT BSYPGMR BPBC51 HLD 4
These are the 2 spools that I need to copy. They may or may not bothe be created in the job.
Any thoughts?
Thanks.
An on Demand process that creates a spool file of a bill. This process I put code in the CL to CPYSPFL to a flat file then overide the print file then copy the flat file back to the outq that I need it top be in for feeding another system.
CPYSPLF FILE(qsysprt) TOFILE(tstbsydtaa/BILLDET) +
SPLNBR(*LAST) CTLCHAR(*FCFC)
OVRPRTF FILE(laserarc) CTLCHAR(*FCFC)
CPYF FROMFILE(TSTBSYDTAA/BILLDET) TOFILE(laserarc)
This works perfectly.
The second procecess is a bit more complicated. The batch process potentially creates multiple types of spools files. My dilema is determining spool file(s) that I need and selecting them. In the on demand process it is easy because I can use *LAST. Here I need to be more specific.
File User User Data Sts Pages
BPBC92T1 BSYPGMR BPBC92 HLD 2
QSYSPRT BSYPGMR BPBC51 HLD 4
These are the 2 spools that I need to copy. They may or may not bothe be created in the job.
Any thoughts?
Thanks.



Comment