Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
sunilsangaraju

New User


Joined: 02 Dec 2003
Posts: 4

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
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

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: 4

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: 3156
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 User


Joined: 08 May 2006
Posts: 171
Location: Dublin, Ireland

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: 4

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: 3543
Location: Brussels once more ...

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: 4

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 User


Joined: 08 May 2006
Posts: 171
Location: Dublin, Ireland

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: 4607
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: 4607
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1