Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

NATURAL and COBOL sort compare

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: NATURAL and COBOL sort compare
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Dec 16, 2009 1:45 pm    Post subject: Reply to: NATURAL and COBOL sort compare
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    Post subject: Reply to: NATURAL and COBOL sort compare
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Dec 16, 2009 1:54 pm    Post subject: Reply to: NATURAL and COBOL sort compare
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    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us