View previous topic :: View next topic
|
Author |
Message |
vijay_bn79
New User
Joined: 20 Nov 2006 Posts: 48 Location: Hyderabad
|
|
|
|
Is it possible to Sort Comp-3 type data using sort Card in JCL
Example:-
01 WS-DATA 9(15) comp-3.
Input
000000000000042
000000000000023
000000000000051
Output should be
000000000000051
000000000000042
000000000000023
I want to Sort on the basis of last position that is 15th position |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
Your input does not look packed. The packed input can be sorted using
sort fields =(position, 08, pd, ascending/descending) into packed output. Then you would have to used edits of OUTREC to get the required output in numeric display format. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If your example data is the "visable" value of some packed-decimal field, you have not shown the sign. How should negatives be handled in your requirement?
Comp-3 fields can be properly sorted, but your requirement goes beyond just sorting a packed-decimal field. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|