COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Creating or Altering an HP COBOL Source Program
The compiler accepts source lines from any sequential file. On NonStop systems, the most common
way to create or alter an HP COBOL source program is to use an HP editor or Starbase
Corporation’s Codewright smart language editor with HP Extensions for Codewright.
HP offers two editors, EDIT and PS TEXT EDIT (abbreviated “TEDIT”). Both editors create and allow
you to alter the same type of file, the EDIT format file (abbreviated “EDIT file”).
Both HP editors and Codewright smart language editor allow you to:
Create a new file
Enter lines in a file
Copy lines from one file into another file
Move lines from one place in a file to another place in the same file
Duplicate lines from one place in a file to another place in the same file
Delete lines from a file
Change one portion of text to another throughout a range of lines in a file
List the lines that a file contains
Whether or not you use an HP editor, your HP COBOL source file must conform to a reference
format that the compiler accepts.
Topics:
EDIT Files
Reference Format
EDIT Editor
TEDIT Editor
HP Tandem Extensions for Codewright (TEC)
EDIT Files
An EDIT format file (abbreviated “EDIT file”) is a specially formatted disk file. It is the only type of
file that the EDIT and TEDIT editors create or alter. The file-code value that the EDIT or TEDIT editor
assigns to an EDIT file is 101.
To use the EDIT or TEDIT editor on the contents of a non-EDIT file, create a new EDIT file and copy
the text of the non-EDIT file into it.
For more information about EDIT files, see the EDIT User’s Guide and Reference Manual.
Reference Format
Individual source program lines must follow a reference format that the compiler accepts. There
are two choices of reference format: Tandem and ANSI. Tandem 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 format
Continuation lines
Creating or Altering an HP COBOL Source Program 747