MACRO 00001000
&LABEL RDCARD &BUFFER,&LENGTH,&ERROR=*+4 00002000
LCLC &BUF,&LEN 00003000
CNOP 0,4 00004000
&LABEL DS 0H 00005000
AIF (T'&BUFFER EQ 'O').ERR1 00006000
&BUF SETC '&BUFFER' 00007000
AIF ('&BUFFER'(1,1) NE '(').SKIP1 00008000
&BUF SETC '0' 00009000
ST &BUFFER(1),DMS&SYSNDX.A 00010000
MVI DMS&SYSNDX.A,X'80' 00011000
.SKIP1 ANOP 00012000
&LEN SETC '80' 00013000
AIF (T'&LENGTH EQ 'O').SKIP2 00014000
&LEN SETC '&LENGTH' 00015000
AIF ('&LENGTH'(1,1) NE '(').SKIP2 00016000
&LEN SETC '0' 00017000
STH &LENGTH(1),DMS&SYSNDX.B 00018000
STH &LENGTH(1),DMS&SYSNDX.B+2 00019000
.SKIP2 ANOP 00020000
BAL 1,DMS&SYSNDX.C 00021000
DC CL8'CARDRD' 00022000
DMS&SYSNDX.A DC X'80',AL3(&BUF) 00023000
DMS&SYSNDX.B DC H'&LEN',H'&LEN' 00024000
DMS&SYSNDX.C SVC 202 00025000
DC AL4(*+4) 00026000
LH 0,DMS&SYSNDX.B+2 00027000
AIF ('&ERROR' EQ '*+4').EXIT 00028000
LTR 15,15 00029000
BNZ &ERROR 00030000
.EXIT MEXIT 00031000
.ERR1 MNOTE 8,'BUFFER ADDRESS NOT SPECIFIED' 00032000
MEND 00033000