Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Issuing more than one command via BPXBATCH

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
maddop

New User


Joined: 14 Mar 2006
Posts: 8
Location: Liverpool

PostPosted: Thu Jan 15, 2009 5:34 pm    Post subject: Issuing more than one command via BPXBATCH
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8195
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jan 15, 2009 6:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
maddop

New User


Joined: 14 Mar 2006
Posts: 8
Location: Liverpool

PostPosted: Thu Jan 15, 2009 7:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
maddop

New User


Joined: 14 Mar 2006
Posts: 8
Location: Liverpool

PostPosted: Thu Jan 15, 2009 7:37 pm    Post subject:
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8195
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jan 15, 2009 8:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us