COBOL Manual for TNS and TNS/R Programs

Source Program Organization and Format
HP COBOL Manual for TNS and TNS/R Programs522555-006
2-3
Reference Format for Source Program Lines
program-name
is a COBOL word. It names the same program unit that the PROGRAM-ID does
(see PROGRAM-ID Paragraph), for example:
IDENTIFICATION DIVISION.
PROGRAM-ID. MYPROG.
...
END PROGRAM MYPROG.
Reference Format for Source Program Lines
Individual source program lines must follow a reference format that the compiler
accepts. There are two choices of reference format: Tandem and ANSI. Tandem
reference format, an HP extension to COBOL, is less restrictive than ANSI. The
principal differences between the Tandem and ANSI formats are in:
Margin locations
Permitted line lengths
Absence of sequence number and identification field in Tandem reference format
You can write an HP COBOL program completely in either format or in a mixture of
both. The default is Tandem reference format. Unless you direct the compiler to accept
the ANSI format, the compiler assumes the entire program is in Tandem reference
format. (See ANSI and TANDEM.)
The rest of this topic describes the Tandem reference format. For information on the
ANSI reference format, see Section 16, ANSI Reference Format.
Lines in Tandem reference format are not restricted to a fixed length and can have up
to 132 characters (longer lines are truncated). The Tandem reference format has no
identification field. You can supply comments for your program on separate lines. See
Indicator Area.
Figure 2-1. Tandem Reference Format
Column:
Margin:
Area BArea A
Line
*n <= 132
21345678910...n*
Indicator Area
CA B R
VST500.vsd