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
 

 

How to sort the using the include condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to sort the using the include condition
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    Post subject:
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 Moderator


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

PostPosted: Mon Apr 23, 2007 8:54 pm    Post subject:
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    Post subject:
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    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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am


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