General
Application area: | Requesting and accessing lists and tables; see "Requesting and accessing lists and tables" |
Macro type: | Type S, MF format 2: standard/C/D/L/E form; see "S-type macros" |
The JOBINFO macro is an extension of the JINF macro in that it supplies information about individual jobs selected by the user by means of their TSNs. Note that information about spoolout jobs cannot be obtained in this way.
A job begins with the SET-LOGON-PARAMETERS command and ends with the EXIT-JOB command. A job can also be created by transferring a procedure file to the system with the ENTER-PROCEDURE command. A job is categorized in a job class by the operating system according to its job data (attributes). Both user-specific (accounting) data and jobspecific data (job name, job class, job priority, start time,...) are included in the job data. The user submits the latter specifications to the operating system in the SET-LOGON-PARAMETERS or ENTER-JOB / ENTER-PROCEDURE command.
Macro description
The JOBINFO macro transfers a list of job data to an output area. The job must have
been submitted to the Job Management System by entering either the SET-LOGON-PARAMETERS, ENTER-JOB or ENTER-PROCEDURE command, i.e. the inquiry can refer to an interactive job, a batch job or a job in the job pool that has not yet been started. The job is identified via its TSN. Nonprivileged users only receive information about jobs running under their own user IDs or about jobs started under their own user IDs. The FORM operand serves to control the amount of information output.
FORM=SHORT supplies the following items of information:
TSN of the job, user ID, account number, job class, job name, job type (interactive job, batch job, job in job pool), requested CPU time, start attributes (SOON, EARLIEST,...,DAILY, WEEKLY,..), (requested) start date, (requested) start time.
FORM=LONG additionally supplies the following items of information:
retry interval and number of job repetitions, job priority, RERUN and FLUSH data, (real) start date, (real) start time, spoolin data, spoolin time, name of monitoring job variable, name of the SYSCMD (Enter) file, length of job parameter, job parameter, BCAM name (if the job is running on a computer other than the home computer), TSN of the task issuing the macro call.
The I/O area is created immediately following the standard header. It begins with the (input) field for the job's TSN. Entries in this field must be made dynamically whenever the C/D form of a macro is used. The input field is followed by the output area whose length can be obtained from a list generated with MF=C/D. Initialization values are entered in the standard header.
Macro format and description of operands
JOBINFO |
[TSN='tsn' / addr / (r)] ,FORM=LONG / SHORT ,CONST=YES / NO ,MF=S / E / L / C / D [,PARAM=addr / (r)] ,PREFIX=J / p ,MACID=OBI / macid |
TSN=
TSN (job number) of the job about which information is requested. Nonprivileged users can only specify jobs running under their own user IDs or that have been started in their own user IDs. System administration is allowed to request information about any job.
'tsn'
Job number (TSN). Default value: tsn=' '
(4 blanks): this means that job data for the calling program is output.
addr
Symbolic address (name) of the 4-byte field containing the TSN.
(r)
Register containing the TSN (right-justified).
FORM=
Controls the amount of information output, cf. macro description.
LONG
Full-length information output.
SHORT
Abbreviated information output.
CONST=
Determines whether equates are to be entered in the output list in order to facilitate the interpretation of field contents. CONST can be specified in conjunction with MF=C/D only.
YES
Equates are entered.
NO
No equates are entered.
MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. PREFIX, MACID and PARAM), see "S-type macros". The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
A PREFIX can be specified in the C form or D form of the macro and additionally a MACID in the C form (see section “S-type macros”).
Return information and error flags
Standard header:
+---------------+ | | | | | |c|c|b|b|a|a|a|a| +---------------+
A return code relating to the execution of the JOBINFO macro is transferred in the standard header (cc=Subcode2, bb=Subcode1, aaaa=Maincode):
X'cc' | X'bb' | X'aaaa' | Meaning |
X'00' | X'00' | X'0000' | Function has been executed. |
X'00' | X'01' | X'0001' | Job data of calling job not found in job management. |
X'00' | X'02' | X'0001' | Job has not been submitted to the Job Management System; no job data |
X'00' | X'03' | X'0001' | Job has not been submitted to the Job Management System; no job data |
X'00' | X'01' | X'0003' | System error: internal interface error |
X'00' | X'02' | X'0003' | System error: job data not accessible |
X'00' | X'03' | X'0003' | System error: no memory space available. |
X'00' | X'00' | X'0004' | Authorization error: e.g. specified TSN assigned to different user ID. |
Other return codes which, in accordance with conventions, apply to all macros are given in the table “Standard return codes” (Standard header).
The following errors cause the calling program to be aborted:
The data area has not been assigned to the calling program.
The data area is not aligned on a word boundary.
The data area is write-protected.