CLIST IF condition not working as designed

IBM's Command List programming language & Restructured Extended Executor

CLIST IF condition not working as designed

Postby rounmain1 » Fri Aug 01, 2008 7:31 pm


I have a requirement for improving a CLIST tool,wherein im reading records from a mvs dataset, and according to the digit in the 7th column of the read record I am adding the appropriate JCL member out of 10 members in my PDS.(like for ex if the digit is 7 it will add a the member 7 from a preallocated PDS to my PDS)

for FILE I/O im using OPENFILE, CLOSFILE, GETFILE. and to select &th digit im using following statement

GETFILE READFL /*ive allocated my PS to readfl*/

SO in passon above I have my 7th digit so have to call apropriate member now according to this digit. Just in case i want to check if the same member has been called previosly, so do not want to call it again, i have created 10 flags JCL00 thru JCL09. everytime i call a member i set its corresponding flag to 1. Now,i want to check if the one member im going to add now has been already added,and here i am facing the difficulty. I have coded it as follows

add the (passon)th member

Ive put above in DO loop for reading successive records. But the IF condition, coded as above, does not check for the flag . For ex if passon=7, then i want the condition to check if JCL07 = 1. This does not happen,but rather the condition checks if passon = 1 , and call the member in this case.I have printed the passon values as well as the loop counts to ensure that the loop as wel as the reading 7th digit logic works fine. Can someone please tell me where im going wrong above in my syntax and how i can get it to do what i want it to do? Thanks in advance.
Posts: 2
Joined: Fri Aug 01, 2008 7:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CLIST IF condition not working as designed


Return to CLIST & REXX


  • Related topics
    Last post