Page 1 of 1

IFTHEN - syntax error

PostPosted: Tue Oct 05, 2021 3:45 am
by knobi
Good afternoon !
I'm having issues with the sort below, where :
- The 1st IFTHEN add a column that applies to all entries.
- The 2nd IFTHEN add a second column that applies to all entries (except the first line).
- The 3rd IFTHEN would add a third column which would apply to several groups of records. but the job fails on this statement with syntax error.

Could you please help me to understand how to add the 3rd IFTHEN statement ?

works fine :

//CTL1CNTL DD *  
 INREC IFTHEN=(WHEN=INIT,                
               OVERLAY=(90:SEQNUM,8,ZD)),          

       IFTHEN=(WHEN=GROUP,BEGIN=(23,03,SS,EQ,C'ID='),
               PUSH=(99:26,04))
 


fails with syntax error :

//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,
              OVERLAY=(90:SEQNUM,8,ZD)),

      IFTHEN=(WHEN=GROUP,BEGIN=(23,03,SS,EQ,C'ID='),              
              PUSH=(99:26,04)),          

      IFTHEN=(WHEN=GROUP,BEGIN=(01,20,SS,EQ,C'ABCABC ABC ABC21'),                
              END=(03,15,SS,EQ,C'ABCAAW-CASC'),                
              PUSH=(105:C'AEDX AXC'))
 

Re: IFTHEN - syntax error

PostPosted: Tue Oct 05, 2021 10:37 pm
by sergeyken
What is the error message?
What does it say?
What is the error position marked with '*' in the listing?
What is the whole JCL, and all control statements used by your ICETOOL step?

If you really need help, this is YOUR RESPONSIBILITY to provide as much useful info as possible.
We all are not very interested in pulling the information from you.

Re: IFTHEN - syntax error

PostPosted: Sat Oct 09, 2021 12:49 am
by knobi
I just found and fix the syntax on the error message mentioned above.
thanks

Re: IFTHEN - syntax error

PostPosted: Sat Oct 09, 2021 7:51 am
by Terry Heinze
knobi, it would be nice if you would post your solution for the benefit of others.