Advertisement
jelledebock

Control break processing

Oct 31st, 2014
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
COBOL 0.56 KB | None | 0 0
  1. open file
  2. read first record
  3. perform until eof
  4.     move countryName to countryNameWS
  5.     move 0 to countryTOtal
  6.    
  7.     perform until countryName IS NOT countryNameWS or EOF
  8.         move customerName to customerNameWS
  9.         move 0 to custTotal
  10.    
  11.         perform until custName IS NOT custNameWS or countryName IS NOT countryNameWS or EOF
  12.             add sales to custTotal
  13.             read next record
  14.         end-perform
  15.         //break in customer(Name)
  16.         display custNameWS & custTotal
  17.         add custTotal to countryTotal
  18.     end-perform
  19.     //break in country
  20.     dispaly countryNameWS & countryTotal
  21. end-perform
  22. close file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement