Sequence - incase of a duplicate key



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Sequence - incase of a duplicate key

Postby swaroopag » Wed Apr 15, 2009 8:59 pm

Hi..

I would like to know how the record might get sorted if the keys on which we are sequencing are duplicates..

Im using sequence control statement while writing the records into output file.
When the key is duplicate, the records are not output in the order they appear in the input file.
They are still getting sorted based on some field, of which Im not sure..

Anyone has got any idea on this?

Appreciate your help..
swaroopag
 
Posts: 2
Joined: Tue Apr 14, 2009 11:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sequence - incase of a duplicate key

Postby dick scherrer » Thu Apr 16, 2009 1:05 am

Hello,

Typically, when records are sorted, the only guaranteed sequence is the sort key(s).

If you want the sorted output to be in the same order as the input within the sorted key, you need to devine an additonal field to use as a sequence number or you need to make sure the sort option EQUALS is set.

Ask whoever supports your sort product how to set EQUALS if you do not want to use a sequence number.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post