Tom Marchant wrote on 09/09/2006 02:52:16 PM:
>>That won't work if the EQUALS function is needed.
>>
>You lost me with that one, Frank. I don't see how anything is lost if you
>sort a 5 digit packed decimal as a 3 byte binary as opposed to a 2 and a
>half byte binary.

The EQUALS functions says you want records with equally collating keys to
be sorted in their original order.  So if your input is:

R1 X'1D'
R2 X'1C'
R3 X'1D'
R4 X'1C'

with EQUALS you want the output to be:

R1 X'1D'
R2 X'1C'
R3 X'1D'
R4 X'1C'

With p,0.4,BI,A, that's what you'll get because the "sign" is ignored.

But with p,1,CH,A or p,1,BI,A, you'll get:

R2 X'1C'
R4 X'1C'
R1 X'1D'
R3 X'1D'

because the "sign" isn't ignored.

Of course, if the second order is acceptable, then it doesn't matter.

Frank Yaeger - DFSORT Team (IBM)
 Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

 => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to