Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
COMPUTE WS-EARNINGS = RATE * HOURS
MOVE WS-EARNINGS TO PR-EARNINGS
COMPUTE PR-TAXES = WS-EARNINGS * TAX-RATE
[\CODE]
Note WS- fields are in WORKING-STORAGE and PR- fields are in the record I will print.
Of course, you also have to pay attention to data type. In the case of total fields, they should be a COMPUTATIONAL type because you're doing lots of arithmetic with them. Since you generally can't directly print COMPUTATIONAL fields in a pleasing way, you generally MOVE the total field to a print record field when it's time to print totals. E.G.:
Open files
Read first record
Perform until EOF
add record totals to working storage totals
Read next record
end perform
move working storage totals to print line totals
print the totals
close the files
stop run
Glenn