General
Application area: | Requesting and accessing lists and tables; see "Requesting and accessing lists and tables" |
Macro type: | Type O/type R; see "O-type macros"Type S, MF format 1: 31-bit interface |
O-type macro expansion does not make use of any registers.
The SVCs used differ, depending on the macro form.
Macro description
The GEPRT macro provides information on the CPU time used by the job since SET-LOGON-PARAMETERS and/or the CPU time still available for the executing program.
The CPU time still available is determined from the time limit allowed for execution of the program (as specified in the START-EXECUTABLE-PROGRAM command, CPU-LIMIT operand); or, if this operand was omitted, from the time limit for the job (i.e. either the specified time or the default value in the SET-LOGON-PARAMETERS command).
Fields must be created in order to receive the program time data (provided in zoned decimal format).
Calling the macro without specifying any operands (type R) will provide the CPU time used since SET-LOGON-PARAMETERS. This information (in TODR format) is passed to the user in registers R0 and R1. Without operands, the function executes considerably faster than when calling the macro with operands (only 220 instructions for type R, as opposed to 550 for type S or O).
Macro format and description of operands
GEPRT |
[ { [addr1] [,addr2] / [(r1)] [,(r2)] } [,FORMAT=B8]] [,PARMOD=31] [,MF=L / (E,..) / D] ,PREF=G / p |
addr1
Symbolic address of a 6-byte field. The CPU time already used by the job is entered in this field.
Field length = 8 bytes if the operand FORMAT=B8 is specified.
(r1)
Register containing the address value “addr1”. If PARMOD=31, the address value may not be transferred in register R1.
addr2
Symbolic address of a 6-byte field. The remaining (maximum) CPU time for the program or the job is entered into this field.
Field length = 8 bytes if the operand FORMAT=B8 is specified.
(r2)
Register containing the address value “addr2”. If PARMOD=31, the address value may not be transferred in register R1.
FORMAT=B8
The time information is provided in the format hhhhmmss (hhhh=hours, mm=minutes, ss=seconds).
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 PREF (1 letter, default setting: G) can be specified in the D form of the macro (see "S-type macros").
PARMOD=
Controls macro expansion. If PARMOD is not specified here, macro expansion is performed according to the specification for the GPARMOD macro or according to the default value for the assembler (= 24-bit interface).
31
The 31-bit interface is generated. Data lists and instructions use 31-bit addresses (address space <= 2 Gb). Data lists start with the standard header.
Functional description
The CPU time is supplied in zoned decimal format as a 6-digit string (hhmmss) or, if FORMAT=B8 is specified, as an 8-digit string (hhhhmmss).
Specifications for jobs with no CPU time limit (NTL):
Field for elapsed CPU time:
current value < 100h | current value >= 100h | |
6-byte field | current value | 99h 59min 59sec |
8-byte field | current value | current value |
Field for remaining CPU time:
6-byte field | 99h 59min 59sec |
8-byte field | 9999h 59min 59sec |
Note
The GEPRT macro transfers no return code. Addressing errors made by the user cause the system to generate the “address error” event (STXIT event class “unrecoverable program error”). The program is terminated with the flag “address error” unless an STXIT routine has been included in the program to deal with this event.
Example
GEPRT START PRINT NOGEN BALR 3,0 USING *,3 GEPRT FIELD1,FIELD2,FORMAT=B8 ———————————————————————————————— (1) WROUT OUTB,ERROR ERROR TERM **** DEFINITIONS ******* OUTB DC Y(OUTBE-OUTB) DS CL3 DC C'CPU TIME USED: ' FIELD1 DS CL8 DC C' AVAILABLE CPU TIME: ' FIELD2 DS CL8 OUTBE EQU * END
Runtime log:
/start-assembh % BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED % ASS6010 <ver> OF BS2000 ASSEMBH READY //compile source=*library-element(macexmp.lib,geprt), - // compiler-action=module-generation(module-format=llm), - // module-library=macexmp.lib, - // listing=parameters(output=*library-element(macexmp.lib,geprt)) % ASS6011 ASSEMBLY TIME: 337 MSEC % ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES % ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS % ASS6006 LISTING GENERATOR TIME: 80 MSEC //end % ASS6012 END OF ASSEMBH /start-executable-program library=macexmp.lib,element-or-symbol=geprt % BLS0523 ELEMENT 'GEPRT', VERSION '@' FROM LIBRARY ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS % BLS0524 LLM 'GEPRT', VERSION ' ' OF '<date> <time>' LOADED CPU TIME USED: 00000059 AVAILABLE CPU TIME: 00022901 ———————————————— (2)
(1) | Both the CPU time used since SET-LOGON-PARAMETERS and the CPU time still available for running the program are requested. |
(2) | The CPU time used since SET-LOGON-PARAMETERS and the CPU time still available for running the program are output. |