16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BPXBATCH<br />

Format<br />

Description<br />

Any other usage of the BPXBATA8 and BPXBATA2 interfaces than what is<br />

described is not supported and will cause the invoking job to fail.<br />

JCL:<br />

EXEC PGM=BPXBATCH,PARM=’SH|PGM program_name’<br />

TSO/E:<br />

BPXBATCH SH|PGM program_name<br />

The BPXBATCH program allows you to submit MVS batch jobs that run shell<br />

commands or scripts, or z/<strong>OS</strong> C executable files You can invoke BPXBATCH from a<br />

JCL job or from TSO/E (as a command, through a CALL command, or from a<br />

CLIST or REXX EXEC).<br />

With BPXBATCH, you can allocate the MVS standard file stdin only as z/<strong>OS</strong> <strong>UNIX</strong><br />

files for passing input. You can allocate the MVS standard files stdout, stderr or<br />

stdenv as MVS data sets or z/<strong>OS</strong> <strong>UNIX</strong> text files. The stdenv file for containing<br />

environment variables or the stderr and stdout files for saving job output can be<br />

allocated as SYSOUT, PDSE, PDS or sequential data sets. If you do not allocate<br />

them, stdin, stdout, stderr, and stdenv default to /dev/null. Allocate the standard<br />

files using the data definition PATH keyword options, or standard data definition<br />

options for MVS data sets, for stdenv, stdout and stderr.<br />

For MVS data sets use the standard data definition options for MVS data sets.<br />

For JCL jobs, you specify PATH keyword options on DD statements:<br />

//jobname JOB ...<br />

//stepname EXEC PGM=BPXBATCH,PARM=’SH|PGM program_name’<br />

//STDIN DD PATH=’/stdin-file-pathname’,PATHOPTS=(ORDONLY)<br />

//STDOUT DD PATH=’/stdout-file-pathname’,PATHOPTS=(OWRONLY,OCREAT,OTRUNC),<br />

// PATHMODE=SIRWXU<br />

//STDERR DD PATH=’/stderr-file-pathname’,PATHOPTS=(OWRONLY,OCREAT,OTRUNC),<br />

//<br />

.<br />

PATHMODE=SIRWXU<br />

Your application in the executable file can also allocate stdin, stdout, stderr, and<br />

stdenv dynamically through the use of SVC 99.<br />

For TSO/E, you specify PATH keyword options on the ALLOCATE command:<br />

ALLOCATE FILE(STDIN) PATH(’/stdin-file-pathname’) PATHOPTS(ORDONLY)<br />

ALLOCATE FILE(STDOUT) PATH(’/stdout-file-pathname’)<br />

PATHOPTS(OWRONLY,OCREAT,OTRUNC) PATHMODE(SIRWXU)<br />

ALLOCATE FILE(STDERR) PATH(’/stderr-file-pathname’)<br />

PATHOPTS(OWRONLY,OCREAT,OTRUNC) PATHMODE(SIRWXU)<br />

BPXBATCH SH|PGM program_name<br />

stdin and stdenv must always be allocated as read. stdout and stderr must<br />

always be allocated as write.<br />

As previously stated, a user who wants to perform a local spawn without being<br />

concerned about environment setup (that is, without having to set specific<br />

environment variables which could be overwritten if they are also set in the user’s<br />

892 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!