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
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......