The object file is in Tru64 UNIX extended
the following information:
•
The name of the entry point. It takes this name from the program name in
the first PROGRAM-ID paragraph in the source program.
•
A list of variables that are declared in the module. The linker uses this
information when it binds two or more modules together and must resolve
references to the same names in the modules.
•
A symbol table and a source line correlation table (if you request them
with the
external and internal variables within a module, with definitions of their
locations. The source line correlation table associates lines in your source file
with lines in your program. These tables are of use in debugging.
If severe errors are encountered during compilation or if you specify certain flags
such as
1.2.2.8 Naming Output Files
To specify a file name (other than
-o
output flag, where output specifies the file name. You can also use the
command to rename the file. The following command requests a file name of
prog1.out
% cobol -o prog1.out test1.cob
Besides specifying the name of the executable image file, you can use the
output flag to rename the object file if you specified the
flag and omit the
-c
a
.o
suffix substituted for the source file suffix.
1.2.2.9 Temporary Files
Temporary files created by the compiler or a preprocessor reside in the
directory and are deleted (unless the
environment variable TMPDIR to specify a directory to contain temporary files if
/tmp
is not acceptable.
To view the file name and directory where each temporary file is created, use
the
flag. To create object files in your current working directory, use the
-v
flag. Any object files (
retained.
1.2.2.10 Examples of the COBOL Command
The following examples show the use of the
followed by a description of the output files that it produces.
% cobol -V aaa.cob bbb.cob ccc.cob
1.
The Compaq COBOL source files
into temporary object files. The temporary object files are passed to the
linker. The
the compiler to create the listing files
flag, for debugging). A symbol table is a list of the names of all
-g
, linking does not occur.
-c
for the source file
test1.cob
output flag, the name of the first specified file is used with
-o
files) that you specify on the
.o
linker produces the executable file
ld
Developing Compaq COBOL Programs
1.2 Developing Programs on Tru64 UNIX
format. The object file provides
coff
) for the executable image file, use the
a.out
:
-c
flag is specified). You can set the
-K
cobol
command. Each command is
cobol
,
, and
aaa.cob
bbb.cob
a.out
,
aaa.lis
bbb.lis
Developing Compaq COBOL Programs 1–17
mv
-o
flag. If you specify the
/tmp
-c
command line are
are compiled
ccc.cob
ld
. The
flag causes
-V
, and
.
ccc.lis
Need help?
Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?
Questions and answers