COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

pathname
NOTE: The file suffixes (cbl, cob, and so on) are not case-sensitive.
Running HP COBOL Programs
After successfully compiling your HP COBOL program in the OSS environment, you have a loadfile.
Its name is either a.out (by default) or the name you gave it with the -o flag. If the current directory
is in your search path, you can run your program by typing the name of the loadfile and pressing
Return. For example, if the name of the loadfile is a.out, enter:
a.out
To run the program with the selected debugger (see Debugger Selection), enter:
run -debug a.out
If the current directory is not in your search path, add it with this command:
export PATH=$PATH:.
Calling OSS Functions From HP COBOL Programs
An HP COBOL program can call an OSS function with either the X/Open CALL statement or the
ENTER statement. The ENTER statement is easier.
Mixed-Language Programs
In the OSS environment, you can write mixed-language programs.
Native HP COBOL programs can call programs written in native HP COBOL, native HP C, native
HP C++, or pTAL.
To produce a native HP COBOL program that contains native HP COBOL and native HP C modules,
follow these steps:
1. Using the c89 utility, compile the HP C modules, but do not link them.
2. Using the ecobol utility, compile the HP COBOL modules, specifying any necessary linking
or SQL-compiling flags.
For example, suppose that you want to produce a loadfile from the native HP COBOL modules
cobol1.cbl and cobol2.cbl and the native HP C modules c1.c and c2.c.
First you use the c89 utility to compile the HP C modules without linking them:
c89 -c -o cprog.o c1.c c2.c
The resulting object file is cprog.o.
712 Using HP COBOL in the OSS Environment