OFFLINE CSECT
USING *,12
SAVE (14,12),,*
LR 12,15
LA 15,SAVEAREA
ST 15,8(,13)
ST 13,4(,15)
LR 13,15
OPEN (PRINT,OUTPUT)
LA 3,OUTLINE+4
LA 4,OUTLINE+78
NEXTUNIT UCBSCAN COPY,WORKAREA=UCBSWORK,UCBAREA=UCBSUCB, ?
DYNAMIC=YES,RANGE=ALL,DEVCLASS=DASD
LTR 15,15
BNZ DONE
TM (UCBSTAT-UCBOB)+UCBSUCB,UCBONLI
BO NEXTUNIT
CR 3,4
BL ADDUNIT
LA 0,OUTLINE
SR 3,0
STCM 3,B'0011',OUTLINE
PUT PRINT,(0)
LA 3,OUTLINE+4
ADDUNIT MVI 0(3),C' '
UNPK 1(5,3),(UCBCHAN-UCBOB)+UCBSUCB(3)
TR 1(4,3),HEXTAB
LA 3,5(,3)
B NEXTUNIT
DONE LA 0,OUTLINE
SR 3,0
STCM 3,B'0011',OUTLINE
PUT PRINT,(0)
CLOSE PRINT
FREEPOOL PRINT
L 13,4(,13)
RETURN (14,12),T,RC=0
SAVEAREA DC 9D'0'
PUSH PRINT
PRINT NOGEN
PRINT DCB DSORG=PS,MACRF=PM,DDNAME=SYSPRINT,RECFM=VBA,LRECL=125
POP PRINT
UCBSUCB DC XL48'0'
UCBSWORK DC XL100'0'
HEXTAB EQU *-C'0'
DC C'0123456789ABCDEF'
LTORG ,
OUTLINE DC AL2(*-*,0),CL121' '
PUSH PRINT
PRINT NOGEN
DCBD DSORG=QS,DEVD=DA
IEFUCBOB ,
POP PRINT
END OFFLINE