My advice is not to use BPXBATCH, it's garbage! Run, don't walk, over to Dovetailed Softwares website and download their Co:Z toolkit. There is a batch utility called COZBATCH which allows you to run shell scripts from data sets, including inline JCL.

Co:Z toolkit is free with optional paid support.

https://dovetail.com/products/cozbatch.html


On 12/2/22 4:20 am, Billy Ashton wrote:
Hey everyone...I am having a tough time with a shell script I am writing for my BPXBATCH step. All I want to do is run one of two commands depending on a variable that is passed to the script.

I have tried coding
if [ "$pet" == "DOG" ] ; then
   commands...
else
   other commands
fi

and I have tried
if [[ .... ]]
if [ ... = ... ]

all with the same result:
+ DOG == DOG
DOG: /tmp/bpxshel.sh 48: FSUM7351 not found     or
..: (I think these are the two square brackets)     or
.: (this is the one square bracket)

So, how in the world do I code an IF statement in this BPXBATCH script to do a simple string compare?

Thank you and best regards,
Billy Ashton

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to