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
 

 

Need help in sorting for a peculiar reqt .

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Aug 30, 2007 5:08 pm    Post subject: Need help in sorting for a peculiar reqt .
Reply with quote

Please find below my requirement

The format of my input record is as follows

Code:

FORMAT OF INPUT RECORD

01  input-rec
    05 INP-CENTRE              PIC  X(06)               
    05 INP-XTN                    PIC  X(10)               
    05 INP-YTN                     PIC  X(10)               
    05 INP-GRP                     PIC  X(19)               
    05 INP-FILLER                 PIC  X(35) VALUE SPACES.



Code:

Input1:

centre|---XTN---|----YTN---|---- GRP --------|

2624332622433613          1111111111111111111
2624332622433620          1111111111111111111
262433          26224361001111111111111111111
262433          26224361051111111111111111111
2624332622436825          44444444
2624332622433625          222222
2624332622433626          222222
2624332622433627          222222
2624332622433628          222222
262433          2622436101222222
262433          2622436102222222
2624332622433613          11-0
2624332622433620          11-0
2624332622433621          11-0
262433          262243650011-0
262433          262243650111-0
2624332622433625          333333
2624332622433627          333333
262433          2622436510333333
262433          2622436520333333



The requirement is to remove the duplicate entry of a XTN under a different Group (GRP).

If a duplicate XTN is found then,the duplicate record should be written in Output file 2(same format as input)
But if all the XTNs under a GRP are found to be duplicates then all the GRP’s records(including records
that have XTN as spaces but having values in YTN)should go to a different output file(output file 3) .
These duplicate records should not be written in Output file 2.


Unique records should also written in Output file 1


Output1: Unique records


Code:

2624332622433613          1111111111111111111
2624332622433620          1111111111111111111
262433          26224361001111111111111111111
262433          26224361051111111111111111111
2624332622436825          44444444
2624332622433625          222222
2624332622433626          222222
2624332622433627          222222
2624332622433628          222222
262433          2622436101222222
262433          2622436102222222
2624332622433621          11-0
262433          262243650011-0
262433          262243650111-0



Output2 : Partial Duplicate

Code:

2624332622433613          11-0
2624332622433620          11-0


Output3 : Full Duplicate

Code:


2624332622433625          333333
2624332622433627          333333
262433          2622436510333333
262433          2622436520333333



Can ICETOOL be used for this reqt?
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Aug 30, 2007 8:50 pm    Post subject: Reply to: Need help in sorting for a peculiar reqt .
Reply with quote

are the requirements clear? am i not clear in explaining the requirements ?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Aug 30, 2007 9:07 pm    Post subject: Re: Reply to: Need help in sorting for a peculiar reqt .
Reply with quote

Aaru wrote:
are the requirements clear? am i not clear in explaining the requirements ?


Please remember that differnet folks are in different timezones.
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: Fri Aug 31, 2007 11:41 pm    Post subject:
Reply with quote

Your rules about the relationship between the groups and duplicate XTN numbers is not very clear. Are XTNs for one group duplicates if those XTNs are found in another group, or in any group, or what?

Also, I can't figure out what the rules are for blank XTN fields. Can you explain why some of them end up in output file1 and some end up in output file3 but none end up in output file2?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Sep 04, 2007 10:41 pm    Post subject: Reply to: Need help in sorting for a peculiar reqt .
Reply with quote

Thanks Frank for your reply. yes, it is a bit confusing.

I had used the SELECT and the SPLICE operator of ICETOOL and it worked.
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: Wed Sep 05, 2007 12:00 am    Post subject:
Reply with quote

I'm glad to hear you figured out a solution yourself.
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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Stripping and Sorting of VB file G SRINIVASA RAO SYNCSORT 5 Wed Sep 14, 2016 1:34 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


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