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

XSUM in SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ext1fma

New User


Joined: 23 Jun 2006
Posts: 2

PostPosted: Sun Jun 25, 2006 11:05 am
Reply with quote

Hi every one,
I have two input files I need to merge them using SYNCSORT, however I do need to files that is SORTIN01 DD and SORTIN02 DD, The fields that I need to merge the two file are in different position and also XSUM is needed.
I appreciate your help
Thanks
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Mon Jun 26, 2006 6:05 pm
Reply with quote

Hi,
Please put your query in detail.To get the correct and quick solution,proivde the following.

1)Lrecl,format
2)Input files dummy data
3)Expected o/p data

Thank you
Krishy
Back to top
View user's profile Send private message
ext1fma

New User


Joined: 23 Jun 2006
Posts: 2

PostPosted: Tue Jun 27, 2006 7:34 am
Reply with quote

Just 2 data files we need to sort and merge them in one file, based on a number which in the first file is in position 5, length of 5 and the second the number is in position 25 length 5
Thank you krishy
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue Jun 27, 2006 5:58 pm
Reply with quote

ext1fma,

You haven't provided enough info.I just coded the below SORT step that I understood from your reply.

Here the code.Please check and let me know if you need any modification.

Here I am sorting the first file from 2 position to 5 (of length 3) and
second file from position 6 to 8 (of length 3).You can change the code as per your requirement.



Code:


//PS020    EXEC PGM=SYNCTOOL                                         
//SYSOUT   DD  SYSOUT=*                                             
//TOOLMSG  DD  SYSOUT=*                                             
//DFSMSG   DD  SYSOUT=*                                             
//IN1      DD  *                                                     
12345                                                               
21245                                                               
54654                                                               
//TEMP1    DD  DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,2),RLSE)           
//IN2      DD  *                                                     
12345678                                                             
12345123                                                             
12345643                                                             
//TEMP2    DD  DSN=&T2,DISP=(,PASS),SPACE=(CYL,(1,2),RLSE)           
//CON      DD  DSN=*.TEMP1,VOL=REF=*.TEMP1,DISP=SHR                 
//         DD  DSN=*.TEMP2,VOL=REF=*.TEMP2,DISP=SHR                 
//OUT      DD  SYSOUT=*                                             
//TOOLIN   DD  *                                                     
   SORT FROM(IN1) TO(TEMP1) USING(CTL1)                             
   SORT FROM(IN2) TO(TEMP2) USING(CTL2)                             
   SORT FROM(CON) TO(OUT) USING(CTL3)                               
//CTL1CNTL DD  *                                                     
   SORT FIELDS=COPY                                                 
   OUTREC FIELDS=(1,5,3X,2,3)                                       
//CTL2CNTL DD  *                                                     
   SORT FIELDS=COPY                                                 
   OUTREC FIELDS=(1,8,6,3)                                           
//CTL3CNTL DD  *                                                     
   SORT FIELDS=(9,3,CH,A)                                           
   OUTREC FIELDS=(1,8)                                               
/*                                                                   



The o/p will be

Code:

12345123
21245   
12345   
54654   
12345643
12345678


Thank you
Krishy
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top