MACRO @V407595 00001000
TRACE &CODE=,®WRK1,®WRK2,®WRK3 @V407595 00002000
LCLA &ID,® @V407595 00003000
LCLC &NL1,&TRACEID @V407595 00004000
GBLB &AP @V407595 00005000
&NL1 SETC '&SYSNDX'(2,3) @V407595 00006000
&TRACEID SETC '&CODE' @V407595 00007000
&ID SETA K'&CODE @V407595 00008000
AIF (&ID EQ 0).ERR3 @V407595 00009000
AIF ('&CODE'(1,1) NE '(').NOTREG @V407595 00010000
AIF ('&CODE'(&ID,1) NE ')').ERR3 @V407595 00011000
&ID SETA &ID-2 @V407595 00012000
&TRACEID SETC '&CODE'(2,&ID) @V407595 00013000
® SETA 1 @V407595 00014000
.NOTREG ANOP @V407595 00015000
AIF (&ID EQ 0).ERR3 @V407595 00016000
AIF (T'®WRK1 EQ 'O' OR T'®WRK2 EQ 'O').ERR1 @V407595 00017000
AIF (T'®WRK3 EQ 'O' ).ERR1 @V407595 00018000
AIF ('&AP' EQ '0').INITUP @V407595 00019000
L ®WRK3,PREFIXA FORCE TRACE REFERENCES TO @V407595 00020000
* ABSOLUTE 0. 00021000
TRC1&NL1 EQU * @V407595 00022000
L ®WRK1,TRACCURR(®WRK3) CURRENT TRACE PTR @V407595 00023000
LA ®WRK2,16(,®WRK1) SET PTR TO NXT TRACE @V407595 00024000
* ENTRY 00025000
C ®WRK2,TRACEND(®WRK3) END OF TRACE TABLE ? @V407595 00026000
BNE TRC2&NL1 NO - TRACE PTR IS OK @V407595 00027000
L ®WRK2,TRACSTRT(®WRK3) YES - RESET POINTER @V407595 00028000
* TO BEGINNING OF TABLE. 00029000
TRC2&NL1 EQU * @V407595 00030000
TM APSTAT1,APUOPER IS APU OPERATIONAL ? @V407595 00031000
BO TRC3&NL1 YES - USE CS LOGIC @V407595 00032000
ST ®WRK2,TRACCURR(®WRK3) NO - UPDATE PTR TO 00033100
* NEXT AVAILABLE TRACE ENTRY. 00033200
AIF (® NE 1).INITMVI @V407595 00034000
STC &TRACEID,0(®WRK1) STORE TRACE IDENTIFIER @V407595 00035000
AGO .SKIPMVI @V407595 00036000
.INITMVI ANOP @V407595 00037000
MVI 0(®WRK1),&TRACEID STORE TRACE IDENTIFIER @V407595 00038000
.SKIPMVI ANOP @V407595 00039000
B TRC4&NL1 TRACE NOW COMPLETE @V407595 00040000
TRC3&NL1 EQU * @V407595 00041000
CS ®WRK1,®WRK2,TRACCURR-PSA(®WRK3) UPDATE @V407595 00042000
* NXT AVAILABLE TRACE ENTRY PTR 00043000
BNE TRC1&NL1 CS UNSUCCESSFUL-TRY AGAIN @V407595 00044000
AIF (® NE 1).XINTMVI @V407595 00045000
STC &TRACEID,0(®WRK1) STORE TRACE IDENTIFIER @V407595 00046000
AGO .XSKPMVI @V407595 00047000
.XINTMVI ANOP @V407595 00048000
MVI 0(®WRK1),&TRACEID STORE TRACE IDENTIFIER @V407595 00049000
.XSKPMVI ANOP @V407595 00050000
OC 0(1,®WRK1),TRACPROC SET PROCESSOR IDENTIFIER @V407595 00051000
TRC4&NL1 EQU * @V407595 00052000
MEXIT @V407595 00053000
.INITUP ANOP @V407595 00054000
L ®WRK1,TRACCURR OBTAIN NXT AVAILABLE TRACE ENTRY 00055000
* @V407595 00056000
LA ®WRK2,16(,®WRK1) SETUP TO UPDATE TRACCURR 00057000
* @V407595 00058000
C ®WRK2,TRACEND END OF TRACE TABLE ? @V407595 00059000
BNE TRC1&NL1 NO - UPDATE TRACCURR @V407595 00060000
L ®WRK2,TRACSTRT YES - POINT TO BEGINNING OF TABLE 00061000
* @V407595 00062000
TRC1&NL1 EQU * @V407595 00063000
ST ®WRK2,TRACCURR UPDATE NEXT AVAILABLE TRACE 00064000
* ENTRY POINTER @V407595 00065000
AIF (® NE 1).YINTMVI @V407595 00066000
STC &TRACEID,0(®WRK1) STORE TRACE IDENTIFIER @V407595 00067000
AGO .YSKPMVI @V407595 00068000
.YINTMVI ANOP @V407595 00069000
MVI 0(®WRK1),&TRACEID STORE TRACE IDENTIFIER @V407595 00070000
.YSKPMVI ANOP @V407595 00071000
MEXIT @V407595 00072000
.ERR1 MNOTE 8,'WORK REGISTERS REQUIRED, ARE OMITTED' @V407595 00073000
MEXIT @V407595 00074000
.ERR3 MNOTE 8,'INVALID CODE= VALUE SPECIFIED' @V407595 00075000
MEXIT @V407595 00076000
MEND @V407595 00077000