Ansi Reference Format; Converting Between Reference Formats; Developing Programs On Tru64 Unix; Creating A Compaq Cobol Program On Tru64 Unix - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

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
(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
1 to 6
7
8 to 11
12 to 72
73 to 80
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
instance, to edit the file
% 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
compiler recognizes as COBOL file suffixes. These suffixes are:
cobol
Developing Compaq COBOL Programs
Contents
Optional sequence numbers
Indicators
Area A
Area B
Optional Area
or
, to create and revise your source files. For
vi
emacs
prog1.cob
using the
vi
Developing Compaq COBOL Programs 1–7
-ansi
editor, type:
flag

Advertisement

Table of Contents
loading

Table of Contents