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.

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

The following example contains DD statements that are accessible to a program<br />

that was given control from BPXBATSL:<br />

//jobname JOB ...<br />

//stepname EXEC PGM=BPXBATSL,PARM=’PGM program_name’<br />

/* The following 2 DDs are still available in the program which gets<br />

/* control from BPXBATSL.<br />

//DD1 DD DSN=MVSDSN.FOR.APPL1,DISP=SHR<br />

//DD2 DD DSN=MVSDSN.FOR.APPL2,DISP=SHR<br />

/* The following DDs are processed by BPXBATSL to create file descriptors<br />

/* for stdin, stdout, stderr<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 />

// PATHMODE=SIRWXU<br />

BPXBATCH accepts one parameter string as input, the combination of SH|PGM and<br />

program_name. At least one blank character must separate the parts of the<br />

parameter string. The total length of the parameter string will now support up to<br />

32754 characters.<br />

Tips:<br />

v BPXBATCH was first created for use with JCL, which had a max parm length of<br />

100. Now, BPXBATCH can also be called form CLIST, REXX, and TSO. These<br />

additional environments do not have the 100 character parameter limit. From a<br />

TSO command environment the parameter string itself will now support up to<br />

32754 characters.<br />

v Parameters to BPXBATCH can also be supplied via the STDPARM DD up to a<br />

limit of 65,536 characters. When the STDPARM DD is allocated BPXBATCH will<br />

use the data found in the z/<strong>OS</strong> <strong>UNIX</strong> file or MVS data set associated with this<br />

DD rather than what is found on the parameter string or in the STDIN DD. An<br />

informational message BPXM079I will be displayed indicating that this is<br />

occurring, as a warning to the user. The STDPARM DD will allow either a z/<strong>OS</strong><br />

<strong>UNIX</strong> file, or a MVS SYSIN, PDS or PDSE member or a sequential data set.<br />

If neither SH nor PGM is specified as part of the parameter string, BPXBATCH<br />

assumes that the shell is to be started to run the shell script allocated by STDIN.<br />

SH|PGM<br />

Specifies whether BPXBATCH is to run a shell script or command or a z/<strong>OS</strong> C<br />

executable file located in an z/<strong>OS</strong> <strong>UNIX</strong> file.<br />

SH<br />

BPXBATCH<br />

Specifies that the shell designated in your TSO/E user ID’s security product<br />

profile is to be started and is to run shell commands or scripts provided<br />

from stdin or the specified program_name.<br />

If SH is specified with no program_name information, BPXBATCH attempts<br />

to run anything read in from stdin.<br />

PGM<br />

Specifies that the program identified by the program_name parameter is<br />

invoked directly from BPXBATCH. This is done either via a spawn or a fork<br />

Appendix D. Running shell scripts or executable files under MVS environments 893

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

Saved successfully!

Ooh no, something went wrong!