IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

NATURAL and COBOL sort compare


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kvmahesh

New User


Joined: 16 Dec 2009
Posts: 2
Location: Chennai

PostPosted: Wed Dec 16, 2009 1:38 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Dec 16, 2009 1:45 pm
Reply with quote

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
View user's profile Send private message
kvmahesh

New User


Joined: 16 Dec 2009
Posts: 2
Location: Chennai

PostPosted: Wed Dec 16, 2009 1:49 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Dec 16, 2009 1:54 pm
Reply with quote

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 icon_evil.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top