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

File reformatting using syncsort


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

New User


Joined: 22 Sep 2008
Posts: 10
Location: bangalore

PostPosted: Thu Apr 22, 2010 8:12 pm
Reply with quote

Hi

In my shop we are having syncsort product.My requirement is

Input file 1:
111 aaa
222 bbb
222 ddd
333 ccc
444 eee

Input file 2:

111 fff
222 hhh
444 jjj

output:
111 fff
222 hhh
222 hhh
333 ccc
444 jjj

My required output is to write all the records from input 1 and to populate the second column from input 2 only for matching records and write the remaining records as in input 1.

But we dont have icetool.Please suggest a way to do in syncsort.

Thanks
Satheesh
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 22, 2010 8:56 pm
Reply with quote

The Syncsort Manual wrote:
The join facility of SyncSort for z/OS provides the capability to join records from two source files. Each record from the first file with a given value in one or more fields (the join key) is joined to each record from the second file that has an identical value in its join key. The joined records are passed to the sort/copy process. The power of this facility is enhanced by the ability to eliminate records from either or both files and to control the disposition of paired and unpaired records resulting from the join operation.
Try it, you'll like it.....
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Sat Apr 24, 2010 2:45 am
Reply with quote

Based on the description of your requirement, here is a SyncSort for z/OS job that will provide the requested output:
Code:
//SORT1  EXEC PGM=SORT
//SORTJNF1 DD *       
111 AAA               
222 BBB               
222 DDD               
333 CCC               
444 EEE               
//SORTJNF2 DD *       
111 FFF               
222 HHH               
444 JJJ               
//SORTOUT DD SYSOUT=*
//SYSOUT  DD SYSOUT=*                                 
//SYSIN   DD *                                       
   JOINKEYS FILES=F1,FIELDS=(1,3,A)                   
   JOINKEYS FILES=F2,FIELDS=(1,3,A)                   
   JOIN UNPAIRED,F1                                   
   REFORMAT FIELDS=(F1:1,7,F2:5,3)                   
   INREC IFTHEN=(WHEN=(8,3,CH,EQ,C'  '),BUILD=(1,7)),
         IFTHEN=(WHEN=NONE,BUILD=(1,4,8,3))           
   SORT FIELDS=COPY                                   
/*           
Back to top
View user's profile Send private message
maintenure

New User


Joined: 22 Sep 2008
Posts: 10
Location: bangalore

PostPosted: Sat Apr 24, 2010 12:37 pm
Reply with quote

Thanks Sir.It is woking fine.Please provide Syncsort manual so that it will useful to me.

Thanks
Satheesh G
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Mon Apr 26, 2010 8:36 pm
Reply with quote

Documentation is available to all licensed SyncSort for z/OS customers. Please contact me offline at alissa.margulies@syncsort.com and provide me with the CPU serial number your company currently has licensed to run SyncSort for z/OS along with your corporate email account and I would be happy to provide you with the requested manuals.

Manuals are also available under special agreement to consultants and developers whose services are being retained by a licensed customer of Syncsort Incorporated. If you are a consultant or outsourced developer, please indicate that in your email. Thank you.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
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
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top