Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How can I have multiple INCLUDE COND

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How can I have multiple INCLUDE COND
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 Moderator


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

PostPosted: Thu Aug 21, 2008 10:16 pm    Post subject:
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    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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us