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
 

 

XSUM in SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: XSUM in SYNCSORT
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    Post subject:
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    Post subject: xsum
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


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