Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (c) cobol(1)
NAME
cobol - Compiles COBOL85 TNS programs
SYNOPSIS
cobol [-c ][-g ][-L directory ] ... [-O[optlevel ]]
[-o outle ][-s ]
[-Waxcel[="args" ]]
[-WBdynamic ]
[-WBstatic ]
[-Wbind[="args" ]]
[-Wcobol="args" ]
[-Wcopylib=pathname ]
[-Wnobind ]
[-Wrunlib=pathname ]
[-Wsql[="args" ]]
[-Wverbose ]
operand ...
FLAGS
-c Performs compilation of the specied source les but supresses the binding phase.
This ag does not delete any object les that are produced.
-g Produces symbols information for symbolic debugging in the object or executable les.
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 specied. At least ten instances of this option are supported
in a single cobol command line. If a directory specied by -L contains les named
libc.a, libm.a, libl.a, or liby.a, these les are used as libraries instead of the libraries in
the default directories.
-o outfile Uses the pathname outle instead of the default pathname a.out for the executable le
produced. If -o is used with the -c ag, outle is used to name the object le instead of
the standard naming convention.
-O [optlevel]
Species the optimization level to be used for the program le. A 0 optlevel argument
species an OPTIMIZE 0 COBOL85 compiler directive. A 1 optlevel argument
species an OPTIMIZE 1 COBOL85 compiler directive. A 2 optlevel argument or no
argument species an OPTIMIZE 2 COBOL85 compiler directive and processes the
program le with the Accelerator, axcel.Ifa-O ag is not specied, an OPTIMIZE 1
COBOL85 compiler directive is specied.
-s Strips symbolic and other information not required for proper execution from object
and executable les. If both the -g and -s ags are used, symbolic information is kept
in the object les but is stripped from the executable le. Do not specify the -s and
-Wsql ags in the same cobol invocation because the NonStop SQL/MP compiler
requires the symbols region to be present. Strip the le in a separate cobol invocation
after the SQL compilation.
527188-003 Hewlett-Packard Company 251