Compaq COBOL AAQ2G1FTK User Manual

Page 45

Advertising
background image

Developing Compaq COBOL Programs

1.2 Developing Programs on Tru64 UNIX

4.

Any copy file that contains a PROGRAM-ID or END PROGRAM statement for
a program must contain that entire program. When compiled in the Compaq
FUSE environment (using the compiler options

-xref

or

-xref_stdout

),

certain Compaq COBOL programs may fail, with this fatal diagnostic result:

cobol: Severe: Fatal error -7 returned from a cross-referencing
library procedure

To avoid this error, programmers should ensure that any subroutine beginning
in a given file ends in the same file.

1.2.2.3 External File Handler Support

The

-tps

flag allows Compaq COBOL applications to make use of ACMSxp, the

Application Control and Management System/Cross-Platform Edition.

-tps

specifies that files are part of a transaction processing system, and enables

Encina Structured File System (SFS) record storage for applicable files. It is
intended to be used in conjunction with the Transarc Encina external file handler
and ACMSxp, allowing access to data in a wide variety of databases, without
the need to write code in the language of the databases. This approach provides
access to transaction processing technology, and incorporates industry standards
for data communications and distributed computing. ACMSxp conforms to the
the Multivendor Integration Architecture (MIA).

COBOL is one of the languages approved by MIA for transaction processing
(TP) client programs, customer-written presentation procedures, and processing
procedures. For database access, Structured Query Language (SQL) is the
MIA-required access language. The SQL is embedded in COBOL and C.

See the ACMSxp documentation for full details. Additional information
can also be found in published Distributed Computing Environment (DCE)
documentation.

1.2.2.4 Specifying Multiple Files and Flags

The

cobol

command can specify multiple file names and multiple flags. Multiple

file names are delimited by spaces. If appropriate, each file name can have a
different suffix. The file name suffix could result in the following actions:

Calling another language compiler, such as the C compiler

Passing object files directly to the linker, which the linker combines with
other object files

Passing an object library to the linker, which the linker uses to search for
unresolved global references

When a file is not in your current working directory, specify the directory path
before the file name.

1.2.2.5 Compiling Multiple Files

An entire set of source files can be compiled and linked together using a single

cobol

command:

% cobol -o calc mainprog.cob array_calc.cob calc_aver.cob

This

cobol

command:

Uses the

-o

flag to specify the name of the executable program as

calc

Compiles the file

array_calc.cob

Compiles the file

calc_aver.cob

Developing Compaq COBOL Programs 1–15

Advertising