QUERY READER/PRINTER/PUNCH
Authorization
Privilege Class: D, G
Purpose
- Open on virtual devices
- Closed and on the device queue
- Being processed on real printers, punches, or readers.
Class G users can obtain information about reader, printer, or punch files that they own, that they created, or that are owned by their alternate user ID.
Class D users can obtain information about all spool files in the system, or spool files belonging to any user on the system.
Operands
- Printer
- PRT
- PUnch
- PCH
- Reader
- RDR
- displays the following information about your reader, printer, or punch files:
- The userid of the file creator
- The spool file identification
- The spool file's class and type of device where originated
- The number of logical records in the file
- The number of copies specified for the file
- The file HOLD, KEEP, and MSG status
- The form name.
- USERID
- U
- indicates that the next parameter is a userid. Class G users can specify only an asterisk (*) following USERID or U. U is the only abbreviation allowed for USERID.
- *
- userid
- ALTID
- identifies the user whose spool files are to be queried. You can specify an asterisk (*) to
query your own files; an asterisk (*) is the default for the class G user. You can specify ALTID to
query files belonging to your alternate user ID. Class G users cannot specify
userid.
Class D users can obtain information about reader, printer, or punch spool files that are owned by any user of the system by specifying that user's userid. If class D users want to obtain a display about their own spool files, they must enter their own userid or an asterisk (*) on the command line. A class D user issuing the QUERY command for a one-to-four digit, all numeric userid, will cause unpredictable results because of the one-to-four digit, all numeric spoolid parameter.
- SYSTEM
- allows only the class D user to obtain information about all files in the system, regardless of ownership. This system is not allowed with the spoolid option. SYSTEM is the default for the class D user.
- spoolid
- is the system-assigned number of the spool file that is to be queried. This option is not valid with the SYSTEM keyword.
Options
- CLass c
- designates an existing spool file class. The operand c is a 1-character alphanumeric field that may be from A to Z, or 0 to 9.
- DEST dest
- indicates that you want to obtain information for files with the specified destination value; dest is a 1- to 8-character value.
- FORM form
- indicates that you want to obtain spool file information for files with the specified form; form is one to eight characters long. For the class G user, form is the user form name. For the class D operator, form is the user form name when you specify asterisk (*). Otherwise, form is the operator form number.
- AVAIL
- displays only available files, not those files which are open or in use.
- HOLd
- NOHold
- SYShold
- USERhold
- identifies the status of the files to be queried.
- Specify HOLD to query files that are in user or system hold. A file that is in HOLD status cannot be processed by the spooling device. If you are a class G user, you can change a file's user hold status by using the CHANGE command; if you are a class D user, you can also change the system hold status by using the CHANGE command.
- Specify NOHOLD to query files that are not in user or system HOLD.
- Specify SYSHOLD to query files that only have system HOLD in effect.
- Specify USERHOLD to query files that only have user HOLD in effect.
- ALL
- displays additional information for spool files. In addition to the information normally
displayed for the reader, printer, or punch files, the following is also displayed:
- The date and time the file was created
- The file name and file type of file (if any)
- The distribution code of the file. If FULLDATE or ISODATE is specified, the distribution code is displayed only if DIST is also specified. See the DIST/NODIST option for details.
Note: The form name is not displayed when you use the ALL option. - EXP
- displays expanded information for spool files. The information displayed is:
- The user form name and operator form number
- The forms control buffer (FCB)
- The name and number of the copy modification module
- The flash name
- The number of copies to be flashed (flash count)
- The position of the 3800 LOAD CCWs within the spool file
- The name of the character set or sets
- The size of the file. This is the number of 4096-byte blocks in the file.
TBL is accepted as a substitute for the EXP option.
- PSF
- displays additional information for spool files. This additional information is returned under the following headings:
- DEST
- identifies which printers are to process the file.
- CONVERSION
- indicates whether PSF has done preliminary processing on the file.
- SPECIAL
- indicates whether the file contains X'5A' CCWs inserted by CP. The presence of X'5A' CCWs indicates that PSF control information has been added to the file.
- PURGE
- indicates whether the file has been purged from CP and is waiting for PSF to recognize this state.
- SEClabel
- displays the security label associated with each spool file.
- PREVOWN userid|ALL|ALTID
- displays information about files previously owned by the specified user ID or ALTID and owned by the issuing user ID. Class D users may use the SYSTEM option to display previous owner information about any files in the system. PREVOWN userid displays information about spool files transferred by the specified user ID or ALTID and owned by the query issuer. Files transferred back to the generator are not displayed. PREVOWN ALTID displays information about files generated by the ALTID owned by the issuing user ID. PREVOWN ALL displays information about files not generated by the issuing user ID or ALTID that are owned by the issuing user ID.
- XFER userid|ALL|ALTID
- displays information about spool files generated by the specified user ID or ALTID and owned by another user ID. Class D users may use the SYSTEM option to display information about any files in the system owned by a user ID other than the originating user ID. XFER userid2 displays information about spool files generated by the specified user ID or ALTID and owned by the user specified as userid2. Files generated and owned by the same user are not displayed. XFER ALTID displays information about files generated by the specified userid and owned by ALTID. XFER ALL displays information about files generated by the specified userid or ALTID and owned by another userid.
- SHOrtdate
- specifies that dates in the response to this command will be displayed in mm/dd format, where mm is the month and dd is the day of the month.
- FULldate
- specifies that dates in the response to this command will be displayed in mm/dd/yyyy format, where mm is the month, dd is the day of the month, and yyyy is the 4-digit year.
- ISOdate
- specifies that dates in the response to this command will be displayed in yyyy-mm-dd format. where yyyy is the 4-digit year, mm is the month, and dd is the day of the month.
- NODIST
- DIST
- Specifies whether or not to display a distribution code when FULLDATE or ISODATE has been specified. The default is NODIST so each output record fits within an 80-character buffer.
Usage Notes
- TBL is an acceptable substitute for the EXP option. The response has the same wording.
- If the userid option is used with the XFER option, the
userid option is treated as the origin ID of the files. The result is
information about the files generated by the first user and which are owned by the user specified
after the XFER option.
If a Class D user enters QUERY PRT USER1, the user receives information about the printer files that USER1 owns.
If a Class D user enters QUERY PRT XFER USER2, the user receives information about the printer files that USER2 owns but did not originate.
If a Class D user enters QUERY PRT USER1 XFER USER2, the user receives information about the printer files generated by USER1 but owned by USER2.
- For Class D Users:
- The userid and SYSTEM options are permitted for class D users only.
- If you use a one-to-four digit, all-numeric userid, the QUERY command produces unpredictable results because it also has a one-to-four digit, all-numeric spoolid parameter.
- If you specify spoolid, you must also specify userid or an asterisk (*).
- If DEST is not specified on a command that can select files by DEST, the destination value of the file is ignored. The AVAIL option limits the files displayed to include only those files which are currently available to the virtual machine. When the virtual machine issues a read to the virtual card reader and a reader file is not already open, the first file which is available is selected. It is possible for a file not currently available to be on the chain ahead of another which is available (that is, CP is checkpointing the file). And it is possible that this file can become available between the time that this QUERY command is issued and the time that the virtual machine actually issues a read. If it is important that a particular file be selected on the read, then that file should be placed at the beginning of the queue with the ORDER command before the read is issued. An alternative for use in a program is Diagnose X'14' subcode X'2C'. This function allows a program to choose a particular reader file, order it, and read the first record all in one operation.
- The SECLABEL option is valid only when an external security manager (ESM) is installed and security label checking is enabled.
- When security label checking is enabled, the ESM is called to verify the user's access to each file. If the user is denied access to a specific file, some of the information about that file must be hidden from the user. The only fields of the response that will contain information are ORIGINID, FILE, CLASS, HOLD, DATE and TIME. All other fields contain asterisks. If a security label is not assigned to the file, the SECLABEL field contains the word NONE.
- The default date format for certain CP and CMS commands can be set on a system-wide basis and
also for the individual user. The system-wide default date format is set with the SYSTEM_DATEFORMAT
system configuration statement. The user's default date format is set with the DATEFORMAT directory
statement. The system-wide default and the user's default can also be set with the CP SET DATEFORMAT
command. The user's default date format defaults to the system-wide default. The system-wide and
user settings can be queried with the CP QUERY DATEFORMAT command. The hierarchy of possible date
format settings for the QUERY RDR/PRT/PUN command, from highest priority to lowest, is:
- QUERY RDR/PRT/PUN command option
- User default
- System-wide default
Responses
The column heads and variables used in the following responses are displayed at the end of this section under Explanation of Response Contents.
Response 1:
The following response is issued when you specify QUERY RDR/PRT/PUN without the ALL option:
ORIGINID FILE CLASS RECORDS CPY HOLD FORM DEST KEEP MSG
userid spid a typ nnnnnnnn nnn NONE formname dest ON ON
*nnn USER OFF OFF
SYS
USYS
OWNERID FILE CLASS RECORDS CPY HOLD USERFORM OPERFORM DEST KEEP MSG
userid spid a typ nnnnnnnn nnn NONE userform operform dest ON ON
*nnn USER OFF OFF
SYS
USYS
Response 2:
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME TYPE DIST
userid spid c typ nnnnnnnn nnn NONE mm/dd hh:mm:ss filename
*nnn USER
SYS
USYS
filetype distcode
Response 3:
ORIGINID FILE CLASS RECORDS FLASH FCB MDFY FLSHC LOAD CHARS SIZE
userid spid c typ nnnnnnnn name fcb mod n ccc NO name name name name size
BEG
ANY
Response 4:
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME
userid spid c typ nnnnnnnn nnn NONE OPEN- vdev filename
*nnn USER
SYS
USYS
TYPE DIST
filetype distcode
Response 5:
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME
userid spid c typ nnnnnnnn nnn NONE PRT- nnnn filename
*nnn USER PUN- nnnK
SYS nnnM
USYS
TYPE DIST
filetype distcode
Response 6:
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME
userid spid c typ nnnnnnnn nnn NONE OPEN- rdev filename
*nnn USER
SYS
USYS
TYPE DIST
filetype distcode
Response 7:
ORIGINID FILE CLASS RECORDS FORM DEST CONVERSION SPECIAL PURGE
userid spid c typ nnnnnnnn formname dest convstat YES YES
NO NO
Response 8:
ORIGINID FILE CLASS RECORDS CPY HOLD **PURGED** NAME
userid spid c typ nnnnnnnn nnn NONE filename
*nnn USER
SYS
USYS
TYPE DIST
filetype distcode
The response indicates that PURGE processing is not complete for the file. This is a temporary
state. If a printer spool file remains in this state for an extended period of time, it may indicate
that the file has been selected for printing, but that intervention is required on the printer, or
it may indicate that there is a problem with the printer server virtual machine.Response 9: (QUERY PRINTER only)
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME
userid spid c typ nnnnnnnn nnn SYS **PRINTED** filename
TYPE DIST
filetype distcode
The delayed purge queue for each printer is limited, so this file should eventually be purged by the system when it gets 'pushed' off the queue by subsequent print jobs. A file marked **PRINTED** cannot be changed, transferred, ordered, tagged, or dumped by SPXTAPE. It can be deleted by the PURGE command, which can be issued by the operator, or by the owner of the file.
These files may become detached from the delayed purge queue by events like an abnormal system shutdown. When this happens, the file will not be automatically deleted by the system. It should be deleted by the operator or the owner of the file.
Response 10:
NO RDR FILES
- or -
NO PRT FILES
- or - NO PUN FILES
Response 11:
In an SSI cluster, the response for QUERY RDR/PRT/PUN ALL shows whether a file is unavailable for processing.
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME TYPE DIST
userid spid c typ nnnnnnnn nnn NONE LOCK- sysname fnft distcode
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME TYPE DIST
userid spid c typ nnnnnnnn nnn NONE COPY- sysname fnft distcode
In these circumstances, a reader file may be read using the PEEK or RECEIVE commands, but it cannot be manipulated by the CHANGE or TRANSFER commands.
In all other cases, the response to this command in an SSI cluster is the same as the response when not in an SSI cluster.
Response 12:
The following response is issued when you specify QUERY RDR/PRT/PUN with the SECLABEL option:
ORIGINID FILE CLASS RECORDS CPY HOLD FORM DEST SECLABEL
userid spid a typ nnnnnnnn nnn NONE formname dest ssssssss
*nnn USER
SYS
USYS
OWNERID FILE CLASS RECORDS CPY HOLD USERFORM
userid spid a typ nnnnnnnn nnn NONE userform
*nnn USER
SYS
USYS
OPERFORM DEST SECLABEL
operform dest ssssssss
Response 13:
When security label checking is enabled, some fields must be hidden from the user if access to the file is denied. This example shows the response that is issued when you specified QUERY RDR/PRT/PUN with the SECLABEL option, and you were denied access to the file:
ORIGINID FILE CLASS RECORDS CPY HOLD FORM DEST SECLABEL
userid spid a typ ******** *** NONE ******** **** ********
**** USER
SYS
USYS
Response 14:
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME
userid spid c typ nnnnnnnn nnn nnnn nnnn rdev filename
*nnn USER
SYS
USYS
TYPE DIST
filetype distcode
Response 15:
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME
userid spid c typ nnnnnnnn nnn NONE mm/dd/yyyy hh:mm:ss
filename
*nnn USER
SYS
USYS
TYPE
filetype
Response 16:
ORIGINID FILE CLASS RECORDS CPY HOLD DATE TIME NAME
userid spid c typ nnnnnnnn nnn NONE yyyy-mm-dd hh:mm:ss
filename
*nnn USER
SYS
USYS
TYPE DIST
filetype distcode
Explanation of Response Contents:
- CHARS name
- is the name of the character set or sets used to generate output if printed on a 3800 printer.
- CONVERSION convstat
- is the conversion status of the file, which can be any of the following:
Status Meaning ACTIVE The print server is converting the file to a CMS file containing the actual data and the print controls used to print the file. COMPLETE The file is converted. NOTCONV The file is not yet been converted. - DEST dest
- specifies the destination value assigned to the spool file.
- distcode
- is the distribution code of the file.
- FCB fcb
- is the name of the FCB module used in the vertical formatting of a page.
- filename
- is the file name assigned to the file (if any).
- filetype
- is the file type assigned to the file (if any).
- FLASH name
- is the name of the forms overlay frame to be superimposed on the output if printed on a 3800 printer.
- FLSHC ccc
- is the number of copies that are printed while the forms overlay frame is in place if printed on a 3800 printer.
- FORM name
- is the name of the paper type as understood by the user (displayed for a class G user).
- hh:mm:ss
- is the time when the file was created in hours, minutes, and seconds.
- KEEP ON
- KEEP OFF
- indicates whether the file is retained after being processed. ON indicates that KEEP is in effect and the file is retained after processing, and OFF indicates that KEEP is not in effect.
- LOAD NO
- LOAD BEG
- LOAD ANY
- is where the 3800 LOAD CCWs are positioned within the spool file–not at all (NO), at the beginning (BEG), or interspersed throughout the spool file (ANY).
- MDFY mod
- is the name of the copy modification module used to alter output text if printed on a 3800 printer.
- mm/dd
- mm/dd/yyyy
- yyyy-mm-dd
- is the date the file was created. The format of the date is determined by the SHORTDATE, FULLDATE, or ISODATE option. If no date format option is specified, the user's default date format setting is used.
- MSG ON
- MSG OFF
- indicates whether messages about the file printing or punching are displayed. ON indicates these messages are displayed; OFF indicates they are not.
- n
- is the copy modification character set number.
- nnn
- *nnn
- is the number of copies requested for the spool file. This is shown as a 3-digit number (nnn). The asterisk (*) indicates that the 3800 printer should print each page from the spooled output files nnn times before going on to the next page.
- nnnnnnnn
- is the number of logical records contained in the file.
- NONE
- USER
- SYS
- USYS
- represents the file's HOLD status. NONE indicates there are no holds on the file, USER indicates the file is in user hold status, SYS indicates the file is in system hold, and USYS indicates the file is in both user and system hold.
- operform
- is the name of the paper type as understood by the operator (displayed for a class D user).
- ORIGINID
- OWNERID
- ORIGINID heading the title line for the spool file data is altered to OWNERID when userid or the XFER operand is used, or when a class D user is defaulting to, or specifying, SYSTEM. In that event, OWNERID represents the owner of the file.
- PURGE (YES/NO)
- YES indicates that a file has been converted and subsequently changed, transferred, or purged. A
new and unconverted file was created to reflect the altered attributes while retaining the original
file data.
When the print server selects a file with PURGE=YES, it cancels further processing and deletes the old file.
- SECLABEL ssssssss
- identifies the security label (SECLABEL) associated with each file. The SECLABEL value is displayed as a 1- to 8-character alphanumeric value.
- SIZE size
- is the number of 4 KB DASD blocks allocated for data for the file.
- SPECIAL (YES/NO)
- indicates whether the file contains any records with X'5A' CCWs. The presence of X'5A' CCWs indicates that CP has added PSF control information to the file.
- spid
- is a system-assigned number used by the system to identify the file.
- typ
- identifies the device type that originally produced the spool file. The type can be RDR, PRT, PUN, CON, DMP or SYS.
- userform
- is the name of the paper type as understood by the user (displayed for a class D user).
Messages
- HCP003E Invalid option - {option|command contains extra option(s) starting with option}
- HCP042E User userid spoolid nnnn does not exist
- HCP413E Command processing cannot complete due to a spool paging error.
- HCP422E The same option was specified twice.
- HCP423E The function requested is incompatible with a previously specified operand.
- HCP848E SYSTEM parameter is invalid with the spoolid option
- HCP849E A userid must be specified with the spoolid
- HCP1558E Command processing cannot complete.