Example: SOURCE and NUMBER output
In the portion of the listing shown below, the programmer numbered two of the statements out of sequence. The note numbers in the listing correspond to numbered explanations that follow the listing.
(1)
LineID PL SL ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+----7-|--+----8 Map and Cross Reference
(2) (3) (4)
000870 /****************************************************************
000871 *** D O M A I N L O G I C **
000872 *** **
000873 *** Initialization. Read and process update transactions until **
000874 *** EOE. Close files and stop run. **
000875 *****************************************************************
000876 procedure division.
000877 000-do-main-logic.
000878 display "PROGRAM IGYTCARA - Beginning".
000879 perform 050-create-vsam-main-file. 930
000880 perform 100-initialize-paragraph. 982
000881 read update-transaction-file into ws-transaction-record 203 338
000882 at end
000883 1 IA4390 set transaction-eof to true 253
000884 end-read.
000885 IA4410 perform until transaction-eof 253
000886 1 perform 200-edit-update-transaction 1050
000887 1 IA4430 if no-errors 372
000888 2 perform 300-update-commuter-record 1159
000889 1 else
000890 2 perform 400-print-transaction-errors 1312
000891 1 end-if
000892 1 perform 410-re-initialize-fields 1373
000893 1 IA4480 read update-transaction-file into ws-transaction-record 203 338
000894 1 at end
000895 2 IA4500 set transaction-eof to true 253
000896 1 IA4510 end-read
000897 IA4520 end-perform.
000898 close commuter-file update-transaction-file location-file 180 203 192
000899 print-file. 216
000900
000901 *----------------------------------------------------*
000902 * File status checked after I/O operation. *
000903 *----------------------------------------------------*
000904
000905 IA4600 if not i-o-okay 241
000906 1 display "000-close"
000907 1 move 0000 to comp-code 230
000908 1 IA4620 perform 500-vsam-error 1386
000909 1 perform 900-abnormal-termination 1432
000910 IA4630 end-if.
000911 *********************************************************
000912 * Paragraphs 1100 and 1200 illustrates the intrinsic *
000913 * function computations. *
000914 *********************************************************
000915 perform 1100-print-i-f-headings. 1441
000916 perform 1200-print-i-f-data. 1481
000917 display " ".
000918 display " ".
000919 display "PROGRAM IGYTCARA - Normal end".
000920 stop run.
- (1)
- Scale line, which labels Area A, Area B, and source-code column numbers
- (2)
- Source-code line number assigned by the compiler
- (3)
- Program (PL) and statement (SL) nesting level
- (4)
- Columns 1 through 6 of program (the sequence number area)