(The code is mainframe assembler but is based on the z390 emulator.)
TITLE 'PROGRAM 4 80/80 LISTING'
PRINT NOGEN
COPY SUBENTRY
WTO 'PROG4 COPY INFILE (ASCII) TO OUTFILE (ASCII)'
OPEN (DATAIN,INPUT,INFILE,OUTFILE)
OPEN (SUMMARY,OUTPUT)
WTO 'Files opened successfully'
*
LOOP EQU *
GET INFILE,IRECORD
MVC ORECORD,=CL133' '
MVC ORECORD(80),IRECORD
PUT OUTFILE,ORECORD
B LOOP
*
EOF EQU *
CLOSE (INFILE,,OUTFILE)
WTO 'PROG4 ENDED OK'
SUBEXIT
ENDDATAÂ Â DSÂ Â 0HÂ
     CLOSE (DATAIN,,SUMMARY)Â
     SUBEXITÂ
INFILE DCB DDNAME=INFILE, X
DSORG=PS, X
RECFM=FT, X
LRECL=80, X
EODAD=EOF, X
MACRF=GM
*
OUTFILE DCB DDNAME=OUTFILE, X
DSORG=PS, X
RECFM=FT, X
LRECL=133, X
MACRF=PM
*
DATAIN  DCB DDNAME=INPUT,        X
       DSORG=PS,         X
       EODAD=ENDDATA,        X
       LRECL=80,         X
       RECFM=FT,         X
       MACRF=GMÂ
SUMMARY DCB DDNAME=OUTPUT,        X
       BLKSIZE=130,        X
       LRECL=13,         X
       DSORG=PS,         X
       RECFM=FT,         X
       MACRF=PMÂ
IRECORD DC CL80' '
ORECORD DC CL133' '
END COPY
PRINT NOGEN
COPY SUBENTRY
WTO 'PROG4 COPY INFILE (ASCII) TO OUTFILE (ASCII)'
OPEN (DATAIN,INPUT,INFILE,OUTFILE)
OPEN (SUMMARY,OUTPUT)
WTO 'Files opened successfully'
*
LOOP EQU *
GET INFILE,IRECORD
MVC ORECORD,=CL133' '
MVC ORECORD(80),IRECORD
PUT OUTFILE,ORECORD
B LOOP
*
EOF EQU *
CLOSE (INFILE,,OUTFILE)
WTO 'PROG4 ENDED OK'
SUBEXIT
ENDDATAÂ Â DSÂ Â 0HÂ
     CLOSE (DATAIN,,SUMMARY)Â
     SUBEXITÂ
INFILE DCB DDNAME=INFILE, X
DSORG=PS, X
RECFM=FT, X
LRECL=80, X
EODAD=EOF, X
MACRF=GM
*
OUTFILE DCB DDNAME=OUTFILE, X
DSORG=PS, X
RECFM=FT, X
LRECL=133, X
MACRF=PM
*
DATAIN  DCB DDNAME=INPUT,        X
       DSORG=PS,         X
       EODAD=ENDDATA,        X
       LRECL=80,         X
       RECFM=FT,         X
       MACRF=GMÂ
SUMMARY DCB DDNAME=OUTPUT,        X
       BLKSIZE=130,        X
       LRECL=13,         X
       DSORG=PS,         X
       RECFM=FT,         X
       MACRF=PMÂ
IRECORD DC CL80' '
ORECORD DC CL133' '
END COPY