Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7992
Location: Bellevue, IA

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: 7992
Location: Bellevue, IA

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 TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us