Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (c) cobol(1)
NAME
cobol - Compiles COBOL85 TNS programs
SYNOPSIS
cobol [-c ][-g ][-L directory ] ... [-O[optlevel ]]
[-o outfile ][-s ]
[-Waxcel[="args" ]]
[-WBdynamic ]
[-WBstatic ]
[-Wbind[="args" ]]
[-Wcobol="args" ]
[-Wcopylib=pathname ]
[-Wnobind ]
[-Wrunlib=pathname ]
[-Wsql[="args" ]]
[-Wverbose ]
operand ...
FLAGS
-c Performs compilation of the specified source files but supresses the binding phase.
This flag does not delete any object files that are produced.
-g Produces symbols information for symbolic debugging in the object or executable files.
This is equivalent to specifying the SYMBOLS and INSPECT directives to the
COBOL85 compiler.
-L directory
Changes the algorithm for searching the libraries named in the -l arguments to look in
the directory named by the directory pathname before looking in the default directories
/lib, /nonnative/usr/lib, /usr/lib, and /usr/local/lib. Directories named in -L options
are searched in the order specified. At least ten instances of this option are supported
in a single cobol command line. If a directory specified by -L contains files named
libc.a, libm.a, libl.a, or liby.a, these files are used as libraries instead of the libraries in
the default directories.
-o outfile Uses the pathname outfile instead of the default pathname a.out for the executable file
produced. If -o is used with the -c flag, outfile is used to name the object file instead of
the standard naming convention.
-O [optlevel]
Specifies the optimization level to be used for the program file. A 0 optlevel argument
specifies an OPTIMIZE 0 COBOL85 compiler directive. A 1 optlevel argument
specifies an OPTIMIZE 1 COBOL85 compiler directive. A 2 optlevel argument or no
argument specifies an OPTIMIZE 2 COBOL85 compiler directive and processes the
program file with the Accelerator, axcel.Ifa-O flag is not specified, an OPTIMIZE 1
COBOL85 compiler directive is specified.
-s Strips symbolic and other information not required for proper execution from object
and executable files. If both the -g and -s flags are used, symbolic information is kept
in the object files but is stripped from the executable file. Do not specify the -s and
-Wsql flags in the same cobol invocation because the NonStop SQL/MP compiler
requires the symbols region to be present. Strip the file in a separate cobol invocation
after the SQL compilation.
527188-004 Hewlett-Packard Company 2−51