WRKSPLF (Work with Spooled Files)
WRKSPLF Command syntax diagram
Purpose
The Work with Spooled Files (WRKSPLF) command allows the user to work with the spooled files on the system that meet the selection values specified by the SELECT keyword. You can either display or print all the spooled files on the system or a selected subset of them.
Performance Considerations: The amount of time needed to show the list of spooled files is directly proportional to the number of spooled files in the list. On a system with a large number of spooled files, it may be necessary to use the SELECT parameter to view a subset of the system's spooled files.
Optional Parameters
- SELECT
- Specifies which group of files are selected to be shown or printed. Five positional values can be specified to select the files:
- The user that created the file
- The device for which the file is queued
- The form type specified
- The user data tag associated with the file
- The auxiliary storage pool the files are in.
Only files that meet each of the requirements are selected.
Element 1: User Values
*CURRENT: Only files created by the user running this command are selected.
*ALL: Files created by all users are selected.
user-name: Specify the user who created the files being selected.
Element 2: Device Values
*ALL: Files on any device-created or user-created output queue are selected.
*OUTQ: All files on any user-created output queue are selected. A user-created output queue is any output queue that is not automatically created by a device. A user-created output queue does not generally have the same name as a device, but if it does, it does not reside in library QUSRSYS.
device-name: Specify a device name. Only files on the device created output queue for that device are selected. A device created output queue is one that has the same name as a device and resides in the QUSRSYS library. Unless it already exists, it will automatically be created by the system when the device is created. A device created output queue cannot be deleted.
Element 3: Form Type Values
*ALL: Files for all form types are selected.
*STD: Only files that specify the standard form type are selected.
form-type: Specify the form type of the queued files being selected.
Element 4: User Data Values
*ALL: Files with any user data tag specified are selected.
user-data: Specify the user data tag of the queued files being selected.
Element 5: Auxiliary Storage Pool (ASP) Values
*ALL: Files in all auxiliary storage pools are selected.
ASP-number: Specify the auxiliary storage pool (ASP) of the files being selected. Valid values are 1 to 16.
- DSPFMT
- Specifies the format and terminology used on the displays that result from running this command.
Note: If the System/36 display format is used, the OUTPUT parameter is ignored and the data is presented at the user's display station. *INLENV: The format and terminology that is used is determined by the SPCENV (special environment) value specified in the user profile. If the SPCENV value is *S36, the System/36 terminology is used. All other values result in the iSeries 400 terminology being used.
*S36FMT: System/36 terminology is used to display the information.
*NORMAL: iSeries 400 terminology is used to display the information.
- ASTLVL
- Specifies which user interface to use.
*PRV: The previous user interface is used.
*USRPRF: The user interface specified in the user profile is used.
*BASIC: The Operational Assistant* user interface is used.
*INTERMED: The system interface is used.
- OUTPUT
- Specifies whether the output from the command is shown at the requesting workstation or printed with the job's spooled output. More information on this parameter is in commonly used parameters.
*: Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.
*PRINT: The output is printed with the job's spooled output.
Examples for WRKSPLF
Example 1: Work with All Spooled Files
WRKSPLF SELECT(*ALL *ALL *ALL *ALL *ALL) DSPFMT(*NORMAL)This command allows you to work with all of the spooled files on the system. The iSeries 400 terminology used is determined by the value on the SPCENV parameter in the user's profile. The information goes to the display by default.
Example 2: Work with Selected Spooled Files
WRKSPLF SELECT(CASMITH *ALL *ALL MEMO *ALL)This command allows you to work with all of the spooled files on the system for the user named CASMITH who has MEMO specified in the user data for the spooled file.
Error messages for WRKSPLF
*ESCAPE Messages
- CPF1E94
- User name &1 does not exist.
- CPF1E95
- Printer &1 not found.
- CPF1E99
- Unexpected error occurred.
- CPF33D0
- Printer &1 does not exist.
- CPF33D1
- User &1 does not exist.
- CPF3302
- Override of print file &1 to file &2 not valid.
- CPF3330
- Necessary resource not available.
- CPF3420
- System/36 display format not allowed in batch.
- CPF7D41
- Error occurred while logging order assistance request.
- CPF7D42
- Error occurred while performing database operation.
- CPF9845
- Error occurred while opening file &1.
- CPF9846
- Error while processing file &1 in library &2.
- CPF9871
- Error occurred while processing.