Compaq COBOL
User Manual


Previous Contents Index

1.1.2.2 COBOL Command Flags

Flags to the cobol command affect how the compiler processes a file. The simplest form of the cobol command is often sufficient.

If you compile parts of your program (compilation units) using multiple cobol commands, flags that affect the execution of the program should be used consistently for all compilations, especially if data will be shared or passed between procedures.

For a complete list of Compaq COBOL flags, see Table 1-2. For more information about the Compaq COBOL flags, access the reference (man) page for COBOL at the Tru64 UNIX system prompt. For example:


%  man cobol

Table 1-2 Compaq COBOL Command Flags on Tru64 UNIX
Flag Default
-align [padding] off
-ansi off
-arch -arch generic
-arithmetic native -arithmetic native
-arithmetic standard -arithmetic native
-C off
-c on
-call_shared on
-check all off
-check [no]bounds -check nobounds
-check [no]decimal -check nodecimal
-check [no]perform -check noperform
-check none on
-conditionals [selector] off
-convert [no]leading_blanks -convert noleading_blanks
-copy off
-copy_list off
-cord off
-cross_reference off
-cross_reference alphabetical off
-cross_reference declared off
-D num off
-display_formatted off
-feedback file off
-fips 74 off
-flagger [option] off
-granularity byte ,
-granularity long ,
-granularity quad
-granularity quad
-g0 off
-g1 on
-g2 or -g off
-g3 off
-include off
-K off
-L off
-L dir off
-list off
-l string off
-mach or -machine_code off
-map off
-map alphabetical off
-map declared off
-math_intermediate cit3 ,
-math_intermediate cit4 ,
-math_intermediate float
-math_intermediate float
-names as_is ,
-names lower ,
-names lowercase ,
-names upper ,
-names uppercase
-names lowercase
-nationality japan ,
-nationality us
-nationality us
-nolocking off
-noobject off
-non_shared -call_shared
-nowarn off
-O0 off
-O1 off
-O2 off
-O3 off
-O4 or -O on
-o output a.out
-p0 on
-p1 or -p off
-relax_key_checking or -rkc off
-rsv [no]200x -rsv no200x
-rsv [no]foreign_extensions -rsv noforeign_extensions
-rsv [no]xopen -rsv xopen
-seq or -sequence_check off
-shared -call_shared
-show code off
-show copy off
-show xref off
-std or -std 85 on
-std [no]mia -std nomia
-std [no]syntax -std nosyntax
-std [no]v3 -std nov3
-std [no]xopen -std xopen
-T num off
-taso off
-tps off
-trunc off
-tune -tune generic
-V off
-v off
-w off
-warn -warn other
-warn all off
-warn [no]information -warn noinformation
-warn [no]other -warn other
-warn none off
-xref, -xref_stdout off

Technical Notes:

  1. If your program compile generates Errors (E-level diagnostics on OpenVMS), the link phase of the two steps taken by the compiler driver will be aborted and the object file(s) deleted. You can override this deletion by specifying the -c flag:


    % cobol -c test.cob 
    % cobol test.o 
    

    The Compaq COBOL compiler driver (see Section 1.1.2) controls a sequence of operations (as required): compiling, assembling, linking. The -c flag signals the compiler driver to break the sequence.
    (For additional information, see The COBOL Command Driver description (earlier in this chapter), Section 1.1.2.12, and the -c description under man cobol .)

  2. The -tps flag causes the Compaq COBOL compiler to use an external file handler (produced by a third party), providing increased flexibility in cross platform, transaction processing application development. See Section 1.1.2.3 for more information.
  3. Specifying the -xref_stdout option directs the compiler to output the data file to standard output.
  4. Any copy file that contains a PROGRAM-ID or END PROGRAM statement for a program must contain that entire program.

1.1.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.

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


Previous Next Contents Index