|
View previous topic :: View next topic
|
| Author |
Message |
william51 Warnings : 1 New User
Joined: 06 Jul 2006 Posts: 31
|
|
|
|
How to sort a variable length file directly.I mean don't convert it to fixed length file.
how to specify the fields statement?for instance,i wan to sort a VF file and take the column 6 to 8 as the key field,how can write the parameters?
sort fields=?
Thanks |
|
| Back to top |
|
 |
Jerry
New User

Joined: 16 Sep 2005 Posts: 42
|
|
|
|
Hi William,
You would refer the column as column number + 4. If it is column 6 to 8,
then you would give as,
sort fields=(10,2,CH) |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
To sort columns 6 to 8 of a VB file in ascending order, you would use this DFSORT statement:
| Code: |
SORT FIELDS=(10,3,CH,A)
|
|
|
| Back to top |
|
 |
william51 Warnings : 1 New User
Joined: 06 Jul 2006 Posts: 31
|
|
|
|
it didn't work.
why 25128 followed by 25100?
the parameter is below
000021 //SYSIN DD *
000022 SORT FIELDS=(5,5,CH,A)
000023 END
000024 /*
the result is below
000017 2512500000000000
000018 2512800000000000
000019 j 2510045600000000
000020 j 2510045600000000
000028 j 2512845700000000
000029 2510045600000000
000030 2510045600000000
in hex mode
000017 2512500000000000
0300FFFFFFFFFFFFFFFF
08002512500000000000
------------------------------------
000018 2512800000000000
0300FFFFFFFFFFFFFFFF
08002512800000000000
------------------------------------
000019 j 2510045600000000
0900FFFFFFFFFFFFFFFF
01002510045600000000
------------------------------------
000020 j 2510045600000000 |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Oops. I can't close this thead since it's not in the Forum I moderate.
Moderator - please close this duplicate thread. |
|
| Back to top |
|
 |
|
|