Synctool or SPLICE solution possible !?



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

Synctool or SPLICE solution possible !?

Postby ranga_subham » Wed Sep 30, 2009 9:36 pm

Hi,

I have two input files to be compared (RECFM=FB, LRECL=80) and need to write matched records from FILE-2 to output.

File-1: Key field 1 to 6
----+----1----+----2----+----3----+----4----+
XMTR51 TG1SE51XXAS106591 NOT A VALID ORDER
YMVSF2 TG1SE51XXAS110365 NOT A VALID ORDER
ZPBDN3 TG1SE51XXAS110379 NOT A VALID ORDER


File-2: Key field 21 to 26
----+----1----+----2----+----3----+----4----+
1TZA9         232   XMTR51
0SVJ9         232   YMVSZ2
0SVJ9         232   ZPBDN3


Required Output:
1TZA9         232   XMTR51
0SVJ9         232   ZPBDN3


I have achieved it using JOINKEYS feature of Syncsort. Is it possible to achieve it using SPLICE or SELECT (Synctool) features too?

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Synctool or SPLICE solution possible !?

 

Re: Synctool or SPLICE solution possible !?

Postby Thampy » Thu Oct 01, 2009 4:52 am

Please try the following Jcl. I am assuming your both the input files record length are 80.

//STEP005 EXEC PGM=SYNCTOOL
//FILE1 DD *
XMTR51 TG1SE51XXAS106591 NOT A VALID ORDER
YMVSF2 TG1SE51XXAS110365 NOT A VALID ORDER
ZPBDN3 TG1SE51XXAS110379 NOT A VALID ORDER
//*
//FILE2 DD *
1TZA9 232 XMTR51
0SVJ9 232 YMVSZ2
0SVJ9 232 ZPBDN3
//*
//T1 DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(TRK,(10,10),RLSE)
//OUTPUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//SSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(FILE1) TO(T1) USING(CTL1)
COPY FROM(FILE2) TO(T1)
SPLICE FROM(T1) TO(OUTPUT) ON(21,6,CH) WITH(1,20) WITH(27,53)
//CTL1CNTL DD *
INREC BUILD=(20X,1,6,53X)
//*
Thampy
 
Posts: 35
Joined: Sat Sep 26, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 3 times

Re: Synctool or SPLICE solution possible !?

Postby ranga_subham » Thu Oct 01, 2009 9:29 pm

Thampy, I've tried your solution and got below result.....

0SVJ9 232 ZPBDN3


Thanks :?
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Synctool or SPLICE solution possible !?

Postby Thampy » Fri Oct 02, 2009 12:58 am

Ranga, I ran the jcl which I posted in the forum and I am getting two rows as you expected.
1TZA9 232 XMTR51
0SVJ9 232 ZPBDN3
Thampy
 
Posts: 35
Joined: Sat Sep 26, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 3 times

Re: Synctool or SPLICE solution possible !?

Postby ranga_subham » Wed Oct 07, 2009 10:33 pm

Thampy, I have tried your code with Syncsort v1.2.3 and Syncsort v1.3.2 and it gives me only one record in output :?

I have achieved it with this workaround:
//STEP0001 EXEC PGM=SYNCTOOL                 
//            DISP=SHR                       
//FILE1    DD *                               
XMTR51 TG1SE51XXAS106591 NOT A VALID ORDER   
YMVSF2 TG1SE51XXAS110365 NOT A VALID ORDER   
ZPBDN3 TG1SE51XXAS110379 NOT A VALID ORDER   
//*                                           
//FILE2    DD *                               
1TZA9 232 XMTR51                             
0SVJ9 232 YMVSZ2                             
0SVJ9 232 ZPBDN3                             
//*                                           
//T1       DD DSN=&&T1,                       
//            DISP=(MOD,PASS),               
//            SPACE=(CYL,(1,1),RLSE)         
//OUTPUT   DD SYSOUT=*                       
//TOOLMSG  DD SYSOUT=*                       
//SSMSG DD SYSOUT=*                           
//TOOLIN   DD *                                 
  COPY FROM(FILE1) TO(T1) USING(CTL1)           
  COPY FROM(FILE2) TO(T1)                       
  SELECT FROM(T1) TO(OUTPUT) ON(11,6,CH) LASTDUP
//CTL1CNTL DD *                                 
  INREC BUILD=(11:1,80)                         
//*                                             


Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post