z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example: Running a z/OS UNIX executable file or REXX exec in batch

z/OS UNIX System Services User's Guide
SA23-2279-00

You can also use BPXBATCH to run a z/OS UNIX executable file or REXX exec through MVS™ batch and redirect the output and error messages to z/OS UNIX files or MVS data sets.

Example: User JAYMC runs an executable file in batch, as follows:
  • The program name to be run is /u/jaymc/bin/xparse1.
  • STDOUT is to be written to the file /u/jaymc/bin/mystd.out.
  • STDERR is to be written to the file /u/jaymc/bin/mystd.err.
  • STDIN defaults to /dev/null.
//jobname  JOB  ... 
//stepname EXEC PGM=BPXBATCH,REGION=100M,
//              PARM='PGM /u/jaymc/bin/xparse1'
//STEPLIB  DD   DSN=ISFSHR.JAYMC.ISFLOAD,DISP=SHR 
//STDOUT   DD   PATH='/u/jaymc/bin/mystd.out',PATHOPTS=(OWRONLY,OCREAT),
//              PATHMODE=SIRWXU 
//STDERR   DD   PATH='/u/jaymc/bin/mystd.err',PATHOPTS=(OWRONLY,OCREAT),
//              PATHMODE=SIRWXU
Example: This example is very similar to the previous one, except that STDOUT and STDERR are directed to members of an existing PDSE. If you wish to use two members of the same partitioned data set for STDOUT and STDERR output, then you must use a PDSE (not a PDS).
  • The program name to be run is /u/jaymc/bin/xparse1.
  • STDOUT is to be written to the PDSE member JAYMC.MYSTDLIB(XP1OUT).
  • STDERR is to be written to the PDSE member JAYMC.MYSTDLIB(XP1ERR).
  • STDIN defaults to /dev/null.
//jobname  JOB  ... 
//stepname EXEC PGM=BPXBATCH,REGION=100M,
//              PARM='PGM /u/jaymc/bin/xparse1'
//STEPLIB  DD   DSN=ISFSHR.JAYMC.ISFLOAD,DISP=SHR 
//STDOUT   DD   DSN=JAYMC.MYSTDLIB(XP1OUT),DISP=MOD 
//STDERR   DD   DSN=JAYMC.MYSTDLIB(XP1ERR),DISP=MOD

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014