I am attempting to print some output using XPRNT in my program. We are using very basic/old assemler assist program and mvs batch to code everything.
My code basically reads in a employee number, hourly wage (in cents), hours worked, bonus (in cents), and deduction amount (in cents). I store these using XDECI into registers. Then do a simple IF statement to check if the hours worked is greater than 40, if it is, i have to take: (40 * wage) + (hours_worked - 40) * (wage * 2) = overtime pay...
ELSE
hours_worked * wage = pay
I then add the bonus, and subtract the deduction to get the NET pay.
I store the initial pay (gross pay) and then NET pay into registers.
I then want to print them like this:
Emp. Hourly Hours gross net
num wage worked bonus deductions pay pay
123456 3600 40 12000 11300 144000 144700
xxxx xxxx xxx xxxx xxxx xxxx xxxxx
But i cant seem to align my printing out correctly. If someone could take a look at my code, and see where i might be going wrong... first off here is my ouput:
PAYROLL REPORT -- JOHN JONES WIDGET COMPNAY EMPLOYEE
EMPLOYEE HOURLY HOURS GROSS NET N
NUMBER WAGE WORKED BONUS DEDUCTIONS PAY PAY
123456 0 72656 12000 11300 72656 40
841817 0 326499 1500 21400 306439 81
578382 0 346814 10500 12000 253157 25
328947 0 -762545 9500 9735 -925695 45
829030 0 -324174 1850 5580 -421251 30
And here is the code that does it:
calling line to print:
XPRNT PLINE,70 prints each data line
And print section:
PLINE DC C' ' start of line data
DC CL1' '
EMPNUM DS CL1 emp number
DC CL6' ' spaces x 5
WAGE DS CL6 wage hourly
DC CL4' ' space x 5
NETPAY DS CL6 hours worked
DC CL4' ' space x 5
BONUS DS CL6 bonus
DC CL6' ' space x 5
DEDUCT DS CL6 deductions
DC CL4' ' space x 5
GROSSPAY DS CL6 gross pay
DC CL4' ' space x 5
HOURS DS CL6 net pay
Anyone got any ideas how i could edit this code to print nicely....
Thank you... in the meantime, im going to attempt to get it figuring out the correct net and gross pay!
Thanks all