Use of IF JCL statements
Hi there! Can some one point me to documentation that would explain what happens in a JCL stream with IF/ELSE statements and the job is trying to be restarted in the middle? For example, if I have: Step1 Step2 IF Step2.rc 4 Then Step3 IF Step3.rc = 0 Then Step4 Step5 ENDIF (step3) ENDIF (step2) And try to restart at Step4, all steps have flushed. I have a good idea that it is because the IF tests could not work (there is no Stepx.RUN), so even though restarting in Step4, the interpreter knows it is inside the IF statements. Can someone point me in the right direction, so I can help my user? Thank you for your assistance! Don -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Use of IF JCL statements
Donald Johnson pisze: Hi there! Can some one point me to documentation that would explain what happens in a JCL stream with IF/ELSE statements and the job is trying to be restarted in the middle? For example, if I have: Step1 Step2 IF Step2.rc 4 Then Step3 IF Step3.rc = 0 Then Step4 Step5 ENDIF (step3) ENDIF (step2) And try to restart at Step4, all steps have flushed. I have a good idea that it is because the IF tests could not work (there is no Stepx.RUN), so even though restarting in Step4, the interpreter knows it is inside the IF statements. Can someone point me in the right direction, so I can help my user? Define job restarted in the middle. If you're using job scheduler then it is up to the scheduler to interpret IFs. -- Radoslaw Skorupka Lodz, Poland -- BRE Bank SA ul. Senatorska 18 00-950 Warszawa www.brebank.pl Sd Rejonowy dla m. st. Warszawy XII Wydzia Gospodarczy Krajowego Rejestru Sdowego, nr rejestru przedsibiorców KRS 025237 NIP: 526-021-50-88 Wedug stanu na dzie 01.01.2009 r. kapita zakadowy BRE Banku SA (w caoci wpacony) wynosi 118.763.528 zotych. W zwizku z realizacj warunkowego podwyszenia kapitau zakadowego, na podstawie uchway XXI WZ z dnia 16 marca 2008r., oraz uchway XVI NWZ z dnia 27 padziernika 2008r., moe ulec podwyszeniu do kwoty 123.763.528 z. Akcje w podwyszonym kapitale zakadowym BRE Banku SA bd w caoci opacone. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Use of IF JCL statements
In the previous example, I would code RESTART=STEP4 on the Job card. These jobs are run manually, outside of a scheduler. Don On Wed, Apr 7, 2010 at 9:53 AM, R.S. r.skoru...@bremultibank.com.pl wrote: Donald Johnson pisze: Hi there! Can some one point me to documentation that would explain what happens in a JCL stream with IF/ELSE statements and the job is trying to be restarted in the middle? For example, if I have: Step1 Step2 IF Step2.rc 4 Then Step3 IF Step3.rc = 0 Then Step4 Step5 ENDIF (step3) ENDIF (step2) And try to restart at Step4, all steps have flushed. I have a good idea that it is because the IF tests could not work (there is no Stepx.RUN), so even though restarting in Step4, the interpreter knows it is inside the IF statements. Can someone point me in the right direction, so I can help my user? Define job restarted in the middle. If you're using job scheduler then it is up to the scheduler to interpret IFs. -- Radoslaw Skorupka Lodz, Poland -- BRE Bank SA ul. Senatorska 18 00-950 Warszawa www.brebank.pl S d Rejonowy dla m. st. Warszawy XII Wydzia Gospodarczy Krajowego Rejestru S dowego, nr rejestru przedsi biorców KRS 025237 NIP: 526-021-50-88 Wed ug stanu na dzie 01.01.2009 r. kapita zak adowy BRE Banku SA (w ca o ci wp acony) wynosi 118.763.528 z otych. W zwi zku z realizacj warunkowego podwy szenia kapita u zak adowego, na podstawie uchwa y XXI WZ z dnia 16 marca 2008r., oraz uchwa y XVI NWZ z dnia 27 pa dziernika 2008r., mo e ulec podwy szeniu do kwoty 123.763.528 z . Akcje w podwy szonym kapitale zak adowym BRE Banku SA b d w ca o ci op acone. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Use of IF JCL statements
-Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Donald Johnson Sent: Wednesday, April 07, 2010 8:49 AM To: IBM-MAIN@bama.ua.edu Subject: Use of IF JCL statements Hi there! Can some one point me to documentation that would explain what happens in a JCL stream with IF/ELSE statements and the job is trying to be restarted in the middle? For example, if I have: Step1 Step2 IF Step2.rc 4 Then Step3 IF Step3.rc = 0 Then Step4 Step5 ENDIF (step3) ENDIF (step2) And try to restart at Step4, all steps have flushed. I have a good idea that it is because the IF tests could not work (there is no Stepx.RUN), so even though restarting in Step4, the interpreter knows it is inside the IF statements. Can someone point me in the right direction, so I can help my user? Thank you for your assistance! Don ref: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B690/17.1.4 quote If you specify a stepname as part of a relational-expression, the system first determines whether the step executed. If the step did not execute, the evaluation of the relational-expression is false. /quote From my intepretation of: If the step did not execute, the evaluation of the relational-expression is false., I think that any relational expression involving a flushed step evaluates to FALSE. So, in your example, the steps within the IF would NOT be executed. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Use of IF JCL statements
Thanks, John; that was what I thought it might be doing. I now have the reference to start with as well! Don On Wed, Apr 7, 2010 at 12:18 PM, McKown, John john.mck...@healthmarkets.com wrote: -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Donald Johnson Sent: Wednesday, April 07, 2010 8:49 AM To: IBM-MAIN@bama.ua.edu Subject: Use of IF JCL statements Hi there! Can some one point me to documentation that would explain what happens in a JCL stream with IF/ELSE statements and the job is trying to be restarted in the middle? For example, if I have: Step1 Step2 IF Step2.rc 4 Then Step3 IF Step3.rc = 0 Then Step4 Step5 ENDIF (step3) ENDIF (step2) And try to restart at Step4, all steps have flushed. I have a good idea that it is because the IF tests could not work (there is no Stepx.RUN), so even though restarting in Step4, the interpreter knows it is inside the IF statements. Can someone point me in the right direction, so I can help my user? Thank you for your assistance! Don ref: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B690/17.1.4 quote If you specify a stepname as part of a relational-expression, the system first determines whether the step executed. If the step did not execute, the evaluation of the relational-expression is false. /quote From my intepretation of: If the step did not execute, the evaluation of the relational-expression is false., I think that any relational expression involving a flushed step evaluates to FALSE. So, in your example, the steps within the IF would NOT be executed. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.comhttp://www.healthmarkets.com/ Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html