View previous topic :: View next topic
|
Author |
Message |
maddop
New User
Joined: 14 Mar 2006 Posts: 8 Location: Liverpool
|
|
|
|
I am trying to issue more than one command (usually around 4) via a batch job to USS using bpxbatch.
I can issue one command without any problems but the other commands are ignored.
Is it possible?
My JCL is:
Code: |
//RUNSHELL EXEC PGM=BPXBATCH
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDPARM DD DSN=SPYPMM.GZAST.ABI.STDPARM(BPXPARM),DISP=SHR |
My STDPARM is:
Code: |
SH echo "This is my first test";
SH /u/myuserid;
SH mkdir bpxtest1;
SH cd bpxtest1;
SH echo "End of my test" |
I have tried using + instead of ; I have also tried using piping | as a desperate attempt!!!
My OUTPUT is:
Code: |
This is my first test
SH: FSUM7351 not found
SH: FSUM7351 not found
SH: FSUM7351 not found
SH: FSUM7351 not found
|
Any suggestions? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If you read the manual on BPXBATCH, you will find that it is designed to run a program or shell script. It is not designed to run as many programs or shell scripts as you want -- just one. Take your commands (not all of which are valid, by the way) and change them to
Code: |
echo "This is my first test";
cd /u/myuserid;
mkdir bpxtest1;
cd bpxtest1;
echo "End of my test" |
and save these as /u/myuserid/shellscript.sh on your system. Then change SPYPMM.GZAST.ABI.STDPARM(BPXPARM) to say
Code: |
sh /u/myuserid/shellscript.sh |
run the job and see what the results are. |
|
Back to top |
|
|
maddop
New User
Joined: 14 Mar 2006 Posts: 8 Location: Liverpool
|
|
|
|
Thanks for the reply.
I have read the manual on bpxbatch and understand that it is to used for shell scripts and programs.
I can do that without any issues but I am trying to execute commands that are read via STDPARM PDSE member.
I know it is possible to do since z/OS 1.8... just trying to get the syntax correct. |
|
Back to top |
|
|
maddop
New User
Joined: 14 Mar 2006 Posts: 8 Location: Liverpool
|
|
|
|
I've been able to sort this out... looks like i just stack the commands:
STDPARM member:
Code: |
SH echo "start of test";
mkdir test01;
mkdir test01/subdir;
echo "end of test"
|
Tested successfully... Nothing complicated will be issued, its purely to make life easier for 1st line support staff with little USS knowledge. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Note the semicolon actually means this is one shell command line being executed -- as I stated earlier, BPXBATCH only runs one command. You can string things together via ; but it's still only one command line as seen by Unix. |
|
Back to top |
|
|
|