Work with Spooled Files (WRKSPLF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Work with Spooled Files (WRKSPLF) command displays a list of all the spooled files on the system or a selected list from them. You can choose to change, hold, delete, display, or release any or all of the entries that are displayed.

Performance Considerations: The amount of time needed to show the list of spooled files depends on the selection criteria used and the number of spooled files in the list. On a system with a large number of spooled files, it may be necessary to view a selected list of the system's spooled files. For additional performance information for WRKSPLF, see the Spool Performance Considerations experience report in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Top

Parameters

Keyword Description Choices Notes
SELECT Select files for Element list Optional, Positional 1
Element 1: User Generic name, name, *CURRENT, *ALL
Element 2: Print device Name, *ALL, *OUTQ
Element 3: Form type Character value, *ALL, *STD
Element 4: User data Character value, *ALL
Element 5: ASP 1-32, *ALL, *ASPDEV
Element 6: Spooled file Generic name, name, *ALL
JOB Job name Single values: *ALL
Other values: Qualified job name
Optional
Qualifier 1: Job name Generic name, name
Qualifier 2: User Generic name, name, *ALL
Qualifier 3: Number 000000-999999, *ALL
PERIOD Time period Element list Optional
Element 1: Start time and date Element list
Element 1: Beginning time Time, *AVAIL
Element 2: Beginning date Date, *BEGIN
Element 2: End time and date Element list
Element 1: Ending time Time, *AVAIL
Element 2: Ending date Date, *END
ASPDEV ASP device Name, *, *SYSBAS, *CURASPGRP Optional
OUTPUT Output *, *PRINT Optional
DSPFMT Display format *INLENV, *S36FMT, *NORMAL Optional, Positional 2
ASTLVL Assistance level *PRV, *USRPRF, *BASIC, *INTERMED Optional
Top

Select files for (SELECT)

Specifies which group of files is selected to be displayed. Positional values can be specified to select the files: the user that created the file, the device that the file is queued for, the form type specified, the user data tag associated with the file, the auxiliary storage pool the file is in, or the spooled file name. Only files that meet each of the values are selected.

Element 1: User

*CURRENT
Only files created by the user running this command are selected.
*ALL
Files created by all users are selected.
generic-name
Files created by all users that meet the criteria are selected. A generic name is a character string that contains one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. If an asterisk is not specified with the name, the system assumes that the name is a complete user name.
name
Specify a user name. Only files created by that user name are selected.

Element 2: Print device

*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.
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

*ALL
Files for all form types are selected.
*STD
Only files that specify the standard form type are selected.
character-value
Specify the form type to select the file.

Element 4: User data

*ALL
Files with any user data tag specified are selected.
generic-user-data
Files with a user data tag that matches the criteria are selected. A generic user data tag is a character string that contains one or more characters and ends with an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. If an asterisk is embedded in the middle of the string, for example 'AB*C*', it will be treated as part of the comparison string.
user-data
Specify the user data tag to select the file.

Element 5: ASP

*ALL
All files as specified in the Auxiliary Storage Pool Device (ASPDEV) parameter are selected.
*ASPDEV
Files specified in the Auxiliary Storage Pool Device (ASPDEV) parameter are selected.
1-32
Specify the auxiliary storage pool (ASP) of the files being selected.

Element 6: Spooled file

*ALL
Files with any name are selected.
generic-name
All spooled files with a name that matches the generic name are selected. A generic name is a character string that contains one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. If an asterisk is not specified with the name, the system assumes that the name is a complete spooled file name.
name
Specify the name of the spooled files to select.
Top

Job name (JOB)

Specifies the name of the job or jobs that created the spooled files to be selected.

Note: This parameter is allowed only if *ALL is specified for the user name element of the SELECT parameter.

Single values

*ALL
Spooled files created by all jobs are to be included.

Qualifier 1: Select jobs

generic-name
Spooled files created by jobs with the generic name specified are to be included. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic job name specifies all jobs with job names that begin with the generic prefix.
name
Spooled files created by jobs with the name specified are to be included.

Qualifier 2: User

*ALL
All spooled files created by jobs that match the specified job name are included.
generic-name
Spooled files created by jobs with the generic user name specified are to be included.
name
Spooled files created by jobs with the user name specified are to be included.

Qualifier 3: Number

*ALL
All spooled files created by jobs that match the specified job name and user name are to be included.
000001-999999
Specify the job number to further qualify the job name and user name.
Top

Time period (PERIOD)

Specifies the period of time for selecting which spooled files are shown. This is the creation date and time of the spooled files. This parameter contains two element lists of two elements each.

Element 1: Start time and date

Element 1: Beginning time

One of the following is used to specify the starting time at which or after which the spooled files were created. Spooled files created before the specified time and date are not shown.

*AVAIL
Any spooled files created on or after the specified starting date are shown.
time
Specify the starting time for the specified starting date. The time is specified in 24-hour format and can be specified with or without a time separator:
  • Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Hours, minutes, and seconds must each be exactly 2 digits. Use leading zeros if necessary. Valid values for hh range from 00 through 23. Valid values for mm and ss range from 00 through 59.
  • With a time separator, specify a string of 5 or 8 characters where the time separator specified for your job is used to separate the hours, minutes, and seconds. If you enter this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.

Element 2: Beginning date

One of the following is used to specify the starting date on which or after which the spooled files were created. Spooled files created before the specified date are not shown.

*BEGIN
Any spooled files that meet the other selection criteria are shown. When *BEGIN is specified for the starting date, a starting time value other than *AVAIL is ignored.
date
Specify the starting date. The date must be entered in the format specified by the job value DATFMT and, if separators are used, the separator must be the date separator specified by the job value DATSEP.

Element 2: End time and date

Element 1: Ending time

One of the following is used to specify the ending time before which the spooled files were created.

*AVAIL
Any spooled files created on or before the specified ending date are shown.
time
Specify the ending time for the specified ending date before which the spooled files were created.

Element 2: Ending date

One of the following is used to specify the ending date before which or on which the spooled files were created.

*END
The last day on which spooled files were created is used as the end date. If *END is specified, an ending time value other than *AVAIL is ignored.
date
Specify the ending date. The date must be entered in the format specified by the job value DATFMT and, if separators are used, the separator must be the date separator specified by the job value DATSEP.
Top

ASP device (ASPDEV)

Specifies the auxiliary storage pool device from which spooled files are to be selected. This parameter is only valid if the ASP number (ASP) element of the SELECT parameter is *ALL or *ASPDEV.

*
Files which are found in the ASPs that are currently part of the thread's library name space are selected. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and if the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group.
*SYSBAS
Files which are found in the system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) are selected.
*CURASPGRP
Files which are found in the primary and secondary ASPs in the thread's ASP group are selected. If no ASP group is associated with the thread, an error will be issued.
name
Specify the name of the auxiliary storage pool device description. Files which are found in the specified primary or secondary ASP are selected. Only primary or secondary ASPs which are in the thread's ASP group may be specified. If no ASP group is associated with the thread, an error will be issued.
Top

