You can tailor the command stream to your site standards, by inserting a step to tailor the file at the remote location. For example, you can insert mkdir, chown, or chgroup commands or modify the delivered un-pax command switches.
For more information about RJCLROOT, see Specifying Remote Job Stream in C1DEFLTS.
For more information about the Defaults table, see the chapter "Using the Defaults Table" in the Administration Guide.
//* //BPXBAT EXEC PGM=BPXBATCH ICPY //STDOUT DD SYSOUT=* //STDERR DD SYSOUT=* //STDPARM DD DISP=SHR, // DSN=&RUCD
Resolves the name of the remote command file.
Example: Remote Command File Edited for REXX
Suppose that you want to have a REXX program read in the current command stream from SYSUT1 and then write the customized stream to SYSUT2. To accomplish this result, you would insert the following code before the BPXBATCH step in your model member:
//*********************************************************** //* SAMPLE TAILOR UCD COMMAND STREAM //*********************************************************** //UCDEDIT EXEC PGM=IRXJCL,PARM='UCDEDIT' //SYSEXEC DD DISP=SHR,DSN=BST.SUPPNDVR.ISRCLIB //SYSUT1 DD DISP=SHR,DSN=&RUCD //SYSUT2 DD DISP=SHR,DSN=&RUCD //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //***********************************************************
The following sample REXX exit (UCDEDIT) illustrates the key requirements of your command stream tailoring. The program must read in the existing command stream and write out the tailored stream. The program reads the input from SUSYT1 and writes the tailored output to SYSUT2. This exit performs a simple string search and replace to amend (insert) an extra switch in the pax command.
/* Rexx to read from Sysut1 and write to Sysut2 (like IEBGENER) However, this version is a bit special in that it also performs some string substitutions. It's intended to allow a customer to edit their USS Ship command stream at the remote location changing the pax command parms or saving some commands to be executed later. */ frmstr = 'pax -rvzk' /* This is what we're looking for */ tgtstr = 'pax -rvzk -p op' /* and we'll replace it with this */ /* Read input file (BPXBATCH commands) */
"EXECIO * DISKR SYSUT1(STEM DATA. FINIS" IF RC ¬= 0 THEN SIGNAL IOERROR
/* Main loop to search/replace the string */
do i = 1 to DATA.0 start = 1 do while start < length(DATA.i) found = pos(frmstr,DATA.i,start) if found = 0 then leave endstr = found + length(frmstr) newstr = Left(DATA.i,(found - 1)) || tgtstr DATA.i = newstr || substr(DATA.i,endstr) start = found + length(tgtstr) end end
/* Write the substituted file out */
"EXECIO * DISKW SYSUT2(STEM DATA. FINIS" IF RC ¬= 0 THEN SIGNAL IOERROR
/* That's it all done */ Exit 0
IOERROR: SAY 'PROBLEM DURING I/O, Return code:' || RC EXIT RC
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|