Sequence Numbers and Comments

The following rules apply to standard COBOL source files. They do not apply to COBFREE files, which are free-format files that do not have line numbers. COBOL statements can start in any column and go beyond column 72. They cannot have comments (tags).

In COBOL source files,the first six columns are reserved for the sequence number. This means that the first column of your text area is actually column 7. When a Qedit file has Set Lang Cobol, the first six columns are not displayed. Instead the sequence number is displayed, in the form 105.1. To check what columns some text is in, use the LT command (list template). You must remember the column numbers when using the Change command to insert or delete columns. For example, you might want to shift the first column three spaces to the right by inserting blanks.

  /change 1 "   "   {wrong!}  Error: Target  /change 7 "   "   {right}  

COBOL statements occupy columns 7 through 72 of each line. Columns 73 through 80 are reserved for comments. If you extend a COBOL statement into this area by accident, you get a compiler error. To keep this from happening, Qedit has two Set Lang values for COBOL. Set Lang Cobol limits your line length to column 72, while Set Lang Cobolx allows you to use the comment area. In normal practice you would do initial development with Set Lang Cobol, then switch to Set Lang Cobolx during maintenance.

  /set lang cobolx  /c 73/80 "BobGreen"  

Sequence Numbers and Comments