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

Need help in sorting for a peculiar reqt .


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

Senior Member


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

PostPosted: Thu Aug 30, 2007 5:08 pm
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: 1287
Location: Chennai, India

PostPosted: Thu Aug 30, 2007 8:50 pm
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
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 Developer


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

PostPosted: Fri Aug 31, 2007 11:41 pm
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: 1287
Location: Chennai, India

PostPosted: Tue Sep 04, 2007 10:41 pm
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 Developer


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

PostPosted: Wed Sep 05, 2007 12:00 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Sorting a record spanned over multipl... DFSORT/ICETOOL 13
No new posts Creating additional seqnum/Literal wh... DFSORT/ICETOOL 4
No new posts ICETOOL Sorting and Discarding DUPS SYNCSORT 11
No new posts Sorting on text - but in non-alphabet... SYNCSORT 5
Search our Forums:

Back to Top