Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Help required for writing a sort card

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sunilsangaraju

New User


Joined: 02 Dec 2003
Posts: 6

PostPosted: Tue Nov 04, 2008 2:35 pm    Post subject: Help required for writing a sort card
Reply with quote

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
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Nov 04, 2008 2:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sunilsangaraju

New User


Joined: 02 Dec 2003
Posts: 6

PostPosted: Tue Nov 04, 2008 3:02 pm    Post subject: Reply to: Help required for writing a sort card
Reply with quote

Hi Garry,

Already tried the same code but i am getting the abend that is attached.

Sunil.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Nov 04, 2008 3:06 pm    Post subject: Reply to: Help required for writing a sort card
Reply with quote

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
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Nov 04, 2008 3:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sunilsangaraju

New User


Joined: 02 Dec 2003
Posts: 6

PostPosted: Tue Nov 04, 2008 3:33 pm    Post subject: Reply to: Help required for writing a sort card
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 04, 2008 3:38 pm    Post subject:
Reply with quote

Are you sure that INCLUDE and OMIT can be used in the same statement like you have shown ?
Back to top
View user's profile Send private message
sunilsangaraju

New User


Joined: 02 Dec 2003
Posts: 6

PostPosted: Tue Nov 04, 2008 4:02 pm    Post subject: Reply to: Help required for writing a sort card
Reply with quote

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
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Nov 04, 2008 4:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 04, 2008 9:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 04, 2008 9:45 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us