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
 

 

Sort to eliminate duplicates on a special occasion

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

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Tue Jun 09, 2009 2:55 pm    Post subject: Sort to eliminate duplicates on a special occasion
Reply with quote

Hi,
My input file will look like as follows:

27,4 100,2 - <Start, length>
SHIP some character value
STAT some character value
SHCT some character value
EVNT 64
SHIP some character value
STAT some character value
SHCT some character value
EVNT 58
…………………………………………………………
<some records>
CART some character value
EVNT 70
…………………………………………………………
<some records>
Record no:s 1-5, 2-6, 3-7 are same. 4 & 8 are also same except the change in 100, 2 characters.

Expected output file is:
27,4 100,2
SHIP some character value
STAT some character value
SHCT some character value
EVNT 64
…………………………………………………………
<some records>
CART some character value
EVNT 70
…………………………………………………………
<some records>

To summarize, my requirement is to remove the the record where 100,2 character is 58 and also the associated duplicates.

Is this possible through dfsort/icetool?
Back to top
View user's profile Send private message

V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 200
Location: USA

PostPosted: Tue Jun 09, 2009 4:02 pm    Post subject:
Reply with quote

Hi Lijo,

It is possible.. But can you please tell that the value in 100,2 is always going to be 58 else what are all the possible values that can come in there.


Regards
Amar
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Tue Jun 09, 2009 4:29 pm    Post subject:
Reply with quote

Hi,

For 'EVNT' type records only three values - 58,64 & 70 are possible in 100,2 position.

For other records, these two bytes can have any character values...
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 Jun 10, 2009 9:20 pm    Post subject:
Reply with quote

I can't make any sense out of your example or explanation.

Quote:
To summarize, my requirement is to remove the the record where 100,2 character is 58 and also the associated duplicates.


What do you mean by "the associated duplicates"?

Quote:
Record no:s 1-5, 2-6, 3-7 are same


What do you mean by "records no:s 1-5, 2-6, 3-7"? These overlap. The first three records have three different values in 27,4 so how are they the same?

You need to give a better example of your input records and expected output records and explain in detail the "rules" for getting from input to output.
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Mon Jun 15, 2009 8:43 pm    Post subject:
Reply with quote

Quote:

What do you mean by "the associated duplicates"?
What do you mean by "records no:s 1-5, 2-6, 3-7"? These overlap. The first three records have three different values in 27,4 so how are they the same?

Records 1 to 4 forms a block. Similarly records 5 to 8. In these two blocks, 1 & 5 are same records. Similary, 2 & 6 are also same and so 3 & 7. 4 & 8 are also same except change in 100,2 characters.

My requirement is, if the file is having 100,2 characters as 58 and first 4 bytes as 'EVNT', then remove that record along with other records in that block (where 'block' is as explained above).

One block of records is always ended by 'EVNT' as first 4bytes.
One block cane be of two types
example block type 1:
(quoting only first 4bytes of record)

SHIP
STAT
SHCT
EVNT

example block type 2:
(quoting only first 4bytes of record)

CART
EVNT
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Mon Jun 15, 2009 8:51 pm    Post subject:
Reply with quote

Sorry...re-posting with correction:
Quote:

What do you mean by "the associated duplicates"?
What do you mean by "records no:s 1-5, 2-6, 3-7"? These overlap. The first three records have three different values in 27,4 so how are they the same?

Records 1 to 4 forms a block. Similarly records 5 to 8. In these two blocks, 1 & 5 are same records. Similary, 2 & 6 are also same and so 3 & 7. 4 & 8 are also same except change in 100,2 characters.

My requirement is, if the file is having 100,2 characters as 58 and 27,4 characters as 'EVNT', then remove that record along with other records in that block (where 'block' is as explained above).

One block of records is always ended by 'EVNT' in 27,4 bytes.
One block cane be of two types
example block type 1:
(quoting only 27,4bytes of record)

SHIP
STAT
SHCT
EVNT

example block type 2:
(quoting only 27,4bytes of record)

CART
EVNT
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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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