candyboy
New User
Joined: 13 Nov 2006 Posts: 10
|
|
|
|
Hi,
I am facing this strange issue: I have data in input file as:
ID S# E# R# DATE
(Char 15) (s9(8) COMP-3)
03111111, 172, 1, A 20070904
03222222, 31, 10, B 19920723
03222222, 31, 9, K 19991201
03222222, 31, 8, K 20001201
03222222, 31, 7, K 20011201
03222222, 31, 6, K 20021201
03222222, 31, 5, K 20031201
03222222, 31, 4, K 20041201
03222222, 31, 3, K 20051201
03222222, 31, 2, K 20061201
03222222, 31, 1, K 20070817
03222222, 100, 1, A 20070817
03444444, 106, 1, A 20070827
I am sorting the above file based on field ID & DATE in ascending order. The two rows marked in red have the same value of sort key.
When I sort the complete file containing many other IDs (including the above 3), the order of rows highlighted in red changes. But when
I extract only this ID records to a different input file and run same sort on it, the order remains same. Any idea why this is happening?
I want the order to remain same if the sort key is same for two entries. My sort card is like: SORT FIELDS=(1,15,CH,A,31,5,PD,A) where
1,15 is ID and 31,5 is date.
Thanks CB |
|