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

DFSORT V1R5 and V1R10


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sankarcpp1

New User


Joined: 30 Oct 2005
Posts: 5
Location: India

PostPosted: Tue Jun 02, 2009 6:43 pm
Reply with quote

Hi,

I am using the below control card to SORT a input file(LREC=35 and number of records approximately 38000) based on the first 8 ch(account number).

SORT FIELDS=(1,8,CH,A)
OMIT COND=((1,4,CH,EQ,C'UHDR') or 1,4,CH,EQ,C'UTRL')

When I ran the job in production (uses DFSORT V1R5) and test(V1R10) region output files are not sync. I could find mismatches(SORTING ORDER) in the sorted output file between production and test regions.

Is there any reason behind why this mismatches(SORTING ORDER) in the output file?

Sankar.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 02, 2009 7:12 pm
Reply with quote

are the 'mismatches' equal keys?

I only know that the EQUALS option will maintain the sequence of equal keys.

possibly installation parms (default parms) are different.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Jun 02, 2009 7:15 pm
Reply with quote

may be your input files itself not same??? icon_wink.gif
Back to top
View user's profile Send private message
sankarcpp1

New User


Joined: 30 Oct 2005
Posts: 5
Location: India

PostPosted: Tue Jun 02, 2009 7:19 pm
Reply with quote

Input Files are same in production and test regions.

Also number of records in sorted output files too same but the sorted order is different in both the files.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jun 02, 2009 7:21 pm
Reply with quote

Sankar,

Welcome to the forums.

I dont think this is due to your version problem. The order of equally keyed records can be different unless you specify the 'EQUALS' parameter which retains the order of records as it appears in the input file.

DFSORT Application Programming Guide wrote:
EQUALS
specifies that the original sequence must be preserved.

NOEQUALS (Default)
specifies that the original sequence need not be preserved.
Back to top
View user's profile Send private message
sankarcpp1

New User


Joined: 30 Oct 2005
Posts: 5
Location: India

PostPosted: Tue Jun 02, 2009 7:39 pm
Reply with quote

Thanks.

Since the SORT control card is same in both the regions then why it is behaving in two different ways(two different output files).Anyway I am not mentioning the EQUALS options either in production (V1R5) and test (V1R10) regions.

As Dick Brenholtz said mismatches is only with the equal keys.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 02, 2009 7:49 pm
Reply with quote

Quote:
Since the SORT control card is same in both the regions then why it is behaving in two different ways(two different output files).Anyway I am not mentioning the EQUALS options either in production (V1R5) and test (V1R10) regions.


without the EQUALS option, the order of equal keys is unpredictable.

use the EQUALS option in both test and production to obtain equal results.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Jun 02, 2009 8:54 pm
Reply with quote

sankarcpp1,

As mentioned earlier OPTION EQUALS is what caused the difference in SORTING order. OPTION EQUALS specifies whether the original sequence of records that collate identically for a sort or a merge should be preserved from input to output.

As a simple example:
Code:

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:
Code:

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.
Code:

AAAA R2
AAAA R3
AAAA R1

or
Code:

AAAA R3
AAAA R1
AAAA R2

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

Run this step which will list all your site defaults and look for equals

Code:

//STEP0100 EXEC PGM=ICETOOL   
//TOOLMSG   DD SYSOUT=*       
//DFSMSG    DD SYSOUT=*       
//OUT       DD SYSOUT=*       
//TOOLIN    DD *               
  DEFAULTS LIST(OUT)           
/*                             
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top