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

How to sort the using the include condition


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

New User


Joined: 24 Aug 2006
Posts: 9

PostPosted: Mon Apr 23, 2007 1:13 pm
Reply with quote

Hi,

Can you help me how to do this:

I have 1 file but I need to include only certain records based on the condition below using sort or Icetools utility How can I do that.

1-6 Action Code
7-12 - Customer Number
13-14 Division Code
15-15 Channel ID
16-18 Receiving Country Code
19-21 - Country Number

This is the condition

1. Action Code = blank, or
2. Action Code = (blank or WCTLN1), and CUSTNUM is not blank, and BMDIV = 13, 4S, 4Z, 44, 88, and CHANID = G, H, J, K, L, and RCTRYNUM = CTRYNUM , or
3. Action Code = blank, and CUSTNUM is blank, and BMDIV = 88, and RCTRYNUM = CTRYNUM
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Apr 23, 2007 2:22 pm
Reply with quote

hey,

Please provide some sample input and ur desired output..
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: Mon Apr 23, 2007 8:54 pm
Reply with quote

Joel,

Quote:
1. Action Code = blank, or
2. Action Code = (blank or WCTLN1), and CUSTNUM is not blank, and BMDIV = 13, 4S, 4Z, 44, 88, and CHANID = G, H, J, K, L, and RCTRYNUM = CTRYNUM , or
3. Action Code = blank, and CUSTNUM is blank, and BMDIV = 88, and RCTRYNUM = CTRYNUM


These conditions don't make sense. Condition 1 will include all of the records with Action code = blank. So all of the records with Action code = blank will be included regardless of the other two conditions which also start with Action code = blank and add other conditions. The only other condition that adds anything is condition 2 for Action code = WCTLN1. I'd suggest reevaluating your conditions.

But for the sake of illustration, you could use DFSORT control statements like this for the stated conditions:

Code:

   OPTION COPY                                                     
   INCLUDE COND=(1,6,CH,EQ,C' ',OR,                               
                 ((1,6,CH,EQ,C' ',OR,1,6,CH,EQ,C'WCTLN1'),AND,     
                  7,6,CH,NE,C' ',AND,                             
                  13,2,SS,EQ,C'13,4S,4Z,44,88',AND,               
                  15,1,SS,EQ,C'GHJKL',AND,                         
                  16,3,CH,EQ,19,3,CH),OR,                         
                 (1,6,CH,EQ,C' ',AND,7,6,CH,EQ,C' ',AND,           
                  13,2,CH,EQ,C'88',AND,16,3,CH,EQ,19,3,CH))       
Back to top
View user's profile Send private message
joelacs1068

New User


Joined: 24 Aug 2006
Posts: 9

PostPosted: Mon Apr 23, 2007 10:07 pm
Reply with quote

Thanks frank. I just found out this that there are condition missing. but the reply that you gave helps a lot.

Once again thank you and more power
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top