|
|
| Author |
Message |
sunilsangaraju
New User
Joined: 02 Dec 2003 Posts: 4
|
|
|
|
Hi All,
I want to write a sort card to omit records matching the below criteria.
OMIT COND=(226,1,CH,EQ,C'X',AND,3,3,CH,EQ,any of the values(T08,T09,T10,T11,P0Y,P0Z,P1A,P1B))
thanks & Regards,
Sunil. |
|
| Back to top |
|
 |
References
|
|
 |
Moved: Tue Nov 04, 2008 2:40 pm by superk From JCL to DFSORT/ICETOOL |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
Have you tried
| Code: |
OMIT COND=(226,1,CH,EQ,C'X',AND,
(3,3,CH,EQ,C'T08',OR,3,3,CH,EQ,C'T09',OR,
3,3,CH,EQ,C'T10',OR,3,3,CH,EQ,C'T11',OR,
3,3,CH,EQ,C'P0Y',OR,3,3,CH,EQ,C'p0z',OR,
3,3,CH,EQ,C'P1A',OR,3,3,CH,EQ,C'P1B')) |
Garry. |
|
| Back to top |
|
 |
sunilsangaraju
New User
Joined: 02 Dec 2003 Posts: 4
|
|
|
|
Hi Garry,
Already tried the same code but i am getting the abend that is attached.
Sunil. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3156 Location: italy
|
|
|
|
DO NOT POST SCREENSHOTS
why use 50kb when numberoflines * 80 is enough
also DSS..... are not sort messages
maybe you are using a jcl checker who believes on its smartness to check sort statements
but jcl checkers are seldom up to date with the current syntax of most sort products |
|
| Back to top |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
Also -
Why are you using both INCLUDE and OMIT keywords in the same SORT=COPY ?? You should use either INCLUDE or OMIT.
Garry. |
|
| Back to top |
|
 |
sunilsangaraju
New User
Joined: 02 Dec 2003 Posts: 4
|
|
|
|
Hi Garry,
My requirement is to include the records that have X in position 225 and exclude the records with (x in position 226 and T08,T09 etc in position 3).
regards,
Sunil. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3543 Location: Brussels once more ...
|
|
|
|
| Are you sure that INCLUDE and OMIT can be used in the same statement like you have shown ? |
|
| Back to top |
|
 |
sunilsangaraju
New User
Joined: 02 Dec 2003 Posts: 4
|
|
|
|
Hi Garry,
Include and Omit does not work in the same statement.
i have split my sort card into 2, 1 for include and 2 for omit.
it is working fine for the above process. |
|
| Back to top |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
I believe you can only have either INCLUDE or OMIT. Depending on your exact requriements, you need to specify the complete condition in the one statement e.g.
| Code: |
INCLUDE COND=(225,1,CH,EQ,C'X',AND,
(226,1,CH,NE,C'X',AND,
(3,3,CH,EQ,C'T08',OR,3,3,CH,EQ,C'T09',OR,
3,3,CH,EQ,C'T10',OR,3,3,CH,EQ,C'T11',OR,
3,3,CH,EQ,C'P0Y',OR,3,3,CH,EQ,C'P0Z',OR,
3,3,CH,EQ,C'P1A',OR,3,3,CH,EQ,C'P1B'))) |
Garry. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4607 Location: San Jose, CA
|
|
|
|
| Quote: |
| My requirement is to include the records that have X in position 225 and exclude the records with (x in position 226 and T08,T09 etc in position 3). |
This is an ambiguous definition for your requirement. For example, would you want to include or exclude a record that has X in position 225, X in position 226 and T08 in positions 3-5? You need to define what you want more clearly.
Note that you don't need to write all those OR conditions for the 3-5 test - you can use an SS condition like this:
| Code: |
3,3,SS,xx,
C'T08,T09,T10,T11,P0Y,P0Z,P1A,P1B'
|
where xx is EQ or NE. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4607 Location: San Jose, CA
|
|
|
|
| Quote: |
| Include and Omit does not work in the same statement. |
You cannot have an INCLUDE statement and an OMIT statement.
You can have an INCLUDE statement and an OMIT operand in an OUTFIL statement.
You can write an INCLUDE statement in such a way that it handles "include" and "omit" conditions. |
|
| Back to top |
|
 |
|
|
|