Copy a spool file

55 pts.
Tags:
Application development
I have a job that generates print files through out the day. The job name, user name and user area are always the same. The job number changes each day. I need to copy the spool file to a physical file so I can pass it to a label printing program, this has to happen all day long. I do not have access to the CL driver program so I can't inbed a WRKJOBA to get the job number. I have tried t do a CPYSPLF externaly but since I can't get the job number i get a duplicate job exists. any ideas ?

Answer Wiki

Thanks. We'll let you know when a new response is added.

this is easily solved by creating a user space and filling using the QUSLSPL or QGYOLSPL API. Then you will be able to read back the list, one item at a time, and do whatever is necessary. I do this to evaluate and delete user spool files all of the time. Works great!! See the Spool file API’s in Information Center.

Discuss This Question: 4  Replies

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • DaddyCOZ
    this is easily solved by creating a user space and filling using the QUSLSPL or QGYOLSPL API. Then you will be able to read back the list, one item at a time, and do whatever is necessary. I do this to evaluate and delete user spool files all of the time. Works great!! See the Spool file API's in Information Center.
    0 pointsBadges:
    report
  • PJNilan
    You could attach a data queue to the output queue the spool file is written to and have a batch job process the entries as they are created. This only works if the spooled file is in RDY status, if it's held no entry is sent to the data queue. Check the "Printing" manuals in the infocenter for more information.
    0 pointsBadges:
    report
  • KevinBattreall
    Jim Sloan has a set of utilites you can purchase. I believe the utilities are less then $5,000 depending on your processor group. On of the utilities (CVTOUTQ) will create a physical file with a record for each spool file in the output queue. You could read the outfile from CVTOUTQ to find the spool file you need.
    0 pointsBadges:
    report
  • KevinBattreall
    Jim Sloan has a set of tools (http://www.taatool.com/) that are fairly inexpensive depending on your processor group. One of the tools (CVTOUTQ) creates a file containing a record for each spool file in an output queue. You can read the file to find your spool file.
    0 pointsBadges:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following