Thanks! Just got around to trying this. I had the world's most convoluted
bunch of set symbols with symbols for quotes, blanks, etc. I was up to a
situation where I think I was going to need octuple single quotes to set up
BPXBATCH PARM= correctly. This was MUCH simpler:
//PARMOUT DD SYSOUT=*
//STDPARM DD *,SYMBOLS=(JCLONLY,PARMOUT)
SH
cp -U -T
"//'&DISTHLQ..TEMP.INSTJCL'"
&OUTDIR.INSTJCL/
/*
The "logging DD" (PARMOUT) is really useful for "seeing what happened." The
substitution into PARM= is automatically echoed in JESJCL but DD *
substitution is a black hole unless you specify the logging DD.
Thanks again.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Peter Hunkeler
Sent: Wednesday, December 17, 2014 3:49 AM
To: [email protected]
Subject: AW: Re: IKJ56500I COMMAND OPUTX NOT FOUND
Forget all those Irish commands (OGET, OPUT, etc.) and start unsing UNIX
commands. Here are two JCL's I'm using to run UNIX commands in batch:
// EXPORT SYMLIST=*// SET DIR='newdir'//UNIXCMDS EXEC
PGM=BPXBATCH
//STDIN DD DUMMY
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//SYMRESDD DD SYSOUT=*
//STDPARM DD *,SYMBOLS=(JCLONLY)
SH
cd /some/directory ;
ls -l ; mkdir -m 700 &DIR./*
Note that STDPARM is the BPXBATCH vatiant of PARMDD, and don't confuse them.
You start with the usual "SH" to tell BPXBATCH to run a shell. All the rest
of STDPARM is input to that shell, so you need to adhere to shell command
line syntax. Chain multiple commands with the ";". Note also that you must
not try to insert comment, because the first # will start a comment that
goes to the end of STDPARM.
Advantage: You can user JCL symbols (and if your jobclass allows it, also
system symbols) in the UNIX commands.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN