Page 1 of 1

Join two records

PostPosted: Wed Jun 25, 2008 3:03 pm
by chiru_sh
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.

Re: Join two records

PostPosted: Wed Jun 25, 2008 11:24 pm
by dick scherrer
Hello,

Did the answer to your same question in the other forum provide what you need?

Re: Join two records

PostPosted: Thu Jun 26, 2008 12:58 am
by Alissa Margulies
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...

Re: Join two records

PostPosted: Thu Jun 26, 2008 1:06 am
by Alissa Margulies
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.