Sinu
Here is a sample program that will read an input file and write into another one. I have not provided any file handling or error handling. Just GET and PUT. Also note that this program will return a return code
0 in all codition since I'm initialising R(15).
Anyway here is something to start with ..
Code:
FILEASM CSECT
STM 14,12,12(13)
BALR 12,0
USING *,12
ST 13,SAVE+4
LA 13,SAVE
OPEN (INDCB,(INPUT))
OPEN (OUTDCB,(OUTPUT))
IOLOOP MVC INAREA,=80C' '
GET INDCB,INAREA
MVI OUTCARR,C' '
MVC OUTLINE(80),INAREA
PUT OUTDCB,OUTAREA
B IOLOOP
FINISH CLOSE (INDCB)
CLOSE (OUTDCB)
EXIT L 13,SAVE+4
LM 14,12,12(13)
XR 15,15
BR 14
INDCB DCB DSORG=PS,MACRF=(GM),DDNAME=SYSIN,EODAD=FINISH, X
RECFM=FB,LRECL=80,BLKSIZE=0
OUTDCB DCB DSORG=PS,MACRF=(PM),DDNAME=OUTPUT, X
RECFM=FBA,LRECL=133,BLKSIZE=0
INAREA DS CL80
OUTAREA DS 0CL133
OUTCARR DC CL1' '
OUTLINE DC CL132' '
SAVE DS 18F
END
You don't have to specify RMODE to 24. You can specify AMODE(31),RMODE(ANY). Go thru the manual for more details.
I take the above program and assemble/link it in the unix enviroment.
How do I specify the in and out DD statements to the program trying
to invoke it from the unix environment.