Compaq COBOL AAQ2G1FTK User Manual

Page 80

Advertising
background image

Developing Compaq COBOL Programs
1.3 Developing Programs on OpenVMS Alpha

When you execute the following command line:

$ MYPROG 1028 powers.dat

The following will result:

howmany–records will contain 1028.

file-path will contain MYDEV:[MYDIR]

file-name will contain powers.dat

file-spec will contain MYDEF:[MYDIR]powers.dat

For additional information, see the ACCEPT and DISPLAY statements in the
Compaq COBOL Reference Manual.

1.3.4.3 Accessing Input and Output Devices at Run Time

ACCEPT and DISPLAY statements may interact with the input and output
devices by referring to them through the environment variables COBOL_INPUT
and COBOL_OUTPUT, respectively. See Chapter 11 for more information.

1.3.4.4 Debugging Environment

Perhaps the most common qualifier added to the RUN command line is DEBUG.
The form of the RUN command with DEBUG is as follows:

RUN [/[NO]DEBUG] file-spec

In the preceding syntax format file-spec is the name of the executable image to be
run. A typical example would be:

$ RUN /DEBUG MYPROG

In this example, MYPROG is the name of the executable image to be run. You
would specify the /DEBUG qualifier to invoke the OpenVMS Debugger if the
image was not linked with it. You cannot use /DEBUG on images linked with the
/NOTRACEBACK qualifier. If the image (in this case, MYPROG) was linked with
the /DEBUG qualifier and you do not want the debugger to prompt you, use the
/NODEBUG qualifier. The default action depends on whether or not the file was
linked with the /DEBUG qualifier.

Note

Using the /DEBUG qualifier with the RUN command does not produce
symbol table information if you did not specify the /DEBUG qualifier
when you compiled and linked your program.

The following example executes the image MYPROG.EXE without invoking the
debugger:

$ RUN MYPROG/NODEBUG

See Appendix C for more information about debugging programs.

1–50 Developing Compaq COBOL Programs

Advertising