Running in z/OS UNIX environments

You can run COBOL programs in any of the z/OS® UNIX execution environments, either from within a z/OS UNIX shell or from outside a shell.

About this task

  • You can run programs in either the OMVS shell (OMVS) or the ISPF shell (ISHELL).

    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 a z/OS UNIX file, not to your terminal.

  • From outside a shell, you can run programs either under TSO/E or in batch.

    To call a COBOL program that resides in a z/OS UNIX file from the TSO/E prompt, use the BPXBATCH utility or a spawn() syscall in a REXX exec.

    To call a COBOL program that resides in a z/OS UNIX file with the EXEC JCL statement, use the BPXBATCH utility.

Related references  
TEST  
UNIX System Services User's Guide (The BPXBATCH utility)
Language Environment Programming Reference