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.

Appendix D. Running shell scripts or executable files under<br />

MVS environments<br />

BPXBATCH<br />

This information describes the IBM-supplied BPXBATCH program.<br />

BPXBATCH makes it easy for you to run shell scripts and executable files that<br />

reside in z/<strong>OS</strong> <strong>UNIX</strong> files through the MVS job control language (JCL). If you do<br />

most of your work from TSO/E, using BPXBATCH saves you the trouble of going<br />

into the shell to run your scripts and executable files. REXX execs can also use<br />

BPXBATCH to run shell scripts and executable files.<br />

In addition to using BPXBATCH, a user who wants to perform a local spawn without<br />

being 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 />

profile) can use BPXBATSL. BPXBATSL provides users with an alternate entry point<br />

into BPXBATCH, and forces a program to run using a local spawn instead of<br />

fork/exec as BPXBATCH does. This ultimately allows a program to run faster.<br />

BPXBATSL is also useful when the user wants to perform a local spawn of their<br />

program but also needs subsequent child processes to be fork/exec’ed. Formerly,<br />

this could not be done since BPXBATCH and the requested program shared the<br />

environment variables. Failure to meet the following conditions will result in a failure<br />

when BPXBATSL is invoked. For more details about these restrictions, see the<br />

descriptions of the spawn() function and BPX1SPN callable service in z/<strong>OS</strong> <strong>UNIX</strong><br />

<strong>System</strong> <strong>Services</strong> Programming: Assembler Callable <strong>Services</strong> Reference:<br />

v The invoker must have an UID of 0 to issue a SH request<br />

v The child process is not setuid or setgid to a value different from the parent<br />

v The spawned file name is not an external link or a sticky bit file<br />

v The parent has enough resources to allow the child process to reside in the<br />

same address space<br />

BPXBATSL is an alias of BPXBATCH.<br />

BPXBATA2 and BPXBATA8 are provided as APF authorized alternatives to<br />

BPXBATSL. BPXBATA2 and BPXBATA8 provide the capability for a target APF<br />

authorized z/<strong>OS</strong> <strong>UNIX</strong> program to run in the same address space as the originating<br />

job, allowing it to share the same allocations, joblog, and so on. BPXBATA2 is<br />

specifically intended to provide the capability for APF Authorized z/<strong>OS</strong> <strong>UNIX</strong><br />

program to be started in a PSW Key 2 . To insure the target program receives<br />

control PSW Key 2, a PPT entry for BPXBATA2 must be set up that specifies that<br />

BPXBATA2 starts up PSW Key 2.<br />

The same restrictions that apply to BPXBATSL apply to BPXBATA2 and<br />

BPXBATA8, in addition to, the following:<br />

v The PGM keyword is the only invocation type that is supported. The SH keyword<br />

is not supported.<br />

v The interfaces can only be used from Started Task address spaces.<br />

v The z/<strong>OS</strong> <strong>UNIX</strong> program that is the target of the BPXBATA2 and BPXBATA8 job<br />

must be marked as an APF Authorized executable file.<br />

© Copyright IBM Corp. 1996, 2007 891

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

Saved successfully!

Ooh no, something went wrong!