print job gets different job number ?
Posted: Mon May 23, 2011 4:20 am
Hi,
i have a CL job that copies an SCS print file of in invoice (created in the job) to a physical file with CPYSPLF using the CTLCHAR(*FCFC) option.
I then use OVRPRTF to override QSYSPRT using the DEVTYPE(*AFPDS) & FRONTOVL options.
I then use CPYF to copy the physical file to QSYSPRT.
This gives me an AFP invoice with the required overlay which is then converted to PDF format.
This CL program works 100% from the command line or in batch & has been working correctly for some time. When run that way, both the original SCS print file & the finished AFP file have the same job name/number/user.
When run via Profound UI however, the SCS file gets created with the correct job name/number/user but the AFP file gets created by job QPRTJOB with a different job number ? I have no idea how they get different job numbers when they are created by the same CL. This doesn't happen when run outside Profound UI.
The different job name/number means that the next section of code can't find the required spool file & therefore fails.
Any ideas how this can be overcome ?
Thanks
Tony C
i have a CL job that copies an SCS print file of in invoice (created in the job) to a physical file with CPYSPLF using the CTLCHAR(*FCFC) option.
I then use OVRPRTF to override QSYSPRT using the DEVTYPE(*AFPDS) & FRONTOVL options.
I then use CPYF to copy the physical file to QSYSPRT.
This gives me an AFP invoice with the required overlay which is then converted to PDF format.
This CL program works 100% from the command line or in batch & has been working correctly for some time. When run that way, both the original SCS print file & the finished AFP file have the same job name/number/user.
When run via Profound UI however, the SCS file gets created with the correct job name/number/user but the AFP file gets created by job QPRTJOB with a different job number ? I have no idea how they get different job numbers when they are created by the same CL. This doesn't happen when run outside Profound UI.
The different job name/number means that the next section of code can't find the required spool file & therefore fails.
Any ideas how this can be overcome ?
Thanks
Tony C