Skip to main content

What is the option in MFSORT for STABLE/NOSTABLE or EQUALS/NOEQUALS

  • February 15, 2013
  • 0 replies
  • 3 views

Problem:

STABLE or NO STABLE is an option of  SYNCSORT utility

EQUALS or NO EQUALS is an option of  DFSORT utility

DFSORT allows the user to set "option EQUALS=NO" or "option EQUALS=YES"

to determine whether or not equal-key records should appear in sorted order or the order in which they are found.

EQUALS tells the process to preserve the original order of the data within the "sort keys". If  EQUALS is not specified, the order of the data will be unpredictable beyond the specified keys.

Does MFSORT give the user this same option?

Resolution:

By virtue of the tree-based implementation  used in MFSORT, duplicate records are returned in the order in which they were found in the input file.

Unlike perhaps the DFSORT or SYNCSORT implementations in this regard, there is no overhead in producing the output in this way.

This behavior cannot be changed. Duplicates are returned in order.

The order in which you see duplicate records in the output is dependent upon the implementation of the sorting algorithm in use.

For MFSORT however, duplicates in order are a by-product of our sort algorithm, regardless of EQUALS=NO/YES, it cannot be turned off and incurs no additional overhead.

To look at it from a different perspective, for DFSORT and SYNCSORT where EQUALS=NO or NO STABLE is in effect, is the returned order predictable?

Old KB# 2262

#ServerExpress
#COBOL
#netexpress
#RMCOBOL
#AcuCobol