* %/* THIS MAKES THE BAL VERSION LOOK LIKE A PL/S MACRO COMMENT 00042002 * /* MACCOMP Y-1 SC1C5/PZD81 */ 00044002 * /* MACSTAT Y-1 72237/015157 */ 00046002 * /* MACDATE Y-1 72237 */ 00048002 * /* 00048402 MACRO 00050002 &NAME DOM &MSG=,&MSGLIST=,&REPLY= 00100002 .********************************************************************** 00150002 .* * 00200002 .* THIS MACRO WAS REWRITTEN FOR OS/VS2 RELEASE2. * 00250002 .* * 00300002 .* VERSION 01 DATE 6/1/72 * 00350002 .* * 00400002 .* TESTS ARE DOCUMENTED BY EXPLAINING WHAT IS BEING TESTED. * 00450002 .* THE COMMENT AFTER THE AIF (FALSE PATH) WILL EXPLAIN WHAT CONDITION* 00500002 .* WAS FOUND. THE COMMENT BEFORE THE TRUE TARGET WILL EXPLAIN THE * 00550002 .* MEANING OF THE TRUE CONDITION. * 00600002 .********************************************************************** 00650002 LCLA &RPYINDC REPLY OPERAND INDICATOR 00700002 &RPYINDC SETA 0 INIT TO REPLY OPERAND NOT PRESENT 00750002 .* CHECK IF REPLY KEYWORD IS PRESENT. 00800002 AIF (T'&REPLY EQ 'O').DOML2 00850002 .* REPLY OPERAND IS PRESENT. CHECK IF IT IS 'YES'. 00900002 AIF ('&REPLY' EQ 'YES').DOML1 00950002 .* REPLY OPERAND IS IN ERROR 01000002 MNOTE 4,'*** REPLY OPERAND NOT YES. REPLY KEYWORD IGNORED.' 01050002 AGO .DOML2 01100002 .DOML1 ANOP REPLY OPERAND WAS 'YES' BRANCH PT 01150002 &RPYINDC SETA 4 SHOW THAT REPLY = YES USED 01200002 .* CHECK IF THERE IS AN ERROR IN MSG-MSGLIST KEYWORDS 01250002 .DOML2 AIF ((T'&MSG NE 'O' AND T'&MSGLIST EQ 'O' ) OR X01300002 (T'&MSG EQ 'O' AND T'&MSGLIST NE 'O')).DOML3 01350002 .* THERE IS AN ERROR IN MSG, MSGLIST USAGE. ISSUE ERROR MESSAGE 01400002 .* CHECK IF BOTH MSG AND MSGLIST ARE PRESENT. 01450002 AIF (T'&MSG NE 'O' AND T'&MSGLIST NE 'O').DOML2A 01500002 .* ERROR DUE TO BOTH KEYWORDS MISSING. 01550002 IHBERMAC 24 01600002 MEXIT 01650002 .DOML2A ANOP ERROR DUE TO BOTH PRESENT 01700002 MNOTE 12,'*** BOTH MSG AND MSGLIST SPECIFIED. USE JUST ONE.' 01750002 MEXIT 01800002 .* A VALID KEYWORD IS SPECIFIED. CHECK IF IT IS MSG KEYWORD. 01850002 .DOML3 AIF (T'&MSG EQ 'O').DOML7 PROCESS MSGLIST IF TEST TRUE 01900002 .* YES, MSG SPECIFIED. IS OPERAND CORRECT 01950002 AIF ('&MSG'(1,1) EQ '(' AND '&MSG(1)' GE '1' AND X02000002 '&MSG(1)' LE '12').DOML4 02050002 .* NO, OPERAND IS INCORRECT 02100002 IHBERMAC 18 02150002 MEXIT 02200002 .* YES, OPERAND IS CORRECT. CHECK IF REGISTER 1. 02250002 .DOML4 AIF ('&MSG(1)' NE '1').DOML5 02300002 .* YES, REGISTER IS 1. CHECK IF &NAME WAS SPECIFIED. 02350002 AIF (T'&NAME EQ 'O').DOML6 02400002 .* &NAME WAS SPECIFIED, PUT OUT A LABEL 02450002 &NAME DS 0H 02500002 AGO .DOML6 02550002 .* NO, REGISTER 1 NOT SPECIFIED. NOVE ADDRESS TO REGISTER 1. 02600002 .DOML5 ANOP REGISTER IS 2 - 12. MOVE IN TO REG 1 02650002 &NAME LR 1,&MSG(1) .MOVE MSG ID TO REGISTER 1 02700002 .DOML6 ANOP 02750002 LA 0,&RPYINDC.(0,0) .LOAD MSG/REPLY INDICATOR YM1995 02800002 SVC 87 .ISSUE DOM SVC 02850002 MEXIT 02900002 .* VALID KEYWORD WAS MSGLIST. 02950002 .DOML7 ANOP 03000002 &RPYINDC SETA &RPYINDC+8 INCREMENT INDICATOR BY 8 FOR MSGLIST. 03050002 .* CHECK IF OPERAND IS AN ADDRESS NAME 03100002 AIF ('&MSGLIST'(1,1) EQ '(').DOML9 03150002 .* OPERAND IS A NON PARENTHSIZED NAME. THEREFORE IT IS AN ADDR NAME. 03200002 &NAME LA 1,&MSGLIST .PUT ADDRESS OF ID LIST IN REGISTER 1 03250002 AGO .DOML12 LOOP AROUND FALSE PART OF LAST TEST 03300002 .* OPERAND IS PARENTHESIZED REGISTER. CHECK IF IN RANGE 1 TO 12. 03350002 .DOML9 AIF ('&MSGLIST(1)' GE '1' AND '&MSGLIST(1)' LE '12').DOML10 03400002 .* NO, INVALID REGISTER SPECIFIED. ISSUE ERROR MESSAGE 03450002 IHBERMAC 18 03500002 MEXIT 03550002 .* A VALID REGISTER WAS SPECIFIED. SEE IF IT IS REGISTER 1 03600002 .DOML10 AIF ('&MSGLIST(1)' NE '1').DOML11 03650002 .* YES IT IS REGISTER 1. PUT OUT LABEL IF PRESENT 03700002 AIF (T'&NAME EQ 'O').DOML12 03750002 .* LABEL IS PRESENT 03800002 &NAME DS 0H 03850002 AGO .DOML12 03900002 .* NO, NOT REGISTER 1. PUT OUT LR INSTRUCTION. 03950002 .DOML11 ANOP 04000002 &NAME LR 1,&MSGLIST(1) .MOVE LIST ADDRESS TO REGISTER 1 04050002 .DOML12 ANOP PUT OUT REST OF MSGLIST 04100002 .* CHECK IF REPLY KEYWORD SPECIFIED 04150002 AIF (&RPYINDC EQ 8).DOML13 04200002 .* REPLY WAS SPECIFIED 04250002 LA 0,&RPYINDC.(0,0) .LOAD MSGLIST/REPLY INDICATOR YM1995 04300002 AGO .DOML14 04350002 .DOML13 ANOP 04400002 LNR 0,1 .INDICATE MSGLIST ONLY 04450002 .DOML14 ANOP 04500002 SVC 87 .ISSUE DOM SVC 04550002 MEXIT 04600002 MEND 04650002 **/ 04660002 *DOM: MACRO KEYS( MSG, /* SINGLE MESSAGE ID IS PASSED */ 06500002 * MSGLIST, /* A LIST OF UP TO 60 IDS IS PASSED */ 06800002 * REPLY); /* DELETE WTORS AS WELL AS WTOS */ 07100002 * ANS('?'||MACLABEL||'DOMP '||MACLIST||MACKEYS||';'); 07150002 *%END; 07200002