Join two records



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Join two records

Postby chiru_sh » Wed Jun 25, 2008 3:03 pm

Hi all,

I am new to Syncsort. Previusly used DFSORT, but dont know the equivalent syntaxes for SPLICE, so stuck up.

I have two files like

File 1
11111111

File 2
22222222

I wanted to join two files in order to make it one. Like the below file

File3
1111 TO 2222

So had written syntax like this
//IN1       DD DSN=AP019.TEST.DATE1,DISP=SHR                 
//IN2       DD DSN=AP019.TEST.DATE2,DISP=SHR                 
//CTL1JNF1  DD DSN=AP019.TEST.NF1,                           
//             DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,           
//             VOL=SER=MODL03,SPACE=(TRK,(30,5),RLSE)       
//CTL1JNF2  DD DSN=AP019.TEST.NF2,                           
//             DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,           
//             VOL=SER=MODL03,SPACE=(TRK,(30,5),RLSE)       
//CTL3OF01  DD DSN=AP019.TEST.FTEMP,                         
//             DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,           
//             VOL=SER=MODL03,SPACE=(TRK,(30,5),RLSE)       
//FTEMP     DD DSN=AP019.TEST.FTEMP1,                       
//             DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,           
//             VOL=SER=MODL03,SPACE=(TRK,(30,5),RLSE)       
//TOOLIN    DD *                                             
 COPY FROM(IN1) TO(CTL1JNF1) USING(CTL1)                 
 COPY FROM(IN2) TO(CTL1JNF2) USING(CTL2)                 
 COPY FROM(CTL1JNF1) TO(FTEMP) USING(CTL3)               
//OUT1      DD DSN=AP019.TEST.SORT1,                     
//             DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,       
//             VOL=SER=MODL03,SPACE=(TRK,(30,5),RLSE),   
//             DCB=(RECFM=FBA,LRECL=83,BLKSIZE=830)     
//CTL1CNTL DD *                                         
 OUTREC FIELDS=(1,8,81:C'1')                             
/*                                                       
//CTL2CNTL DD *                                         
 OUTREC FIELDS=(10:C'TO ',13:1,8,81:C'1')               
/*                                                       
//CTL3CNTL DD *                                         
 JOINKEYS FILES=F1,FIELDS=(81,1,A)                       
 JOINKEYS FILES=F2,FIELDS=(81,1,A)                       
 REFORMAT FIELDS=(F1:1,8,F2:9,72)                       
 SORT FIELDS=COPY                                       


But my output file looks like this
11111111


I am not able to undestand where I am going wrong. Can anybody help me on this.
I am new to SYNCTOOL so dont know REFORMAT fields all this exactly.
Any other approach in SYNCTOOL also appreciated.
chiru_sh
 
Posts: 1
Joined: Wed Jun 25, 2008 2:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Join two records

Postby dick scherrer » Wed Jun 25, 2008 11:24 pm

Hello,

Did the answer to your same question in the other forum provide what you need?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Join two records

Postby Alissa Margulies » Thu Jun 26, 2008 12:58 am

SyncSort's SYNCTOOL also supports SPLICE. Did you try coding a SPLICE application with SyncSort? The syntax should be the same. However, using SyncSort's JOIN feature may be more optimal...
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: Join two records

Postby Alissa Margulies » Thu Jun 26, 2008 1:06 am

chiru_sh wrote:I am new to SYNCTOOL so dont know REFORMAT fields all this exactly.

The REFORMAT control statement is used in conjunction with the JOINKEYS control statement, irregardless of whether you are executing SORT or SYNCTOOL. REFORMAT is fully documented in the SyncSort for z/OS 1.2 and 1.3 Programmer's Guide. If you do not have access to manuals, you may contact SyncSort Mainframe Product Services at 201-930-8260 or zos_tech@syncsort.com to request PDF versions.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post