IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can I have multiple INCLUDE COND


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Satyajit

New User


Joined: 25 Jan 2006
Posts: 27

PostPosted: Thu Aug 21, 2008 9:23 pm
Reply with quote

I am trying to perform the following operation thru sort but its not working.what is the correct way to do the same?

Code:

  SORT FIELDS=COPY                                                 
  INREC FIELDS=(1:15,8,10:112,4)                                 
  INCLUDE COND=((15,8,CH,EQ,C'ZTE1CBR',AND,112,4,CH,NE,C'0057',) 
            ,OR,(15,8,CH,EQ,C'ZTE1CBR',AND,112,4,CH,NE,C'    ')
            ,OR,(15,8,CH,EQ,C'ZTE1065',AND,112,4,CH,NE,C'0052'))   


If my input is for INCLUDE COND to be applied is

Code:

ZTE1CBR  0062
ZTE1CBR  0057
ZTE1CBR  0062
ZTE1CBR 
ZTE1065   0052
ZTE1065   0057
ZTE1065   0052


My Output should be
Code:

ZTE1CBR  0062
ZTE1CBR  0062
ZTE1CBR 
ZTE1065   0057
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Aug 21, 2008 10:16 pm
Reply with quote

Well, the correct syntax would be:

Code:

  SORT FIELDS=COPY                                                   
  INCLUDE COND=((15,8,CH,EQ,C'ZTE1CBR',AND,112,4,CH,NE,C'0057'),OR,   
                (15,8,CH,EQ,C'ZTE1CBR',AND,112,4,CH,NE,C' '),OR,   
                (15,8,CH,EQ,C'ZTE1065',AND,112,4,CH,NE,C'0052'))     
  INREC FIELDS=(1:15,8,10:112,4)                                     


But this does not give you the output you say you want from the input you show. The output for these control statements is:

Code:

ZTE1CBR  0062   
ZTE1CBR  0057   
ZTE1CBR  0062   
ZTE1CBR         
ZTE1065  0057   


You need to work out the correct logic for whatever it is you're trying to do and use the correct syntax as well.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top