Page 1 of 1

INREC IFTHEN no key words found on control statement

PostPosted: Thu Sep 20, 2018 4:16 pm
by thotlma
I am using below code write the output data set based below condtion but getting syntax and NO KEYWORDS FOUND ON CONTROL STATEMENT errors.
Please correct me if I did code wrong

 OPTION COPY                                                    
     INREC IFTHEN=(WHEN=(5,1,CH,EQ,C','),                          
                                        *                          
     OUTREC BUILD=(1,1,1Z,2:3,2,4:6,15)                            
     IFTHEN=(WHEN=(4,1,CH,EQ,C','),                                
     *                                                            
     OUTREC BUILD=(1,1,1Z,2:2,2,4:5,15)                          
 WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED    
 WER268A  INREC STATEMENT   : SYNTAX ERROR                        
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT                  
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                    
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Re: INREC IFTHEN no key words found on control statement

PostPosted: Thu Sep 20, 2018 4:36 pm
by expat
Unless you learn to use the code tags

[code]
Put
it
here
[/code]


There is no way to tell if there are spaces in the first column of the control statements or not

Please post again using the code tags.

ALSO Please give RECFM, LRECL and DSORG of the datasets as these are very useful when looking at SORT related problems.

Re: INREC IFTHEN no key words found on control statement

PostPosted: Thu Sep 20, 2018 5:10 pm
by NicC
Please stop posting your sort topics under JCL. There are special sections of the forum for sort topics and as you are using SynSort you need to post there. This topic has been moved there and certain changes made to your original post. Please study it carefully and avoid making repeated mistakes.

Your messages are clear and the *s indicate where the errors were discovered. ou need to study the manual to learn the format of the various statements and continuations of them.

Re: INREC IFTHEN no key words found on control statement

PostPosted: Thu Sep 20, 2018 5:53 pm
by thotlma
//STEP001   EXEC PGM=SORT                                      
 //SORTIN    DD DSN=TRP.Q.KR0Z2R99.TRPIZ291.ISA.DAT(0),DISP=SHR  
 //SORTOUT   DD DSN=TRP.Q.KR0Z2R99.TRPIZ291.ISA.OUP(+1),        
 //             DISP=(NEW,CATLG,DELETE),                        
 //             DCB=(LRECL=100,BLKSIZE=0,RECFM=FB),              
 //             SPACE=(CYL,(20,10),RLSE)                        
 //SYSPRINT  DD SYSOUT=*                                        
 //SYSOUT    DD SYSOUT=*                                        
 //SYSIN     DD *                                                
   OPTION COPY                                                  
     INREC IFTHEN=(WHEN=(5,1,CH,EQ,C','),                        
     OUTREC BUILD=(1,1,1Z,2:3,2,4:6,15)                          
     IFTHEN=(WHEN=(4,1,CH,EQ,C','),                              
     OUTREC BUILD=(1,1,1Z,2:2,2,4:5,15)                    

please see above the code

Re: INREC IFTHEN no key words found on control statement

PostPosted: Thu Sep 20, 2018 5:56 pm
by enrico-sorichetti
did You notice that Your posts have been edited to use the code tags :?: :evil:

Re: INREC IFTHEN no key words found on control statement

PostPosted: Thu Sep 20, 2018 6:22 pm
by NicC
please see above the code

Which is exactly the same as your previous paost but without the indicatore=s added by SyncSort when it was editing the control statements. Specifically the INREC has no contiuation provide despite you having coded a comma at the end (OUTREC is not part of INREC - it is a separate statement). IFTHEN is a subkeyword but you have not provided a keyword. Do notmake up your own syntax. Use that described in the manual paying special attention to what are keywords and what are sub-keywords.