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
 

 

File reformatting using syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: File reformatting using syncsort
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: 2150
Location: At my coffee table

PostPosted: Thu Apr 22, 2010 8:56 pm    Post subject:
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: 500
Location: USA

PostPosted: Sat Apr 24, 2010 2:45 am    Post subject:
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    Post subject: Reply to: File reformatting using syncsort
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: 500
Location: USA

PostPosted: Mon Apr 26, 2010 8:36 pm    Post subject:
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    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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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