1..i need to group all the similar filed 1 next to one another.
2.Need to sort the file based on descending order of field 2.
3.If records are having same value in field 2 .Then i need to sort those records on desc order of field 3.
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
Hi ABi,
For
Quote:
1..i need to group all the similar filed 1 next to one another.
2.Need to sort the file based on descending order of field 2.
3.If records are having same value in field 2 .Then i need to sort those records on desc order of field 3.
Code:
SORT FIELDS = ( 1,7,CH,D,9,5,CH,D,14,5,CH,D)
For
Quote:
1.Need to sort the file based on descending order of field 2.
2.If records are having same value in field 2 .Then i need to sort those records on desc order of field 3.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Abi,
The output you show doesn't make any sense. A column of data can either be sorted ascending or descending. For your first column, ascending order would be 0263753, 1747870, 1757970 and descending order would be 1757970, 1747870, 0263753, but you show 1747870, 1757970, 0263753 which is NOT in ascending or descending order.
Code:
SORT FIELDS=(1,7,CH,A,9,5,CH,D,14,5,CH,D)
will work fine if you want the first column in ascending order and the second and third columns in descending order.
Code:
SORT FIELDS=(1,7,CH,D,9,5,CH,D,14,5,CH,D)
will work fine if you want all three columns in descending order.
If neither of those give you what you want, then you need to explain what exactly it is you want.