Skip to main content

Hi,

how can I order with mfsort a field so defined


01 WK-IMP       PIC 9(16).9(2).

the data on the file is :
0000000000000001.00
0000000000000001.01
0000000000001000.00
0000000097426141.65
0000000095834049.25
-0000000000000001.00
0000000094884438.34
0000000094824605.26
0000000094454948.29
-0000000000000001.01


with SORT FIELDS=(67,20,NU,D)
-0000000000000001.01
-0000000000000001.00
0000000097426141.65
0000000095834049.25
0000000094884438.34
0000000094824605.26
0000000094454948.29
0000000000001000.00
0000000000000001.01
0000000000000001.00


with SORT FIELDS=(67,20,NU,A)
0000000000000001.00
0000000000000001.01
0000000000001000.00
0000000094454948.29
0000000094824605.26
0000000094884438.34
0000000095834049.25
0000000097426141.65
-0000000000000001.00
-0000000000000001.01


In MFSORT manuals in Field Type "You can find other field types defined in the IBM documentation at SORT Control Statement."

and SFF seems to be the right type.

instead mfsort give errors:

          Sequence 'SFF' invalid
SORT015U: Command statement error(s) detected

I cannot use SFF ?

thanks

bye

Hi,

how can I order with mfsort a field so defined


01 WK-IMP       PIC 9(16).9(2).

the data on the file is :
0000000000000001.00
0000000000000001.01
0000000000001000.00
0000000097426141.65
0000000095834049.25
-0000000000000001.00
0000000094884438.34
0000000094824605.26
0000000094454948.29
-0000000000000001.01


with SORT FIELDS=(67,20,NU,D)
-0000000000000001.01
-0000000000000001.00
0000000097426141.65
0000000095834049.25
0000000094884438.34
0000000094824605.26
0000000094454948.29
0000000000001000.00
0000000000000001.01
0000000000000001.00


with SORT FIELDS=(67,20,NU,A)
0000000000000001.00
0000000000000001.01
0000000000001000.00
0000000094454948.29
0000000094824605.26
0000000094884438.34
0000000095834049.25
0000000097426141.65
-0000000000000001.00
-0000000000000001.01


In MFSORT manuals in Field Type "You can find other field types defined in the IBM documentation at SORT Control Statement."

and SFF seems to be the right type.

instead mfsort give errors:

          Sequence 'SFF' invalid
SORT015U: Command statement error(s) detected

I cannot use SFF ?

thanks

bye

The note about the IBM compatibility applies to the MFJSORT utility which is used in JCL processing in our Enterprise products. mfsort does not support the additional IBM types as far as I can tell.

I can get your file to sort correctly when I use:
sort fields(1,20,LS,A)
Type LS is defined as: PIC S9 LEADING SEPARATE

When I sort using LS the output file is:
-0000000000000001.01
-0000000000000001.00
0000000000000001.00
0000000000000001.01
0000000000001000.00
0000000094454948.29
0000000094824605.26
0000000094884438.34
0000000095834049.25
0000000097426141.65