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

SUM FIELDS = NONE. ensuring the record comes from 1st file


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

New User


Joined: 26 Dec 2007
Posts: 18
Location: Chennai, India

PostPosted: Mon Mar 16, 2009 1:20 pm
Reply with quote

Hi,
I am using DFSORT for merging two files file X and file Y and sorting. In case of duplicate I need to make sure the record from file X is written into the output file. I understand that it is the basic thing in ICETOOL splice but need to know if this is possible without using splice. (It seems my project does not want me to use ICETOOL, instead I have to manage with DFSORT).
The following is a sample JCL:
Code:

//STEP0010 EXEC PGM=SORT 
//SORTIN   DD  *         
100FIELD1FILEX           
102FIELD1FILEX           
103FIELD1FILEX           
106FIELD1FILEX           
/*                       
//         DD  *         
101FIELD1FILEY           
100FIELD1FILEY           
102FIELD1FILEY           
104FIELD1FILEY           
105FIELD1FILEY           
/*                       
//SORTOUT  DD  SYSOUT=*   
//SYSIN    DD  *         
  SORT FIELDS=(1,3,ZD,A) 
  SUM FIELDS=NONE         
/*                       


The output I am getting in spool is
Code:

********************************* TOP OF DATA **********************************
100FIELD1FILEX                                                                 
101FIELD1FILEY                                                                 
102FIELD1FILEY                                                                 
103FIELD1FILEX                                                                 
104FIELD1FILEY                                                                 
105FIELD1FILEY                                                                 
106FIELD1FILEX                                                                 
******************************** BOTTOM OF DATA ********************************


In this case the problem is record 102 is being written from file Y where as I need to write it from file X.
Can any one help?
Back to top
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Mon Mar 16, 2009 1:41 pm
Reply with quote

Hi Sourav,
Use like this,

Code:

  SORT FIELDS=(1,3,ZD,A),EQUALS
  SUM FIELDS=NONE       


The EQUALS condition will maintain the order of the records in the input file.

Regards,
Bipin Peter
Back to top
View user's profile Send private message
sourav_dasgupta

New User


Joined: 26 Dec 2007
Posts: 18
Location: Chennai, India

PostPosted: Mon Mar 16, 2009 2:12 pm
Reply with quote

@Bipin
Thanks a lot. It worked as I wanted.

Thanks
Sourav
Back to top
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Mon Mar 16, 2009 3:23 pm
Reply with quote

Always Welcome.. icon_smile.gif
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top