Retrieve Spooled File Attributes (QUSRSPLA) API


  Required Parameter Group:


  Optional Parameter Group 1:


  Optional Parameter Group 2:


  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Spooled File Attributes (QUSRSPLA) API returns specific information about a spooled file into a receiver variable. The size of the receiver variable determines the amount of information returned. You can specify the spooled file for which information is returned either with the internal job and spooled file identifiers, or with a specific job name, spooled file name, and spooled file number.

For RPG and COBOL examples using this API, see Examples: APIs and exit programs.

Note: These examples also contain a delete old spooled file (DLTOLDSPLF) example.

Authorities and Locks

None.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that receives the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data the area can hold

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. If the length is larger than the size of the receiver variable, the results are not predictable. The minimum length is 8 bytes.

Format name
INPUT; CHAR(8)

The format of the information to be returned for the specified spooled file.

The valid format names are:


Qualified job name
INPUT; CHAR(26)

The job that owns the spooled file.

The qualified job name has three parts:


Internal job identifier
INPUT; CHAR(16)

The internal job identifier for the job that owns the spooled file whose attributes are to be retrieved. Use one of these APIs to make the identifier available:


Internal spooled file identifier
INPUT; CHAR(16)

The internal spooled file identifier for the spooled file whose attributes are retrieved. To make the identifier available, see List Spooled Files (QUSLSPL) API.

Spooled file name
INPUT; CHAR(10)

The name of the spooled file for which you may want to retrieve the attributes.

You can use this special value for the name:


Spooled file number
INPUT; BINARY(4)

The unique number of the spooled file. The valid range is 1 through 999999.

The following special values are supported for this parameter:


Note: This parameter must contain a valid value even if the value for the spooled file name parameter is *INT.

A value is required because the QUSRSPLA API performs validity checking on all parameters.


Optional Parameter Group 1

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.

If this parameter is omitted, diagnostic and escape messages are issued to the application.

Optional Parameter Group 2

Job system name
INPUT; CHAR(8)

The name of the system where the job that created the spooled file ran or blank when the spooled file name is *INT. This parameter is considered after the job name, user name, job number, spooled file name, and spooled file number parameter requirements have been met.

The following special values are supported for this parameter:


If this parameter is omitted, the API assumes blanks when the spooled file name is *INT. When spooled file name is not *INT, the API assumes *ONLY.

Spooled file create date
INPUT; CHAR(7)

The date, based on local job time, that the spooled file was created on the system or blank when the spooled file name is *INT. 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. The date must be in the CYYMMDD format or one of the following special values:


The date format CYYMMDD is defined as follows:


If this parameter is omitted, the API assumes blanks when the spooled file name is *INT. When spooled file name is not *INT, the API assumes *ONLY.

Spooled file create time
INPUT; CHAR(6)

The time, in local job time, that the spooled file was created on the system. This parameter must be set to blanks when special values *LAST or *ONLY are used for parameter Spooled file create date. This parameter must have a value set if a date is specified for parameter Spooled file create date. This parameter is considered after the job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date parameter requirements have been met. The time must be in the HHMMSS format or one of the following special values:


The time format HHMMSS is defined as follows:


If this parameter is omitted, the API assumes blanks.


How to Select a Spooled File to Retrieve Its Attributes

This table illustrates the valid parameter combinations of qualified job name, internal job identifier, internal spooled file identifier, spooled file name, job system name, spooled file create date and spooled file create time. The combinations of these parameters identify the spooled file from which attributes can be retrieved. For example, when the qualified job name parameter value is *, the internal job identifier must be blank, the internal spooled file identifier must be blank, the actual name of the spooled file must be given, and a valid spooled file number must be given.

Note: This parameter combination is not valid when a job has been detached from its spooled files or for a spooled file on an independent disk pool. Use of this combination will result in message CPF3C43 or CPD3C43.


SPLA0100 Format

The following table shows the information returned for the SPLA0100 format.



SPLA0200 Format

The following table shows the information returned for the SPLA0200 format. For more details about the fields in the following table, see Field Descriptions.



User-Defined Option Entry

Each user-defined option entry has the following structure. For more details about the fields in the following table, see Field Descriptions.

Note: One entry is returned for each user-defined option. The number of entries may vary from one spooled file to another.



User Resource Library List Entry

Each user resource library list entry has the following structure. For more details about the fields in the following table, see Field Descriptions.

Note: One entry is returned for each user resource library. The number of entries may vary from one spooled file to another.



Edge-Stitch Staple Offset Entry

Each edge-stitch staple offset entry has the structure stated in the following table. For more details about the fields in the following table, see Field Descriptions.

Note: One entry is returned for each edge-stitch staple. The number of entries may vary from one spooled file to another.



Saddle-Stitch Staple Offset Entry

Each saddle-stitch staple offset entry has the following structure. For more details about the fields in the following table, see Field Descriptions.

Note: One entry is returned for each saddle-stitch staple. The number of entries may vary from one spooled file to another.



Library List Entry

Each library list entry has the following structure. For more details about the fields in the following table, see Field Descriptions.

Note: One entry is returned for each library. The number of entries may vary from one spooled file to another.



Internet Print Protocol Spooled File Attributes.

The Internet Print Protocol (IPP) specific spooled file attributes has the following structure. For more details about the fields in the following table, see Field Descriptions.

Note: These attributes are present only if the spooled file was created through IPP.



Save and Restore Spooled File Attributes.

The Save and Restore specific spooled file attributes has the following structure. For more details about the fields in the following table, see Field Descriptions.

Note: These attributes are present only if the spooled file was saved or restored.



Field Descriptions

Accounting code. An identifier assigned by the system to record the resources used to write this file.

Advanced Function Presentation (AFP) resource. Whether this spooled file refers to AFP resources external to this spooled file, for example, page segments or overlays.

The possible values are:


Align forms. Whether a forms alignment message is sent prior to printing this file. The options are *YES or *NO.

Alternate forms length. The length of the alternate forms in lines. This field applies only to files created by the OfficeVision program and should be set to 0 by an application building this format as opposed to retrieving the fields.

Alternate forms width. The width of the alternate forms in character positions. This field applies only to files created by the OfficeVision program and should be set to 0 by an application building this format as opposed to retrieving the fields.

Alternate lines per inch. The lines per inch for the alternate forms. This field applies only to files created by the OfficeVision program and should be set to 0 by an application building this format as opposed to retrieving the fields.

ASCII transparency. For SCS files, whether ASCII commands are embedded in the ASCII transparency command. The ASCII transparency command is command_ID/command_length/ASCII_data. The command ID is a 1-byte field with value hex 03. The command length is a 1-byte field that contains the length of the command length field and the ASCII data field.

Valid values are Y (yes) or N (no).

Auxiliary storage pool. The number of the auxiliary storage pool (ASP) that the spooled file is stored on.

The possible values are:


Auxiliary storage pool device name. The name of the auxiliary storage pool (ASP) device that the spooled file is stored on.

The possible values are:


Back margin offset across. For the back side of a piece of paper, it specifies, in either inches or centimeters (specified in the unit of measure (UOM) field), how far in from the left side of the page printing starts.

The possible values are:


Back margin offset down. For the back side of a piece of paper, it specifies, in either inches or centimeters (specified in the unit of measure (UOM) field), how far down from the top of the page printing starts.

The possible values are:


Back overlay library name. The name of the library containing the back overlay.

The possible values are:


Back overlay name. The name of the back overlay (the material that prints on the back side of each page).

The possible values are:


Back overlay offset across. The offset across from the point of origin where the overlay is printed.

The possible values are:


Back overlay offset down. The offset down from the point of origin where the overlay is printed.

The possible values are:


Bar code. Whether the spooled file contains bar codes created using the BARCODE keyword in the data description specifications (DDS).

For DEVTYPE(*IPDS and *AFPDS), a series of bar code commands is contained in the data stream.

Valid values are Y (yes) or N (no).

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Carriage control characters. Whether the file has machine carriage control characters.

Valid values are Y (yes) or N (no).

CCSID. The coded character set identifier (CCSID) used when the user-defined text was created using the Change User Print Information (CHGUSRPRTI) command.

CCSID of IPP attributes. The coded character set identifier (CCSID) used when the IPP attributes were set for the spooled file. The spooled file attributes affected are:

CCSID of job. The coded character set identifier (CCSID) of the job when the spooled file was created. This CCSID may or may not represent the contents of the spooled file.

The possible values are:


Channel value array. Contains the skip-to line number associated with the channel value. (The first entry in the array applies to channel 1.) The variable returns a maximum of 12 binary(4) values. Each of the values returned is 0 if the mode is *NORMAL.

Channel mode. A variable indicating the channel value mode.

The possible values are:


Character code. Whether the coding for the diskette file is in ASCII or EBCDIC form.

Character ID. Whether the character ID can change within the file.

Valid values are Y (yes) or N (no).

Character not valid. Whether incorrect character errors are reported.

Valid values are Y (yes) or N (no).

Character set library name. The name of the library containing the font character set object.

The possible values are:


Character set name. The name of the font character set object used to print this file.

The possible values are:


Character set point size. The point size in which this file's characters (defined by the character set field) should be printed.

The possible values are:


Characters per inch. The number (in tenths) of characters per horizontal inch, defined in the printer file. The value 100 indicates 10 characters per inch.

Characters per inch changes. Whether the spooled file changes the characters per inch (cpi) within the file.

For DEVTYPE(*SCS), a Set Character Distance command is contained in the spooled file.

Valid values are Y (yes) or N (no).

Code page. The mapping of graphic characters to code points for this printer. For *DEVD, the operating system sends a device default character set value to the printer, which determines the character set to be used.

Code page library name. The name of the library containing the code page used to print this spooled file.

The possible values are:


Code page name. The name of the code page used to print this spooled file.

Code pages are groups of characters. Within a code page unique hexadecimal identifiers are assigned to each of the characters.

Coded font array. The name of the fonts used for printing a line data file. This corresponds to the CHARS parameter of MVS™ and VM printing services. The variable returns a maximum of 4 four-character-coded fonts. The variable is returned blank if no coded fonts are specified. The name specified does not include the two-character prefix of the coded font name (X0 through XG). For more information about the CHARS fields, see the Print Services Facility™/MVS Application Programming Guide or Print Services Facility User's Programmers Guide for VM.

Coded font library name. The name of the library containing the coded font used to print this spooled file.

The possible values are:


Coded font name. The name of the coded font used to print this spooled file. A coded font is an AFP resource composed of a character set and a code page.

The possible values are:


Coded font point size. The point size in which this file's characters (defined by the coded font field) should be printed.

The possible values are:


Color. Whether an IPDS Write Text command or AFPDS presentation text data (PTX) structured field containing a Set Text Color text control is contained in the spooled file.

For DEVTYPE(*IPDS and *AFPDS), a Set Text Color text control is contained in the spooled file.

Valid values are Y (yes) or N (no).

Constant back overlay. Whether or not constant back overlay is used. Constant back allows the user to print overlays on the back side of each sheet of media without the need for the print application to generate blank pages. The constant back function causes blank pages to be generated by the operating system onto which the back overaly will be printed. The generated blank pages are called constant forms because no variable data from the user's print application is printed on the pages. Constant back overlay is ignored if the print on both sides field is set to *NO.

The possible values are:


Control character. Whether this printer file uses the American National Standard printer control character.

The possible values are:


Copies left to produce. The remaining number of copies to be produced on the printer. Valid values are 1 through 255.

CPA3353 message. Whether message CPA3353 is issued when this file is printed.

Valid values are Y (yes) or N (no).

Corner staple. The reference corner to be used for a corner staple. A staple is driven into the media at the reference corner. Refer to your printer's documentation for information as to which reference corners are supported.

Valid values are:


Data stream size. The number of bytes of data stream for the file. If the file is still open when the fields are retrieved, the data stream size is the number of bytes of data stream written to the file thus far. If the number of bytes of data stream is zero, possible reasons are there was a problem retrieving the number of data stream bytes or there have not been any bytes of data stream written to the spooled file yet.

Date file last used. The date, based on local job time, that the file data was last displayed, copied, printed, or sent; or when the file attributes were last changed. The date is in the CYYMMDD format as follows:


Date file opened (created). The date, based on local job time, that the file was opened in the CYYMMDD format where:


Date writer began processing spooled file. The date, based on local job time, that a spooling writer started processing the spooled file. This field is set to blanks if the file has not been processed by a writer. The date is in the CYYMMDD format as follows:


Date writer completed processing spooled file. The date, based on local job time, that a spooling writer completed processing the spooled file or the date the processing of the spooled file was aborted. This field is set to blanks if the file has not been processed by a writer or the writer has not completed processing the file. The date is in the CYYMMDD format as follows:


DBCS character rotation. Whether this printer file causes the double-byte character set (DBCS) characters to be rotated 90 degrees counterclockwise before printing. The possible values are *YES and *NO.

DBCS character rotation commands. Whether the double byte character set characters are rotated 90 degrees counterclockwise before printing.

Valid values are Y (yes) or N (no).

DBCS characters per inch. The number of double-byte characters to be printed per inch.

The possible values are:


DBCS-coded font library name. The name of the library containing the DBCS-coded font.

The possible values are:


DBCS-coded font name. The name of the DBCS-coded font used to print DBCS-coded data on printers configured as AFP(*YES).

The possible values are:


DBCS-coded font point size. The point size in which this file's DCBS characters (defined by the DBCS-coded font field) should be printed.

The possible values are:


DBCS extension characters. Whether the system uses the extension character processing function for DBCS data.

The possible values are:


DBCS shift-out shift-in (SO/SI) spacing. The presentation of shift-out and shift-in characters when printed.

The possible values are:


DDS. Whether the file was constructed with DDS.

Valid values are Y (yes) or N (no).

Decimal format. Whether the decimal format from the DECFMT job attribute or from the printer file was used when the spooled file was created.


Define characters. Whether the spooled file defines or redefines unique print characters.

For DEVTYPE(*SCS), a Load Alternate Characters command is contained in the spooled file.

Valid values are Y (yes) or N (no).

Device file library name. The name of the library that contains the device file.

Device file name. The name of the device file used to create the spooled file.

Device type. The type of device file for which this file is intended. The possible values are PRINTER, DISKETTE, or TAPE.

Document name. The name of the document that was the source of the spooled file.

Double-wide characters. Whether the spooled file prints everything twice as wide as normal.

For DEVTYPE(*SCS), a Set Font Size command is contained in the data stream.

Valid values are Y (yes) or N (no).

Drawer change. Whether the printer drawer is changed within the spooled file.

Valid values are Y (yes) or N (no).

Edge-stitch number of staples. The number of staples in the edge-stitch.

The valid values are:


Edge-stitch reference edge. The edge of the paper to be used as a reference in determining where the edge stitching is to be located.

Valid values are:


Edge-stitch staple offset. For the spooled file, the placement of staples along the finishing margin in either inches or centimeters (specified in the Unit of measure (UOM) field). The finishing margin can be thought of as an imaginary line parallel to the edge of the paper where the staples will be placed. The position of the finishing margin relative to the physical edge is specified in the offset from edge-stitch reference edge field.

If you want the staples placed along the left or right edge of the paper, specify the offset of the first staple by measuring from the point where the finishing margin intersects the bottom edge of paper to where you want the center of the staple to be. For subsequent staples, specify the offset by measuring from the same point (not from the previous staple).

If you want the staples placed along the top or bottom edge of the paper, specify the offset of the first staple by measuring from the point where the finishing margin intersects the left edge of paper to where you want the center of the staple to be. For subsequent staples, specify the offset by measuring from the same point (not from the previous staple).

The possible values are:


Ending page. The page at which printing is to end for the file. 0 or 2147483647 indicates the last page.

Exchange type. The exchange type of the diskette file.

The possible values are:


Expiration date. The date the file will be eligible for removal from the system by the Delete Expired Spooled Files (DLTEXPSPLF) command and blank if the file will not expire. The spooled file will expire at 23:59:59, local system time on the date specified. The date is in the CYYMMDD format as follows:


Extended code page. Whether the extended code page changes within the file.

Valid values are Y (yes) or N (no).

FFT emphasis. Whether the spooled file contains text that is to appear darker than the surrounding text.

For DEVTYPE(*SCS), Begin Emphasis and End Emphasis commands are contained in the spooled file.

Valid values are Y (yes) or N (no).

Field outlining. Whether the spooled file outlines fields of data with boxes. If it does, the file must be printed on a printer that supports field outlining.

For DEVTYPE(*SCS), a Define Grid Line command is contained in the spooled file.

Valid values are Y (yes) or N (no).

File available. The time when this file becomes available to an output device for processing.

The possible values are:


File label identifier. The diskette label used when the system last saved the object.

File open. Whether the file is still open when fields are retrieved.

Valid values are Y (yes) or N (no).

File stopped on page boundary. Whether the file has stopped printing on a page boundary.

Valid values are Y (yes) or N (no).

Final form feed. Whether the Final Form Feed command is in the printer file.

Valid values are Y (yes) or N (no).

Final form text. Whether this spooled file contains various functions that are supported on letter-quality printers.

Valid values are Y (yes) or N (no).

Fold records. Whether records exceeding the printer forms width are folded (wrapped) to the next line. The possible values are *YES or *NO.

Folder name. The name of the folder that contains the source document.

Font. Whether the spooled file uses multiple fonts.

Valid values are Y (yes) or N (no).

Font equivalence array. The data portion of the Load Font Equivalence (LFE) command for intelligent printer data streams (IPDSs). The variable returns a maximum of 72 sixteen-character font equivalence entries. The current maximum is 48. The additional array space is provided for further expansion. If more than 72 font equivalence entries are used, a 1 is returned in the 1153rd character of the variable; otherwise, the 1153rd character is blank. The format of this entry is described in the IPDS Reference manual, S544-3417. This manual is available from the IBM® Publications CenterLink outside information center.

Font resolution for formatting. The resolution Print Services Facility/400 (PSF/400) should use to print the spooled file when printing to a multiple resolution printer and either of the following conditions exist:

The possible values are:


Form definition library name. The name of the library that contains the form definition.

Form definition name. The name of the form definition to use for this print request or one of the following special values:


Form feed. The manner in which forms feed to the printer.

The possible values are:


Form type. The type of form to be loaded in the printer to print this file.

Format name. The name of the format used to return information.

Front margin offset across. For the front side of a piece of paper, it specifies, in either inches or centimeters (specified in the unit of measure (UOM) field), how far in from the left side of the page printing starts.

The possible values are:


Front margin offset down. For the front side of a piece of paper, it specifies, in either inches or centimeters (specified in the unit of measure (UOM) field), how far down from the top of the page printing starts.

The possible values are:


Front overlay library name. The name of the library containing the front overlay.

The possible values are:


Front overlay name. The name of the front overlay (the material that prints on the front side of each page).

The possible values are:


Front overlay offset across. The offset across from the point of origin where the overlay is printed.

The possible values are:


Front overlay offset down. The offset down from the point of origin where the overlay is printed.

The possible values are:


Graphic character set. The set of graphic characters to be used when printing this file. For *DEVD, the system gets the graphic character set from the printer device description.

Graphics. Whether the spooled file contains graphics.

Valid values are Y (yes) or N (no).

Graphics error actions. Whether the file contains graphic error action commands.

For SCS files, the file contains one or more Set Graphic Error Action commands.

Valid values are Y (yes) or N (no).

Graphics token. The printer type on which the graphics in this file can be printed.

The possible values are:


Group level index tags. Whether the spooled file contains group level index tags as indicated by the DDS keyword DOCIDXTAG with a tag level of GROUP. The possible values are Y (yes) or N (no).

Height of drawer 1. The height in inches of the paper in drawer 1. This field is for internal use and should be set to 0 by an application building this format as opposed to retrieving the fields.

Height of drawer 2. The height in inches of the paper in drawer 2. This field is for internal use and should be set to 0 by an application building this format as opposed to retrieving the fields.

Highlight. Whether the spooled file contains text that is to appear darker than the surrounding text.

Valid values are Y (yes) or N (no).

Hold file before written. Whether the file is held. The hold parameter handles this function on a Create Printer File (CRTPRTF), Override Printer File (OVRPRTF), or Change Printer File (CHGPRTF) command.

The possible values are:


Internal job identifier. The internal identifier for the job. Only the IBM i APIs use this identifier, not any other interface on the system. The identifier is not valid following an initial program load (IPL). If you attempt to use it after an IPL, an exception occurs.This identifier is always valid when used with the internal spooled file identifier as input to IBM i APIs. For spooled files which have been detached from their jobs or which are on independent disk pools, this value is not valid as input to some IBM i APIs, such as the Retrieve Job Information (QUSRJOBI) API, that take this value without the internal spooled file identifier.

Internal spooled file identifier. The value used as input to other programs to improve the performance of locating the spooled file on the system. Only the IBM i APIs use this identifier, not any other interface on the system. The identifier is not valid following an initial program load (IPL) or if the spooled file has been moved between auxiliary storage pools (ASPs). If you attempt to use an invalid internal spooled file identifier, an exception occurs.

Internet print protocol job identifier. The IPP job identifier assigned by the system based on the output queue to which the file was added or moved. This value ranges from 1 to 2147483647 and is not guaranteed to be unique for a given output queue.

IPDS pass-through. Whether IPDS pass-through is done for the spooled file. Not all SCS or IPDS spooled files are eligible for IPDS pass-through. They may contain special functions that require transform to AFPDS for correct printing. IPDS pass-through allows only those spooled files eligible for IPDS pass-through to bypass the extra transforms. Those spooled files not eligible for IPDS pass-through will still undergo the transforms to AFPDS and back to IPDS. IPDS pass-through will not be valid for all PSF/400 supported printers. Any printer (or attachment) that does not support resident fonts cannot support IPDS pass-through. This is because the resident font references in the data stream must be mapped to host fonts that are downloaded to the printer. All IBM IPDS printers, execpt for the following, can be supported with IPDS pass-through: 3820, 3825, 3827, 3828, 3829, 3831, 3835, 3900-001 and any printer attached using Print Services Facility for the OS/2® distributed print function.


IPDS transparent data. Whether the file contains data from System/36 PRPQs.

Valid values are Y (yes) or N (no).

IPP job name. The IPP job name associated with the creation of the spooled file. This attribute is in the CCSID identified by the CCSID of IPP attributes field.

IPP job name natural language. The natural language in which the IPP job name was encoded. This attribute is in the CCSID specified by the CCSID of IPP attributes field. The possible values returned are defined in RFC 1766.

IPP job-originating user name. The name of the user that submitted the IPP job request that created the spooled file. This attribute is in the CCSID identified by the CCSID of IPP attributes field.

IPP job-originating user name natural language. The natural language in which the IPP job-originating user name was encoded. This attribute is in the CCSID specified by the CCSID of IPP attributes field. The possible values returned are defined in RFC 1766.

IPP printer name. The name of the IPP printer that created the spooled file. This attribute is in the CCSID specified in the CCSID of IPP attributes field.

Job character ID specified. Whether the graphic character set and code page of the spooled file is taken from the coded character set identifier (CCSID) of the job.

Valid values are Y (yes) or N (no).

Job name. The name of the job that owns the spooled file.

Job number. The number of the job that owns the spooled file.

Job system name. The name of the system where the job that created this spooled file ran.

Justification. The percentage that the output is right-justified. The possible values are 100, 50, or 0.

Last page printed. The number of the last printed page in the file if printing ended before the job completed processing.

Length of each user-defined option entry. The length, in bytes, of each user-defined option entry.

Length of IPP attributes. The length, in bytes, of the IPP specific spooled file attributes.

Length of page. The length of a page. Units of measurement are specified in the measurement method field.

Length of edge-stitch staple offset entry. The length, in bytes, of each edge-stitch staple offset entry.

Length of library list entry. The length, in bytes, of each library list entry.

Length of saddle-stitch staple offset entry. The length, in bytes, of each saddle-stitch staple offset entry.

Length of save and restore attributes. The length, in bytes, of the save and restore specific spooled file attributes.

Length of user resource library list entry. The length, in bytes, of each user resource library list entry.

Lengths present. Whether the 8-byte length information is present in the print text data buffers for format SPLF0200.

Valid values are Y (yes) or N (no).

Library name. The name of a library.

Line spacing. How a file's line data records are spaced when printed. This information is returned only for *LINE and *AFPDSLINE printer device type files.

The possible values are:


Lines per inch. The number (in tenths) of lines per vertical inch defined in the printer file. A value of 40 indicates 4 lines per inch.

Lines per inch changes. Whether the lines per inch (lpi) changes within the spooled file.

Valid values are Y (yes) or N (no).

Lines-per-inch (lpi) value not supported. The lines-per-inch (lpi) value is represented in a 1440th-inch value and is not equivalent to 4, 6, 8, 9, or 12. This field applies only to OfficeVision files. It is N for all other spooled files.

Valid values are Y (yes) or N (no).

Maximum forms width. The maximum forms width (in positions) as specified on the printer file.

Maximum records. The maximum number of records allowed in the file at the time the file was opened. A value of 0 indicates no maximum.

Maximum spooled data record size. The length of the largest record in the file. For LINE, AFPDSLINE, and AFPDS files, this length is the length of the largest record in the file. For all other file types, this length is the same as the spooled file buffer size.

Measurement method. The measurement method used for the length of page and width of page fields.

The possible values are:


Multi-byte data. Whether the file can contain double-byte character set (DBCS) data, Unicode data, or both. The options are *YES or *NO.

Multiple up (pages per side). The number of logical pages that print on each side of each physical page when this file is printed. The possible values are 1, 2, 3, and 4.

Natural language of IPP attributes. The natural language in which the IPP attributes were encoded. This attribute is in the CCSID specified in the CCSID of IPP attributes field. The possible values returned are defined in RFC 1766. The spooled file attribute affected is:

Net ID where file originated. The network ID of the system where the spooled file data stream was originally generated for this spooled file.

Number of buffers. The number of buffers currently in the file. If the file is still open when the fields are retrieved, the number of buffers is the number of buffers written to the file thus far.

Number of edge-stitch staple offset entries. The number of edge-stitch staple offset entries returned in this format. Only complete entries are returned. Each edge-stitch staple offset entry represents one staple in the edge-stitch.

The valid values are:


Number of font array entries. The number of font equivalence array entries used. (The maximum number of font equivalence entries is currently 48.)

Number of library list entries. The number of entries in the library list.

Number of resource library entries. The number of entries in the resource library array used.

Number of saddle-stitch staple offset entries. The number of saddle-stitch staple offset entries returned in this format. Only complete entries are returned. Each saddle-stitch staple offset entry represents one staple in the saddle-stitch.

The valid values are:


Number of separators. The number of file separator pages placed at the beginning of each copy of this file.

Number of user-defined options returned. The number of user-defined option entries returned in this format. Only complete entries are returned.

Number of user resource library list entries. The number of user resource library list entries returned in this format. Only complete entries are returned.

The valid values are:


OfficeVision. Whether the spooled file is generated by the OfficeVision licensed program.

Valid values are Y (yes) or N (no).

Offset from edge-stitch reference edge. Specifies, in either inches or centimeters (specified in the Unit of measure (UOM) field), how far from the edge-stitch reference edge that the edge-stitch is to be placed.

The possible values are:


Offset to edge-stitch staple offset list. The offset to the information about each staple offset entry. Each entry contains the staple offset for that staple.

Offset to IPP attributes. The offset to the IPP specific spooled file attributes. This value is set to 0 if the spooled file was not create through IPP.

Offset to library list. The offset to the list of libraries for the job at the time the spooled file was created. Each entry contains the name of a library.

Offset to saddle-stitch staple offset list. The offset to the information about each staple offset entry. Each entry contains the staple offset for that staple.

Offset to Save and Restore spooled file attributes. The offset to the save and restore specific spooled file attributes. This value is set to 0 if the spooled file was not saved or restored.

Offset to user-defined options. The offset to information about each user-defined option entry. Each entry contains the user-defined option.

Offset to user resource library list. The offset to the information about each user resource library list entry. Each entry contains the user resource library. When the offset is set to 0, there are no user resource libraries.

IBM i-created AFPDS. Whether the spooled file was created on a System i™ platform with a printer file that has the device type (DEVTYPE) parameter set to *AFPDS.

Output bin. The output bin that the printer uses for the printed output.

The possible values are:


Output priority. The priority of the output file. The priority ranges from 1 (highest) to 9 (lowest).

Output queue library name. The name of the library that contains the output queue.

Output queue name. The name of the output queue where the file is located.

Overflow line number. The last line to be printed before the data being printed overflows to the next page.

Page count estimated. Whether the total number of pages is actual or an estimated count.

Valid values are Y (yes) or N (no).

The total page count is estimated in the following situations:

Page definition library name. The name of the library in which the page definition resides. This information is returned only for *LINE or *AFPDSLINE printer device type files.

Page definition name. The name of the page definition to use for the file. This information is returned only for *LINE or *AFPDSLINE printer device type files.

Page groups. Whether the spooled file contains page groups as indicated by the DDS keywords STRPAGGRP and ENDPAGGRP. The possible values are Y (yes) or N (no).

Page length. The page length (in lines per page) used by the spooled file. The valid range is row 1 through 255. The value used should not exceed the actual length of the page used.

Page level index tags. Whether the spooled file contains page level index tags as indicated by the DDS keyword DOCIDXTAG with a tag level of PAGE. The possible values are Y (yes) or N (no).

Page or record being written. The page number or record number currently being written. The page number may be lower or higher than the page number actually being printed because of buffering done by the system. The page number shown may be zero if:

Page position. Whether page positioning errors are reported.

Valid values are Y (yes) or N (no).

Page rotate. Whether the spooled file changes the page rotation to be used within the file.

Valid values are Y (yes) or N (no).

Page rotation. The degree of rotation of the text on the page, with respect to the way the form is loaded into the printer.

The possible values are:

Page width. The page width (in characters per printed line) used by the spooled file. The valid range is column 1 through 378, although some printers have a page width less than 378. The value should not exceed the actual width of the page used.

Point size. The point size in which this file's characters (defined by the printer font field) should be printed.

Print fidelity. The kind of error handling that is performed when printing.

The possible values are:


Print on both sides (duplex). How the information prints.

The possible values are:


Print quality. The print quality that is used when printing this output.

The possible values are:


Print text. The text that is printed at the bottom of each page of printed output and on separator pages.

Printer device type. The type of data stream used to represent the file.

The possible values are:


Printer font. The printer font used. If *DEVD is shown, the printer uses the font defined in the printer device description. If *CPI is shown, the file is printed with a font that has the pitch specified by the CPI (character per inch) field.

Profile name of spooled file owner. The name of the user profile that owns the spooled file.

Program that opened file library name. The name of the library that contains the program that opened the file.

Program that opened file name. The name of the program that opened the spooled file.

Record format. The format of the records.

The possible values are:


Record format name present in data stream. A record format name exists in columns 1-10 of a line data record or columns 2-11 if spooled file contains print control characters. This is not to be confused with DDS record formats. Valid values are Y (yes) or N (no).

Record length. The length of the file's records. If the field shows -1 (the special value for *RCDFMT), this is an externally defined file, and the length is included in the file definition. The length includes the extra length of 1 for carriage controls.

Reduce output. The manner in which multiple logical pages print on each side of a physical page.

The possible values are:


Replace unprintable characters. Whether characters that cannot be printed are to be replaced with another character. The options are Y (yes) or N (no).

Replacement character. The character that replaces any unprintable characters. This field has a value if the replace unprintable characters field specifies Y.

Reserved. The field is reserved.

Resource library array. The library names in the library list to use when the spooled file is printed. The variable returns a maximum of 63 ten-character library names. If more than 63 resource libraries are used, a 1 is returned in the 631st character of the variable; otherwise, the 631st character is blank. Use of this field should be for compatibility reasons only. All new development should use the offset to library list, number of library list entries, and length of library list entry fields to access the spooled file's library list located at the end of format SPLA0200.

Restart printing. The number of the page where printing restarts. When you specify a value while the file is printing, the writer stops printing and restarts on the specified page. If the file is not currently printing, this change takes effect after the first copy prints.

The possible values are:


Saddle-stitch number of staples. The number of staples in the saddle-stitch.

The valid values are:


Saddle-stitch reference edge. The edge of the paper to be used as a reference in determining where the saddle stitching is to be located.

Valid values are:


Saddle-stitch staple offset. For the spooled file, the placement of staples along the finishing margin in either inches or centimeters (specified in the Unit of measure (UOM) field). The finishing margin can be thought of as an imaginary line parallel to the edge of the paper where the staples will be placed. The position of the finishing margin is the center of the paper relative to the physical edge.

If you want the staples placed parallel to the left edge of the paper, specify the offset of the first staple by measuring from the point where the finishing margin intersects the bottom edge of paper to where you want the center of the staple to be. For subsequent staples, specify the offset by measuring from the same point (not from the previous staple).

If you want the staples placed parallel to the top edge of the paper, specify the offset of the first staple by measuring from the point where the finishing margin intersects the left edge of paper to where you want the center of the staple to be. For subsequent staples, specify the offset by measuring from the same point (not from the previous staple).

The possible values are:


Save command. The command used to save the spooled file. The field is blank if the spooled file was not saved.

Save device. The type of device to which the spooled file was last saved. The field is *SAVF if the last save operation was to a save file. The field is *TAP if the last save operation was to tape. The field is *OPT if the last save operation was to optical. The field is blank if the spooled file was not saved.

Save file after written. Whether this file is to be saved after it is written.

The possible values are:


Save file library name. The name of the library that contains the save file if the spooled file was saved to a save file. The field is blank if the spooled file was not saved to a save file.

Save file name. The name of the save file if the spooled file was saved to a save file. The field is blank if the spooled file was not saved to a save file.

Save label. The file label used when the spooled file was saved. This field is blank if the spooled file was not saved to tape or optical. This field corresponds to the value specified for the LABEL or OPTFILE parameter on the command used to save the spooled file.

Save sequence number. The tape sequence number assigned when the spooled file was saved on tape. If the spooled file was not saved to tape, the field contains zeros.

Save volume ID. The tape or optical volumes that are used for saving the spooled file. This field returns a maximum of 10 six-character volumes. The volume IDs begin in character positions 1, 8, 15, 22, 29, 36, 43, 50, 57, and 64. Each volume ID entry is separated by a single character. If the spooled file was saved in parallel format, the separator character contains a 2 before the first volume in the second media file, a 3 before the third media file, and so on, up to a 0 before the tenth media file. Otherwise, the separator characters are blank. If more than 10 volumes are used and the spooled file was saved in serial format, 1 is returned in the 71st character of this field. If the spooled file was saved in parallel format, a 2 is returned in the 71st character of this field. Otherwise, the 71st character is blank. The field is blank if the spooled file was last saved to a save file or if it was never saved.

SCS data. Whether the spooled file is created with SCS already in the input data.

Valid values are Y (yes) or N (no).

Set exception. Whether the file has the SCS Set Exception Action (SCS) command in the data stream.

Valid values are Y (yes) or N (no).

Set Line Density command. Whether the lines per inch (lpi) changes within the spooled file or is specified with the Set Line Density SCS command.

For DEVTYPE(*SCS), a Set Line Density command is contained in the spooled file.

Valid values are Y (yes) or N (no).

Source drawer. The drawer to be used when the automatically cut form feed option is selected.

The possible values are:


Spooled file buffer size. The maximum size of a spooled file buffer. Valid lengths are 512 and 4079.

Spooled file creation authentication method. The authentication method used when the spooled file was created. The possible values are:

Spooled file creation security method. The security method used when the spooled file was created. The possible values are:

Spooled file level. The level of the spooled file in Version, Release, and Modification level format (VxRxMx).

Spooled file name. The name of the spooled file whose information is retrieved.

Spooled file number. The spooled file number of the specified file.

Spooled file size. The spooled file size. Multiply this field by the spooled file size multiplier field to get the size of the spooled file in number of bytes. The spooled file size is the data stream size plus the "overhead" storage used to store the spooled file's data stream.

Spooled file restored date and time. The date and time, in local job time, that the spooled file was last restored. This field is blank if the spooled file was not restored. The date and time is in the CYYMMDDHHMMSS format as follows:


Spooled file saved date and time. The date and time, in local job time, that the spooled file was last saved. This field is blank if the spooled file was not saved. The date and time is in the CYYMMDDHHMMSS format as follows:


Spooled file size multiplier. The number to multiply the spooled file size field by to get the spooled file size in number of bytes.

Starting page. The page at which printing is to start for the file.

The possible values are:


Status. The status of the file is one of the following values:


Subscript. Whether the spooled file contains subscript.

Valid values are Y (yes) or N (no).

Superscript. Whether the spooled file contains superscript.

Valid values are Y (yes) or N (no).

System where file originated. The name of the system where the spooled file data stream was originally generated for this spooled file. If the creating system was a System i product running OS/400® version 2 or earlier, the address of the user that sent the file is displayed.

When the name of the system where this spooled file was created cannot be determined, the receiving system name is used. For example, a file sent using SNDNETSPLF DTAFMT(*RCDDATA).

System/36 procedure name. The name of the procedure running when the spooled file was created.

System/36 spooled file identifier. The 6-character identifier assigned to the spooled file.

The possible formats are:

System/38 text utility flags. The flag for advanced functions.

When you create a file that will contain data that has never been spooled before, set the field to hexadecimal zeros (hex 00).

S36 CONTINUE-YES. The file was created with the System/36 environment OCL statement "// PRINTER CONTINUE-YES" in effect. See the System/36 Environment Reference manual, SC41-4731, for more information.

This field should only be changed by IBM i.

A spooled file created in this manner can change its overflow line number and maximum print position from within its print data stream. When it is printed, the writer needs to know that the page size may have changed and it needs to reset the printer before printing the next spooled file. Otherwise, the next spooled file printed may cause a printer error or data loss. The options are Y (yes) or N (no).

Time file opened (created). The time, in local job time, that the file was opened in the HHMMSS format where:


Time writer began processing spooled file. The time, in local job time, that a spooling writer started processing the spooled file. This field is set to blanks if the file has not been processed by a writer. The time is in the HHMMSS format where:


Time writer completed processing spooled file. The time, in local job time, that a spooling writer completed processing the spooled file or the time the processing of the spooled file was aborted. This field is set to blanks if the file has not been processed by a writer or the writer has not completed processing the file. The time is in the HHMMSS format where:


Total copies. The total number of copies to be produced for this printer file.

Total pages. The number of pages this printer file contains.

Total records. If the spooled file data stream is *AFPDS, *AFPDSLINE, or *LINE or the spooled file device type is diskette, this field contains the total number of records in the printer file or the diskette file. The field is blank if the file is open.

Transparency. Whether the SCS Transparency command is used in the spooled file. It is set to N for all other device type files, such as IPDS.

For DEVTYPE(*SCS), a TRANSPARENT SCS command is contained in the spooled file.

Valid values are Y (yes) or N (no).

TRC for 1403. Whether the file contains 1403 line data with table-reference characters (TRC). This field is only used for device types *LINE and *AFPDSLINE.

Valid values are Y (yes) or N (no).

Unit of measure. The unit of measure to use for specifying distances. The unit of measure is used with certain parameters of the printer file. Page definitions and form definitions are examples of these parameters.

The possible values are:


Unrecognizable data. Whether the file contains SCS commands that are not valid because of one of the following:

Valid values are Y (yes) or N (no).

User name. The name of the user that owns the spooled file.

User object type. The type of the user-defined object.

The following values are supported:


User-defined data. Data defined by the user to be used by user applications or user-specified programs that process spooled files.

The following values are supported:


User-defined file. Whether the spooled file was created by using an API.

The possible values are:


User-defined object library name. The name of the library that contains the user-defined object.

User-defined object name. The name of the user-defined object that is used by user applications or user-specified programs that process spooled files.

The following values are supported:


User-defined option. The option defined by the user to be used by user applications or user-specified programs that process spooled files.

The possible values are:


User-defined text. User-defined text taken from the interactive user profile when the spooled file was created.

User-generated data stream. Whether the data stream has been validated by a system program on the System i platform when the file was spooled, for example, the OfficeVision program.

Valid values are Y (yes) or N (no).

User-specified data. The 10 characters of user-specified data that describe the file.

User who owned file. The name of the user profile that owns this file. If the spooled file was created on a System i platform running OS/400 version 2 or earlier, the user id that sent the file is displayed.

When the name of the user profile that owned this file cannot be determined, the name of the receiving user profile is used. For example, a file sent using SNDNETSPLF DTAFMT(*RCDDATA).

User resource library. The name of the user resource library.

Volumes (array). The diskette volumes used for saving the object. The variable returns a maximum of 10 six-character volumes. The volume IDs begin in character positions 1, 8, 15, 22, 29, 36, 43, 50, 57, and 64. If more than 10 volumes are used, a 1 is returned in the 71st character of the variable; otherwise, the 71st character is blank. The variable is returned blank if the object was saved to a save file, or if it was never saved.

Width of drawer 1. The width in inches of the paper in drawer 1. This field is for internal use and should be set to 0 by an application building this format as opposed to retrieving the fields.

Width of drawer 2. The width in inches of the paper in drawer 2. This field is for internal use and should be set to 0 by an application building this format as opposed to retrieving the fields.

Width of page. The width of a page. Units of measurement are specified in the measurement method field.

3812 SCS. Whether the spooled file contains fonts supported only on the 3812 printer.

For DEVTYPE(*SCS), a Set Coded Font Local command with a global ID of greater than 255 is contained in the spooled file.

Valid values are Y (yes) or N (no).

3812 SCS commands. Whether the file contains commands that are not valid on the 3812 printer.

Valid values are Y (yes) or N (no).

5A present. Whether the 5A hexadecimal constant is present in all AFPDS data for the file (in format SPLF0200).

Valid values are Y (yes) or N (no).

5219 commands. Whether the file contains commands that are not valid on a 5219 printer. The data stream contains one or more of the following SCS commands which, either are not valid on a 5219 or contain parameters that are not valid.

Valid values are Y (yes) or N (no).


Error Messages



API Introduced: V1R3

[ Back to top | >Print APIs | APIs by category ]