I have taken a simple code and i am trying to write it in file. the cc=0 but its writing garbage the code is as below:
PROGRAM CSECT
*EGIN STM 14,12,12(13)
BEGIN BALR 12,0
USING *,12
ST 14,SAVEREG
L 5,X
S 5,Y
ST 5,Z
OPEN (PRINTER,(OUTPUT))
L 5,Z
CVD 5,BCD
UNPK SUM,BCD
OI SUM+9,X'F0'
PUT PRINTER,LINE
CLOSE (PRINTER)
* LA 15,0
L 14,SAVEREG
BR 14
X DC F'10'
Y DC F'5'
Z DS F
BCD DS D
LINE DS 1CL80
DC CL5''
DC C'THE SUB IS'
DC CL5''
SUM DS CL10
DC CL50''
PRINTER DCB DSORG=PS,MACRF=(PM),DDNAME=PRINT,RECFM=FB, X
LRECL=80
SAVE DS 18F
SAVEREG DS F
*EGIN STM 14,12,12(13)
BEGIN BALR 12,0
USING *,12
ST 14,SAVEREG
L 5,X
S 5,Y
ST 5,Z
OPEN (PRINTER,(OUTPUT))
L 5,Z
CVD 5,BCD
UNPK SUM,BCD
OI SUM+9,X'F0'
PUT PRINTER,LINE
CLOSE (PRINTER)
* LA 15,0
L 14,SAVEREG
BR 14
X DC F'10'
Y DC F'5'
Z DS F
BCD DS D
LINE DS 1CL80
DC CL5''
DC C'THE SUB IS'
DC CL5''
SUM DS CL10
DC CL50''
PRINTER DCB DSORG=PS,MACRF=(PM),DDNAME=PRINT,RECFM=FB, X
LRECL=80
SAVE DS 18F
SAVEREG DS F
can someone please tell me where i am making mistake ???