Compaq AAQ2G1FTK Marine Radio User Manual


 
Developing Compaq COBOL Programs
1.1 Compaq COBOL and Alpha Architecture System Resources
1.1.3.2 ANSI Reference Format
ANSI format is useful on a card-oriented system or in an application where
strict ANSI compliance is desired. To select ANSI format, specify the
-ansi
flag
(on Tru64 UNIX systems) or the /ANSI_FORMAT qualifier (on OpenVMS Alpha
systems) at compile time. You can choose this format if your COBOL program is
written for a compiler that uses ANSI format.
For ANSI format, the compiler expects 80-character program lines. The following
table shows the structure and content of an ANSI reference source line:
Character Positions Contents
1 to 6 Optional sequence numbers
7 Indicators
8 to 11 Area A
12 to 72 Area B
73 to 80 Optional Area
For more information about the two reference formats, see the Compaq COBOL
Reference Manual.
1.1.3.3 Converting Between Reference Formats
The REFORMAT utility allows you to convert a terminal format program to ANSI
format and vice versa. You can also use REFORMAT to match the formats of
Compaq COBOL source files and library files when their formats are not the
same. See Chapter 14 for a description of the REFORMAT utility.
1.2 Developing Programs on Tru64 UNIX
This section briefly describes the Tru64 UNIX commands (commands used at the
operating system prompt) that you use to create, compile, link, and run Compaq
COBOL programs on Tru64 UNIX systems.
1.2.1 Creating a Compaq COBOL Program on Tru64 UNIX
Use a text editor, such as
vi
or
emacs
, to create and revise your source files. For
instance, to edit the file
prog1.cob
using the
vi
editor, type:
% vi prog1.cob
Figure 1–1 shows the basic steps in Compaq COBOL program development on
Tru64 UNIX systems.
When naming a source file, choose one of the four file name extensions that the
cobol
compiler recognizes as COBOL file suffixes. These suffixes are:
Developing Compaq COBOL Programs 1–7