Work with Printing Status (WRKPRTSTS)

The Work with Printing Status (WRKPRTSTS) command allows you to list the statuses of a specified spooled file.

Parameters

Keyword Description Choices Notes
FILE Spooled file Name Required, Positional 1
JOB Job name Single values: *
Other values: Qualified job name
Optional, Positional 2
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
SPLNBR Spooled file number 1-999999, *ONLY, *LAST, *ANY Optional, Positional 3
JOBSYSNAME Job system name Name, *ONLY, *CURRENT, *ANY Optional
CRTDATE Spooled file created Single values: *ONLY, *LAST
Other values: Element list
Optional
Element 1: Creation date Date
Element 2: Creation time Time, *ONLY, *LAST

Spooled file (FILE)

Specifies the name of a file created by a user program or the name of the device file used to create this file.

This is a required parameter.

Job name (JOB)

Specifies the name of the job that created the spooled file. This parameter is valid only if a spooled file name is specified on the Spooled file (FILE) parameter.

Single values

*
The job from which this WRKPRTSTS command was entered is the job that created the spooled file.

Qualifier 1: Job name

name
Specify the name of the job that created the spooled file. If no job qualifier is given, all of the jobs currently in the system are searched for the simple job name.

Qualifier 2: User

name
Specify the name of the user profile under which the spooled file was created.

Qualifier 3: Number

000000-999999
Specify the system-assigned number of the job that created the spooled file.

Spooled file number (SPLNBR)

Specifies the number of the spooled file being processed. This parameter is valid only if a spooled file name is specified on the Spooled file (FILE) parameter.

*ONLY
Only one spooled file from the job on the specified queue has the specified file name; no spooled file number is needed. If *ONLY is specified and more than one spooled file on the output queue has the same name, an error message is shown.
*LAST
The highest-numbered spooled file that is on the specified output queue and that has the specified file name is processed first.
*ANY
The spooled file number is not used to determine which spooled file is used. Use this value when the job system name parameter or the spooled file create date and time parameter is to take precedence over the spooled file number when selecting a spooled file.
number
Specify the number of the job's spooled file that is on the specified output queue and that is being processed first.

Job system name (JOBSYSNAME)

Specifies the name of the system where the job that created the spooled file (JOB parameter) ran. This parameter is considered after the job name, user name, job number, spooled file name, and spooled file number parameter requirements have been met.

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and spooled file create date and time.
*CURRENT
The spooled file created on the current system with the specified job name, user name, job number, spooled file name, spooled file number, and create date and time is used.
*ANY
The job system name is not used to determine which spooled file is used. Use this value when the spooled file create date and time parameter is to take precedence over the job system name when selecting a spooled file.
name
Specify the name of the system where the job that created the spooled file ran.

Spooled file created (CRTDATE)

Specifies the date and time the spooled file was created. This parameter is considered after the job name, user name, job number, spooled file name, spooled file number, and job system name parameter requirements have been met.

Single values

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and job system name.
*LAST
The spooled file with the latest create date and time of the specified job name, user name, job number, spooled file name, spooled file number, and job system name is used.

Element 1: Creation date

date
Specify the date the spooled file was created.

Element 2: Creation time

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date.
*LAST
The spooled file with the latest create time of the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date is used.
time
Specify the time the spooled file was created.

Examples

WRKPRTSTS   FILE(MYFILE)

This command assumes that the user has a spooled file on an output queue that does not have a printer attached to it. When the user specifies this command, the Work with Printing Status panel will be shown. One status message that would apply to the file named MYFILE would be, "This file is not associated with a started printer." Depending on the status of MYFILE, other status types could be shown.

Error messages

*ESCAPE Messages

CPF3303
File &1 not found in job &5/&4/&3.
CPF3309
No files named &1 are active.
CPF3330
Necessary resource not available.
CPF3342
Job &5/&4/&3 not found.
CPF3344
File &1 number &8 no longer in the system.
CPF34B4
WRKPRTSTS command not valid for diskette files.
CPF34B5
Printer &1 is not found.
CPF34B6
More than one printer was selected
CPF34B7
Printer must be selected from list of printers.
CPF9871
Error occurred while processing.