Command reference / CL
RTVJOBA
Retrieve Job Attributes
Used in a CL program or REXX procedure to retrieve the values of one or more attributes of the job in which the command runs, and place them into the specified CL variables. If an attribute is now supported only at thread level, the thread's value is returned. The CL prompt shows the minimum variable length for each parameter: one number for character variables, and two numbers (length and decimal positions) for decimal variables.
Allowed environments: *BPGM, *IPGM, *BREXX, *IREXX.
Use within a CL program.
Positional parameters: 3.
Restrictions
- Valid only within a CL program or a REXX procedure.
- Conditionally threadsafe. The Attribute Scope and Thread Safety table on the page gives the scope (job or thread) and threadsafe status of each attribute; RTNCDE is not threadsafe.
Parameters
JOB
CL var for JOB (10)
Receives the job name. The variable must be a character variable of at least 10 characters.
USER
CL var for USER (10)
Receives the user profile name the job was started with. This is the second part of the qualified job name.
NBR
CL var for NBR (6)
Receives the 6-character job number. This is the first part of the qualified job name.
CURUSER
CL var for CURUSER (10)
Receives the current user profile name. The variable must be a character variable of at least 10 characters.
TYPE
CL var for TYPE (1)
SUBTYPE
CL var for SUBTYPE (1)
SYSLIBL
CL var for SYSLIBL (165)
CURLIB
CL var for CURLIB (10)
Receives the name of the thread's current library. The variable must be at least 10 characters.
*NONE- Returned if the thread has no current library.
USRLIBL
CL var for USRLIBL (2750)
Receives the user portion of the thread's library list, with each library name in an 11-character field. If the variable is too small, an exception is signaled and no names are returned.
ASPGRP
CL var for ASPGRP (10)
LOGLVL
CL var for LOGLVL (1)
LOGSEV
CL var for LOGSEV (2 0)
LOGTYPE
CL var for LOGTYPE (10)
LOGCLPGM
CL var for LOGCLPGM (10)
LOGOUTPUT
CL var for LOGOUTPUT (10)
JOBMSGQMX
CL var for JOBMSGQMX (2 0)
JOBMSGQFL
CL var for JOBMSGQFL (10)
INQMSGRPY
CL var for INQMSGRPY (10)
STSMSG
CL var for STSMSG (7)
BRKMSG
CL var for BRKMSG (7)
DEVRCYACN
CL var for DEVRCYACN (13)
RTNCDE
CL var for RTNCDE (5 0)
ENDSTS
CL var for ENDSTS (1)
PRTDEV
CL var for PRTDEV (10)
OUTQ
CL var for OUTQ (10)
OUTQLIB
CL var for OUTQLIB (10)
SPLFACN
CL var for SPLFACN (10)
PRTTXT
CL var for PRTTXT (30)
PRTKEYFMT
CL var for PRTKEYFMT (10)
SRTSEQ
CL var for SRTSEQ (10)
SRTSEQLIB
CL var for SRTSEQLIB (10)
LANGID
CL var for LANGID (3)
CNTRYID
CL var for CNTRYID (2)
CCSID
CL var for CCSID (5 0)
DFTCCSID
CL var for DFTCCSID (5 0)
Receives the default coded character set identifier used for the job. The variable must be a 5-digit decimal with no decimal positions.
CHRIDCTL
CL var for CHRIDCTL (10)
DECFMT
CL var for DECFMT (1)
DATFMT
CL var for DATFMT (4)
DATSEP
CL var for DATSEP (1)
TIMSEP
CL var for TIMSEP (1)
DATE
CL var for DATE (6)
Receives the job date assigned when the job started, in job-date format. The variable must be at least 6 characters.
CYMDDATE
CL var for CYMDDATE (7)
DATETIME
CL var for DATETIME (20)
Receives the current local date and time of the job, in YYYYMMDDHHNNSSXXXXXX format, where X is microseconds. The variable must be at least 20 characters.
DAYOFWEEK
CL var for DAYOFWEEK (4)
TIMZON
CL var for TIMZON (10)
TIMZONABBR
CL var for TIMZONABBR (10)
TIMZONFULL
CL var for TIMZONFULL (50)
TIMOFFSET
CL var for TIMOFFSET (3 0)
YEAROFS
CL var for YEAROFS (3 0)
ACGCDE
CL var for ACGCDE (15)
Receives the accounting code for the job. The variable must be at least 15 characters.
SWS
CL var for SWS (8)
RUNPTY
CL var for RUNPTY (2 0)
Receives the job's processing priority, a 2-digit value from 1 through 99. This is the highest run priority allowed for any thread in the job.
TIMESLICE
CL var for TIMESLICE (7 0)
PURGE
CL var for PURGE (10)
DFTWAIT
CL var for DFTWAIT (7 0)
SBMMSGQ
CL var for SBMMSGQ (10)
SBMMSGQLIB
CL var for SBMMSGQLIB (10)
DDMCNV
CL var for DDMCNV (5)
TSEPOOL
CL var for TSEPOOL (10)
THDRSCAFN
CL var for THDRSCAFN (20)
RSCAFNGRP
CL var for RSCAFNGRP (10)
Examples
RTVJOBA NBR(&JOBNBR) DATE(&JOBDATE) DFTCCSID(&DFTCSID)
Retrieves the job number, job date, and default CCSID of the job the command runs in. &JOBNBR and &JOBDATE must be 6 characters and &DFTCSID must be 5. The date format follows the QDATFMT system value.
RTVJOBA USRLIBL(&LIBL)
Saves the user portion of the library list in &LIBL so the list can be restored after a temporary CHGLIBL change. Blanks are returned if the user portion is empty, and '*DELETED' appears for any library that has been deleted.
Generated from os/cl/catalog/RTVJOBA.json and os/cl/help/RTVJOBA.json.