> ASIS ->       SORT FIELDS=(1,4,CH,A,5,6,CH,A,11,6,CH,A)
> Modified ->   SORT FIELDS=(71,4,BI,A,5,6,CH,A,11,6,CH,A),EQUALS
> Please let me know why then the difference is comming in the sort as we 
are not changing any other fields?

Ron,

Your Original sort card did NOT have the EQUALS which means that records 
with the same key can be in any order. In your modified sort card you have 
EQUALS which means DFSORT keep records with the same key (duplicate 
records) in their original order.

As a simple example:


AAAA R1
AAAA R2
AAAA R3

If we sort these three records on positions 1-4 with EQUALS with 
DFSORT,the output is guaranteed to be:


AAAA R1
AAAA R2
AAAA R3

because EQUALS says to keep records with the same key (duplicate records) 
in their original order.

However, if we sort these three records on positions 1-4 with NOEQUALS 
with DFSORT the output can have those records in any order, e.g.

AAAA R2
AAAA R3
AAAA R1

or


AAAA R3
AAAA R1
AAAA R2 

because NOEQUALS says that records with the same key can be in any order.

Check this link which explains in detail about the EQUALS parm

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca60/3.14?

Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <[email protected]> wrote on 
07/22/2014 11:10:51 AM:

> From: Ron Thomas <[email protected]>
> To: [email protected]
> Date: 07/22/2014 11:11 AM
> Subject: Re: SORT JCL
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> Team.
> 
> 
> The below are the sort cards we are using. The first one is the 
> existing one and 2'nd one is the new one.
> 
> ASIS ->       SORT FIELDS=(1,4,CH,A,5,6,CH,A,11,6,CH,A)
> Modified -> SORT FIELDS=(71,4,BI,A,5,6,CH,A,11,6,CH,A),EQUALS
> 
> In the ASIS data is the customer number and 71,4 position also the 
> customer number , but the format is s9(09) comp.
> 
> Please let me know why then the difference is comming in the sort as
> we are not changing any other fields?
> 
> Thanks
> Ron T
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to