How do I automate the CPYSPLF Command? We have an end of day process which creates the same spoolfile output each day. The details are always the same except for the Job Number.
As we copy these spoolfiles to individual files, I would like to automate the process.
This has always been difficult to do since IBM has never given us *OUTFILE support for the WRKOUTQ and WRKSPLF commands. However, IBM has create an API called:
QUSLSPL - List Spooled Files
This API collects information about spool files and stores it in a user space for processing.
For some more information and some good coding examples take a look at the IBM Manual. When you are in the book, do a search on QUSLSPL.
Personally, I use a product called AATOOL to gather up information on spool files on my system. One of the commands this product contains is a CVTOUTQ command that places information about all the spool files on an output queue in a database file, which can then be easily processed by a simple CLP. You may want to take a look at this product before you spend too much of your valuable time reinventing a process to work with spool files.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Dig Deeper on iSeries system performance and monitoring
Related Q&A from Ken Graap
Find out if log files can be omitted during a save without causing problems in a full restore. Continue Reading
The BRMS Network feature allows a BRMS system to connect to other BRMS systems via a network, and enables a user to consolidate media such as backup ... Continue Reading
The only option to correct damage preventing file journaling is to use the RCLSTG command. Continue Reading