Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us