Output (OUTPUT)

Specifies whether the output is displayed at a display station or printed. If the output is displayed, it is sent to the work station that entered the command.

*
The output is displayed if requested by an interactive job or printed if requested by a batch job.
*PRINT
The output is printed.

Note: *PRINT cannot be specified if you are using a S/36 environment. If the command is run interactively, the output will be displayed but not printed. If the command is run in batch, an error message will be sent and no output will be produced.

Top

Display format (DSPFMT)

Specifies the format and terminology to be used on the displays that result from running this command.

Note: If the System/36 display format is used, the Output (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 your user profile. If the SPCENV value is *S36, the System/36 terminology is used. All other values result in this system's terminology being used.
*S36FMT
System/36 terminology is used to display the information.

Note: Spooled files which exist on primary or secondary auxiliary storage pools will not be shown when using a display format of *S36FMT.

*NORMAL
This system's terminology is used to display the information.
Top

Assistance level (ASTLVL)

Specifies which user interface to use.

*PRV
The previous user interface used is shown.
*USRPRF
The user interface specified on the Assistance level (ASTLVL) parameter of your user profile is used.
*BASIC
The Operational Assistant user interface is used.

Note: If any ASP number (1-32) is specified in the Select parameter and the Operational Assistant user interface is used, spooled files from the system ASP (ASP 1) and all basic user ASPs (ASPs 2-32) will be listed. Spooled files which exist on primary or secondary auxiliary storage pools will not be shown when using the Operational Assistant user interface.

*INTERMED
The system user interface is used.
Top

Examples

Example 1: Work with All Spooled Files

WRKSPLF   SELECT(*ALL *ALL *ALL *ALL *ALL *ALL)  DSPFMT(*NORMAL)

This command displays the Work with Spooled Files panel, showing a list of all of the spooled files on the system. The 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 *ALL)

This command allows you to work with all of the spooled files on the system for the user named CASMITH and that have 'MEMO' specified in the user data for the spooled file.

Example 3: Work with Spooled Files by User Data

WRKSPLF   SELECT(*ALL *ALL *ALL '*SAV*' *ALL *ALL)

This command allows you to work with all of the spooled files on the system that have '*SAV' as the first four characters specified in the user data for the spooled file.

Example 4: Work with Spooled Files by Date

WRKSPLF   SELECT(*ALL)
          PERIOD(('11:30:00' '01/12/2005') ('20:00:00' '01/12/2005'))

This command allows you to work with all of the spooled files on the system that have a create date and time between 11:30 AM and 8:00 PM on January 12, 2005.

Top

Error messages

*ESCAPE Messages

CPF1E94
User name &1 does not exist.
CPF1E95
Printer &1 not found.
CPF1E99
Unexpected error occurred.
CPF337E
ASP device &1 not in current ASP group for thread.
CPF337F
ASP device &1 not allowed with ASP number &2.
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.
CPF33FD
ASP device &1 not allowed.
CPF3420
System/36 display format not allowed in batch.
CPF7D41
Error occurred while logging order assistance request.
CPF7D42
Error occurred while performing database operation.
CPF9825
Not authorized to device &1.
CPF9833
*CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
CPF9871
Error occurred while processing.
CPFB8ED
Device description &1 not correct for operation.
Top