An output queue can be created in a library on an ASP or iASP. However, when using the WRKSPLF command you may not see the spool files that exist on the ASP/iASP unless you first set the iASP group using the command SETASPGRP (ASP/iASP Name).
Note to programmers: If you do programming with some iSeries APIs that retrieve information about spool files, it is not always necessary to specify the ASP/iASP name (unless, of course, you wish to). For example the API QUSLSPL will retrieve a list of spool files on *SYSBAS and on all available ASPs/iASPs without the need to use SETASPGRP; similarly QUSRSPLA will also retrieve spool file attributes without the need to use SETASPGRP.
Disclaimer:Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.
5/29/09 Working with Spool files on System ASPs or iASPs
7/14/08 How to fix a print job that hangs because record count is exceeded.
If a job that creates a spool file hangs up with the message, "Reached Maximum number of spooled records for file XXXXXX in library YYYYYY", the printer file has tried to generate spool file records that exceeds the number of records the print job specified. A finite limit to the number of records in a spool file is usually specified in order to control a runaway job from filling up disk space. To increase the number of records the spool file can hold, change MAXRCDS parameter in the CHGPRTF command within the program. Example
CHGPRTF FILE(XXXXXX) MAXRCDS(100000)
Caution: You can change the value of the MAXRCDS parm to *NOMAX, but keep in mind that this takes away the “governor.” If the program somehow gets into a "loop" while the spool file, it will create output until system storage is completely used up causing your system to shut down.
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.
5/5/08 Copy contents of spool file to a flat file
Step 1:
Create a flat file that has a record length of 132 (most spool files have a width of 132).
CRTPF FILE(FLATFILE) RCDLEN(132)
Step 2: Copy the spool file to the newly created flat file.
CPYSPLF FILE(QPDSPAJB) TOFILE(FLATFILE) JOB(*) SPLNBR(1)
Step 3: Copy the file to the IFS.
CPYTOSTMF FROMMBR('/qsys.lib/library.lib/flatfile.file/flatfile.mbr') TOSTMF('/somewhereintheifs/spoolfile.txt')
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.
3/28/08 How to retrieve spool files from another System i
First, ensure communications are set correctly by utilizing the SNDNETMSG (Send Network Message) command to send a test message prior to transferring the spooled file.
1. On a command line, type: WRKOUTQ LIBNAME/OUTQ
2. Type "1" next to the spooled file you wish to send and press Enter.
3. Type the User ID. This will be the user you wish to send the spooled file to.
4. Type the name of the machine that the spooled file will be sent to.
5. Type *ALLDATA for the Data Format parameter so this will include all resources associated if needed and press Enter.
Once the spool file transfers, it will be located in the default OutQ for user profile to which you sent it.
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation.