COZZI-Retrieve SPOOL File Attr (RTVSPLFA)
Where allowed to run:
- Batch program (*BPGM)
- Interactive program (*IPGM)
- Batch ILE CL module (*BMOD)
- Interactive ILE CL module (*IMOD)
Threadsafe: No
|
Parameters
Examples
Error messages |
The COZZI-Retrieve SPOOL File Attr (RTVSPLFA) command retrieve SPOOL File Attributes for the indicated SPOOL File. If the SPOOL file is unknown, use the special value SPLFNAME(*LAST) and specify the JOB and SPLNBR parameters to identify the SPOOL file whose attributes are retrieved. Use RTVSPLFA in your CL programs to supplement the CHGSPLFA and DSPSPLF commands. For example if you call a program and want to display its output to the end user immediately, use RTVSPLFA SPLFNAME(*LAST) to retrieve the name of that SPOOL file, and pass that name to the other commands, commands that require an actual SPOOL File Name.
Restrictions:
- This command is only valid in a CL program.
Keyword |
Description |
Choices |
Notes |
SPLFNAME |
SPOOL file name |
Name, *LAST, *ANY |
Optional, Positional 1 |
JOB |
Job name |
Single values: *, *CURRENT, *ALL Other values: Qualified job name |
Optional, Positional 2 |
Qualifier 1: Job name |
Name |
Qualifier 2: User |
Name |
Qualifier 3: Job number |
000000-999999 |
SPLNBR |
SPOOL file number |
-2-999999, *LAST, *ONLY, *ANY, -2, -1, 0 |
Optional, Positional 3 |
USRPRF |
User profile |
Name, *JOB |
Optional |
RTNSPLFNAM |
CL var for SPLFNAM Char(10) |
Character value |
Optional |
RTNSPLNBR |
CL var for SPLNBR Dec(7 0) |
Decimal number |
Optional |
RTNJOB |
CL var for Job name Char(10) |
Character value |
Optional |
RTNUSER |
CL var for Job User Char(10) |
Character value |
Optional |
RTNJOBNBR |
CL var for Job Nbr Char(6) |
Character value |
Optional |
RTNOWNER |
CL var for SPLF OWNER Char(10) |
Character value |
Optional |
RTNOUTQ |
CL var for OUTQ Name Char(10) |
Character value |
Optional |
RTNOUTQLIB |
CL var for OUTQ LIB Char(10) |
Character value |
Optional |
RTNFORM |
CL var for FORM Type Char(10) |
Character value |
Optional |
RTNUSRDTA |
CL var for USER DATA Char(10) |
Character value |
Optional |
RTNHOLD |
CL var for HOLD Char(10) |
Character value |
Optional |
RTNSAVE |
CL var for SAVE Char(10) |
Character value |
Optional |
RTNCOPIES |
CL var for COPIES Dec(7 0) |
Decimal number |
Optional |
RTNPAGES |
CL var for PAGE Count Dec(7 0) |
Decimal number |
Optional |
RTNEXPDAT |
CL var for EXP DATE Char( 7) |
Character value |
Optional |
SPOOL file name (SPLFNAME)
Specifies the SPOOL File name whose attributes are returned.
- *LAST
- The attributes are retrieved for the last SPOOL file created in the job regardless of the SPOOL File name. Use this parameter when you want to retrieve the attributes for the most recently created SPOOL file in the job, regardless of its SPOOL File name.
- name
- Specify the name of the SPOOL file whose attributes are to be retrieved.
Job name (JOB)
Specifies standard qualified job ID that created the SPOOL file.
Single values
- * or *CURRENT
- The current job (the one running the RTVSPLFA command is searched for the SPOOL File.
SPOOL file number (SPLNBR)
Specifies SPOOL file number.
- *LAST
- The SPOOL File with the highest SPOOL File number is retrieved. If the SPOOL File name is also *LAST, the last SPOOL File created by the JOB is retrieved. If the SPOOL File name is NOT *LAST, the last SPOOL File created with the same name as the SPLFNAME parameter is retrieved.
- *ONLY
- A rarely used option when the SPOOL File Name is specified and only one instance of it exists in the job and you want that instance. Similar to using *LAST but would normally generate an error if more than one SPOOL File exists with the same name.
- *ANY
- Any SPOOL File that matches the SPLFNAME parameter is retrieved.
- 0-999999
- Specify the unique SPOOL File Number (for this job)
User Profile (USRPRF)
Specifies the User Profile whose SPOOL file attributes are returned. This parameter is only valid with the following parameter options: SPLNBR(*LAST) SPLNBR(*ANY), SPLFNAME(*LAST) or SPLFNAME(*ANY)
- *JOB
- The user profile associated with the JOB identified on the JOB parameter is used to retrieve the SPOOL file attributes.
- user profile name
- Specify the name of a user whose SPOOL file attributes are retrieved. When SPLNBR(*ANY) or SPLNBR(*ALL) is specified, or when SPLFNAME(*ANY) or SPLFNAME(*ALL) is specified, this parameter restricts the list that is searched to only those for the specified user profile. This parameter is useful when retrieving the SPOOL file attributes for JOB(*ALL) where a large number of entries can be generated, slowing the search time. Using the USRPRF parameter can reduce the number of entries searched by the system to match the specific SPOOL file being requested, thereby improving performance in this situation.
CL var for SPLFNAM (RTNSPLFNAM)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File Name
CL var for SPLNBR (RTNSPLNBR)
Specify a TYPE(*DEC) LEN(7 0) CL variable to receive the SPOOL File Number
CL var for SPLF OWNER (RTNOWNER)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File Owner
CL var for OUTQ Name (RTNOUTQ)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File Output Queue Name
CL var for OUTQ Library (RTNOUTQLIB)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File Output Queue Library Name
CL var for FORM Type (RTNFORM)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File Forms Type
CL var for USER DATA (RTNUSRDTA)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File User Data
CL var for HOLD (RTNHOLD)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File HOLD(*YES | *NO) status
CL var for SAVE (RTNSAVE)
Specify a TYPE(*CHAR) LEN(10) CL variable to receive the SPOOL File SAVE(*YES | *NO) status
CL var for COPIES (RTNCOPIES)
Specify a TYPE(*DEC) LEN(7 0) CL variable to receive the SPOOL File COPIES (number of copies to print)
CL var for PAGE Count (RTNPAGES)
Specify a TYPE(*DEC) LEN(7 0) CL variable to receive the SPOOL File Page Count
CL var for EXP DATE (RTNEXPDAT)
Specify a TYPE(*CHAR) LEN(7) CL variable to receive the SPOOL File Expiration Date in CYYMMDD format. Use the IBM CVTDAT command to convert the date to another format.