Some shops won't let you install free software, but for everybody else, that sounds like the reasonable thing to do/
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of David Crayford [dcrayf...@gmail.com] Sent: Friday, February 11, 2022 9:02 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Coding IF statement in BPXBATCH shell 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://secure-web.cisco.com/1QmaMysIy6vmV-VlgjMJ56Kb9ngXSViU3fshLvPElZvpjLhvwGE1TLJCXM3Lnph7b-KZkJBvlDTImYUCo6RTeTxbVdW_mN3f6s7w-hHqI5qbda8OGHb35p2ZWidf4OL8WeGLmP_fY3riY_5-x6eRvRS8kAzblNio4OxCAMBLKyWtA4zhgP4o0_5bxyyjorKK4Q5koCHDsW1dWtydDCiZILcjV1LwTk3eDDZ5WEJPP62t28PPtqYfMIOkb05cczMpivBIn6ACuuSrLu8-YrlnAtN3fTRE3sDU58s2cMh27xaY_PRqd26ZBzIpt-gY4SXyGe8wR2-tUBgBo7m87Nff4nsS4tFkYL2OLmsIClNwiJTENzyqNTVCE8RFxOgpoeVrSPLXqii7hKN9sC0nrpJBOv681dMU0wKgmmQiTNwVUb_oIEiLT17Azk83w7aEn_Wjs/https%3A%2F%2Fdovetail.com%2Fproducts%2Fcozbatch.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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN