3 developing programs on openvms alpha – Compaq COBOL AAQ2G1FTK User Manual

Page 57

Advertising
background image

Developing Compaq COBOL Programs

1.2 Developing Programs on Tru64 UNIX

The

strip

command removes symbolic and other debugging information to

minimize image size. For additional information, see strip(1).

Note

The CALL dataname, CANCEL, and the Compaq extensions to the
ACCEPT and DISPLAY statements will not work correctly if you use the

strip

command on your image.

In most instances, use the

cobol

command to invoke both the Compaq COBOL

compiler and the

ld

linker. To link one or more object files created by the Compaq

COBOL compiler, you should use the

cobol

command instead of the

ld

command,

because the

cobol

command automatically references the appropriate Compaq

COBOL Run-Time Libraries when it invokes

ld

. If the executable image is not in

your current working directory, specify the directory path in addition to the file
name.

Compilation does the following for you:

Detects errors in your program syntax

Displays compiler messages on your terminal screen

Generates machine language instructions from valid source statements

Groups the instructions into an object module for the linker

Launches the linker with the compiled file or files

Creates an executable image

You use the COBOL command to compile and link your program. The COBOL
command invokes the Compaq COBOL compiler driver that is the actual user
interface to the Compaq COBOL compiler. The compiler driver can accept
command options and multiple file names, and normally causes the compiler and
linker to process each file. A variety of qualifiers to the compile command are
available to specify optional processing and to specify the names of output files.

After the Compaq COBOL compiler processes the source files to create one
or more object files, the compiler driver passes a list of object files and other
information to the linker.

1.3 Developing Programs on OpenVMS Alpha

You use DCL commands (commands used at the OpenVMS Alpha system prompt)
to create, compile, link, and run Compaq COBOL programs on OpenVMS Alpha
systems.

1.3.1 Creating a Compaq COBOL Program on OpenVMS Alpha

To create and modify a Compaq COBOL program, you must invoke a text editor.
The default editor for OpenVMS Alpha is the DEC Text Processing Utility
(DECTPU). Other editors, such as EDT or the Language-Sensitive Editor (LSE),
may be available on your system. Check with your system administrator and
refer to the OpenVMS EDT Reference Manual (this manual has been archived
but is available on the OpenVMS Documentation CD-ROM) for more information
about EDT or the Guide to Language-Sensitive Editor for additional information
about LSE.

Developing Compaq COBOL Programs 1–27

Advertising