Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: SUM FIELDS = NONE. ensuring the record comes from 1st file
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: 208
Location: Cochin/Kerala/India

PostPosted: Mon Mar 16, 2009 1:41 pm    Post subject:
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    Post subject:
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: 208
Location: Cochin/Kerala/India

PostPosted: Mon Mar 16, 2009 3:23 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us