I'm also trying to properly understand how to take three inputs from a file.
One last note: if you're thinking about inflammatory comments, or comments between yourselves about the way I suck I would prefer it if you kept them in PM's/other topics where it's the actual subject/wherever.
PAYROLL SUBENTRY
OPEN (INPUT,(INPUT),PRINTER,(OUTPUT))
READLOOP DS 0H
GET INPUT,INREC
MVC PRNTLINE,=CL133' '
MVC OUTNUM,INNUM
MVC PAY,=X'5C202020206B2021204B2020'
PACK THIRD,INNUM
PACK GROSS,INCOME
PACK DEDUCT,DED
* SP GROSS,DEDUCT
* ZAP MUL,DEDUCT
MP DEDUCT,DEDUCT
* ZAP MUL,GROSS
MP GROSS,THIRD
* ZAP MUL,GROSS
MP GROSS,THIRD
* ZAP SUB,DEDUCT
SP DEDUCT,=P'100'
* BC 2,POSITIVE
BC 4,NEGATIVE
* BC 8,ZERO
ED PAY,GROSS
B PRINT
POSITIVE DS 0H
MVC PAY,=CL12'POSITIVE'
NEGATIVE DS 0H
MVC PAY,=CL12'NEGATIVE'
ZERO DS 0H
MVC PAY,=CL12'ZERO'
PRINT DS 0H
PUT PRINTER,PRNTLINE
B READLOOP
ENDDATA DS 0H
CLOSE (INPUT,,PRINTER)
SUBEXIT
*
GROSS DS PL5
DEDUCT DS PL5
THIRD DS PL5
INREC DS CL26
INNUM EQU INREC,8
INCOME EQU INREC+9,8
DED EQU INREC+18,8
*INNUM EQU INREC+27,8
PRNTLINE DS CL133
OUTNUM EQU PRNTLINE+1,8
PAY EQU PRNTLINE+10,12
INPUT DCB DDNAME=PAYIN, X
DSORG=PS, X
EODAD=ENDDATA, X
LRECL=26, X
MACRF=(GM), X
RECFM=FT
PRINTER DCB BLKSIZE=1330, X
DDNAME=REPORT, X
DSORG=PS, X
LRECL=133, X
MACRF=(PM), X
RECFM=FBA
END PAYROLL
OPEN (INPUT,(INPUT),PRINTER,(OUTPUT))
READLOOP DS 0H
GET INPUT,INREC
MVC PRNTLINE,=CL133' '
MVC OUTNUM,INNUM
MVC PAY,=X'5C202020206B2021204B2020'
PACK THIRD,INNUM
PACK GROSS,INCOME
PACK DEDUCT,DED
* SP GROSS,DEDUCT
* ZAP MUL,DEDUCT
MP DEDUCT,DEDUCT
* ZAP MUL,GROSS
MP GROSS,THIRD
* ZAP MUL,GROSS
MP GROSS,THIRD
* ZAP SUB,DEDUCT
SP DEDUCT,=P'100'
* BC 2,POSITIVE
BC 4,NEGATIVE
* BC 8,ZERO
ED PAY,GROSS
B PRINT
POSITIVE DS 0H
MVC PAY,=CL12'POSITIVE'
NEGATIVE DS 0H
MVC PAY,=CL12'NEGATIVE'
ZERO DS 0H
MVC PAY,=CL12'ZERO'
PRINT DS 0H
PUT PRINTER,PRNTLINE
B READLOOP
ENDDATA DS 0H
CLOSE (INPUT,,PRINTER)
SUBEXIT
*
GROSS DS PL5
DEDUCT DS PL5
THIRD DS PL5
INREC DS CL26
INNUM EQU INREC,8
INCOME EQU INREC+9,8
DED EQU INREC+18,8
*INNUM EQU INREC+27,8
PRNTLINE DS CL133
OUTNUM EQU PRNTLINE+1,8
PAY EQU PRNTLINE+10,12
INPUT DCB DDNAME=PAYIN, X
DSORG=PS, X
EODAD=ENDDATA, X
LRECL=26, X
MACRF=(GM), X
RECFM=FT
PRINTER DCB BLKSIZE=1330, X
DDNAME=REPORT, X
DSORG=PS, X
LRECL=133, X
MACRF=(PM), X
RECFM=FBA
END PAYROLL