Compaq COBOL AAQ2G1FTK User Manual

Page 58

Advertising
background image

Developing Compaq COBOL Programs
1.3 Developing Programs on OpenVMS Alpha

Figure 1–2 DCL Commands for Developing Programs

libraries

COMMANDS

Create a

source program

Run the

executable

image

EDIT/TPU PROG_1.COB
Use the file type of to
indicate the file contains a
Compaq COBOL program.

$

COB

LINK PROG_1
The command assumes
the file type of an input file
is .

LINK

OBJ

(If you use the qualifier,
the linker creates a map file.)

/MAP

$

RUN

EXE

RUN PROG_1
The command assumes
the file type of an image is

.

$

ACTION

PROG_1.COB

PROG_1.EXE

INPUT/OUTPUT FILES

Compile the

source program

Link the

object module

PROG_1.OBJ

(PROG_1.LIS)

COBOL PROG_1

$

The Command
assumes the file type of an
input file is .

COBOL

COB

(if you use the
qualifier, the compiler
creates a listing file.)

/LIST

(PROG_1.MAP)

VM-0611A-AI

Figure 1–2 shows the basic steps in Compaq COBOL program development.

Use the text editor of your preference to create and revise your source files. For
example, the following command line invokes the DECTPU editor and creates the
source file PROG_1.COB:

$ EDIT PROG_1.COB

The file type .COB is used to indicate that you are creating a Compaq COBOL
program. COB is the default file type for all Compaq COBOL programs.

The COPY Statement, Dictionaries and Libraries

Including the COPY statement in your program allows separate programs to
share common source text, reducing development and testing time as well as
storage requirements. You can use the COPY statement to access modules in
libraries. The COPY statement causes the compiler to read the file or module
specified during the compilation of a program. When the compiler reaches the
end of the included text, it resumes reading from the previous input file.

By using the /INCLUDE qualifier on the COBOL command line, you can set up a
search list for files specified by the COPY statement. For more information, see
the Compaq COBOL Reference Manual.

1–28 Developing Compaq COBOL Programs

Advertising