Invoking BPXBATCH from TSO/E

You can invoke BPXBATCH from TSO/E in the following ways:
  • From the TSO/E READY prompt
  • From a CALL command
  • As a REXX EXEC
If you want to run the /myap/base_comp application program from your user ID, direct its output to the file /myap/std/my.out. Write any error messages to the file /myap/std/my.err and copy the output and error data to MVS™ data sets. You could write a REXX EXEC similar to the following example:
/* base_comp REXX exec */
"Allocate File(STDOUT) Path('/u/myu/myap/std/my.out') 
          Pathopts(OWRONLY,OCREAT,OTRUNC)
          Pathmode(SIRWXU) Pathdisp(DELETE,DELETE)"
"Allocate File(STDERR) Path('/u/myu/myap/std/my.err') 
          Pathopts(OWRONLY,OCREAT,OTRUNC)
          Pathmode(SIRWXU) Pathdisp(DELETE,DELETE)"
 
"BPXBATCH PGM /u/myu/myap/base_comp"
 
"Allocate File(output1) Dataset('MYAPPS.STD(BASEOUT)')"
"Ocopy Indd(STDOUT) Outdd(output1) Text Pathopts(OVERRIDE)"
 
"Allocate File(output2) Dataset('MYAPPS.STD(BASEERR)')"
"Ocopy Indd(STDERR) Outdd(output2) Text Pathopts(OVERRIDE)"
Enter the name of the REXX EXEC from the TSO/E READY prompt to invoke BPXBATCH. When the REXX EXEC completes, the STDOUT and STDERR allocated files are deleted.