View previous topic :: View next topic
|
Author |
Message |
kvmahesh
New User
Joined: 16 Dec 2009 Posts: 2 Location: Chennai
|
|
|
|
Hi,
We are trying to convert a NATURAL program that does an internal SORT to a COBOL program internal sort routine.
As part of the conversion we tried to compare the sort results of both codes (NATURAL and COBOL) output we found that Sorted records for similar key values are being produced in differently in NATURAL and COBOL.
Can you please with the reason why it is behaving differently, is there any difference in NATURAL and COBOL sorting routines and if so, how to solve the issue.
Thanks in advance.
Regards
Magesh.K.V |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
investigate the options of the sort product installed in Your organization!
for IBM DFSORT at least
it is clearly stated that unless (*) is specified the sort order for records with the same sort key will be unpredictable
(*) OPTIONS EQUALS
check the mauals of Your sort product for the exact syntax |
|
Back to top |
|
|
kvmahesh
New User
Joined: 16 Dec 2009 Posts: 2 Location: Chennai
|
|
|
|
Thanks for your response...
I know there is a option in SYNCSORT and DFSORT that has EQUALS to preserve the sequence..
How about controlling that in COBOL internal sort. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
in the manuals is explained how to add additional options that cannot be specified when using internal sorts
usually adding a dd with the additional options
quoting from IBM...
Quote: |
DFSPARM Data Set
z/OS V1R8.0-V1R9.0 DFSORT Application Programming Guide
SC26-7523-02
Use with direct or program invocation.
Overrides all other sources.
Accepts all DFSORT program control statements, and all EXEC PARM options, including those OPTION statement parameters ignored by SYSIN and SORTCNTL.
Permits comment statements, blank statements, and remarks. |
look like the forum is becoming more and more a manual reading and searching service |
|
Back to top |
|
|
|