You can run COBOL programs in any of the z/OS UNIX execution environments, either within a z/OS UNIX shell or from outside a shell.
Enter the program-name at the shell prompt. The program must be in the current directory or in your search path.
You can specify runtime options only by setting the environment variable _CEE_RUNOPTS before starting the program.
You can run programs that reside in a cataloged MVS data set from a shell by using the tso utility. For example:
tso "call 'my.loadlib(myprog)'"
The ISPF shell can direct stdout and stderr only to an HFS file, not to your terminal.
To call a z/OS UNIX COBOL program that resides in an HFS file from the TSO/E prompt, use the BPXBATCH utility or a spawn() syscall in a REXX exec.
To call a z/OS UNIX COBOL program that resides in an HFS file with the JCL EXEC statement, use the BPXBATCH utility.
related tasks
Running OO applications under UNIX
Setting and accessing environment variables
Calling UNIX/POSIX APIs
Accessing main program parameters
Defining and allocating QSAM files
Defining and allocating line-sequential files
Allocating VSAM files
Displaying values on a screen or in a file (DISPLAY)
Language Environment Programming Guide (Running z/OS UNIX C/C++
application programs: running POSIX-enabled programs)
related references
TEST
UNIX System Services User's Guide (The BPXBATCH utility)
Language Environment Programming Reference