# getting OMIT COND syntax error

Author Message
Skss

New User

Joined: 16 Feb 2010
Posts: 46
Location: India

Posted: Thu Mar 28, 2013 8:50 am

Below is my SORT card

 Code: SYSIN DD * SORT FIELDS=COPY OMIT COND=(1,1,CH,EQ,C,'1',OR,1,1,CH,EQ,C,'0',OR, 1,4,CH,EQ,C,' THE',OR,1,1,CH,EQ,C,'   ') /*

When I run the above code I get the error
WER268A OMIT STATEMENT : SYNTAX ERROR

I did a HEX ON in my JCL as well and did not find anything unusual.

Anuj Dhawan

Senior Member

Joined: 22 Apr 2006
Posts: 6251
Location: Mumbai, India

Posted: Thu Mar 28, 2013 10:42 am

You don't need a "," after C, remove it and try again:

 Code: SYSIN DD * SORT FIELDS=COPY OMIT COND=(1,1,CH,EQ,C'1',OR,1,1,CH,EQ,C'0',OR, 1,4,CH,EQ,C' THE',OR,1,1,CH,EQ,C'   ') /*
Bill Woodger

Moderator Emeritus

Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

Posted: Thu Mar 28, 2013 12:43 pm

When you have something which is wrong, you have to give details of what is wrong. Anuj took the time to spot it anyway.

Try this. Is that easier to understand what is happening?

 Code: //SYSIN DD *   SORT FIELDS=COPY   OMIT COND=(1,1,CH,EQ,C'1',            OR,              1,1,CH,EQ,C'0',            OR,              1,4,CH,EQ,C' THE',            OR,              1,1,CH,EQ,C' ') /*

You can even try this, making use of the SS format to have all uses of that field specified together.

 Code: SORT FIELDS=COPY   OMIT COND=(1,1,S,EQ,C' ,0,1',            OR,              1,4,CH,EQ,C' THE') /*
Skss

New User

Joined: 16 Feb 2010
Posts: 46
Location: India

 Posted: Fri Mar 29, 2013 12:32 am Thanks! That helped! I guess I was blind to not see that error
Anuj Dhawan

Senior Member

Joined: 22 Apr 2006
Posts: 6251
Location: Mumbai, India

Posted: Fri Mar 29, 2013 10:30 am

 Quote: I guess I was blind
As Dr. sorichetti said in other thread, Doctor is here!

Glad that you got it working!
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Forum Replies Similar Topics can someone please help me in finding... IBM Tools 9 SYNCSORT Error - CONTROL FIELD BEYOND... SYNCSORT 10 Easytrieve EZABX007 with error code 0... CA Products 7 SARBCH REPORT DD writing error CA Products 1 EIBRESP =16 & EIBRESP2 = 01 while... CICS 4