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
 

 

Can we use JOINKEYS with SYNCTOOL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Mon Mar 01, 2010 12:21 pm    Post subject: Can we use JOINKEYS with SYNCTOOL?
Reply with quote

Hi All icon_smile.gif,

I actually tried the following JCL (SYNCTOOL with JOINKEYS) but Job abends with RC 16.

Sycsort Version:
Code:
SYNCSORT FOR Z/OS  1.3.2.0NI


JCL:
Code:
//JSTEP010 EXEC PGM=SYNCTOOL             
//**                                     
//TOOLMSG  DD SYSOUT=*                   
//DFSMSG   DD SYSOUT=*                   
//**                                     
//IN1      DD DSN=INPUT FILE 1...       
//            DISP=SHR                   
//*                                     
//IN2      DD DSN=INPUT FILE 2...       
//            DISP=SHR                   
//**                                     
//IN3      DD DSN=INPUT FILE 3...       
//            DISP=(NEW,CATLG,DELETE),   
//            UNIT=SYSDA,               
//            SPACE=(CYL,(200,150),RLSE),
//            DCB=*.IN1                 
//**                                     
//OUT1     DD DSN=OUTPUT FILE 1...       
//            DISP=(NEW,CATLG,DELETE),   
//            UNIT=SYSDA,               
//            SPACE=(CYL,(200,150),RLSE),
//            DCB=(RECFM=FB,LRECL=359,BLKSIZE=0)         
//*                                                       
//**                                                     
//TOOLIN   DD *                                           
  COPY FROM(IN1) TO(IN3)  USING(CTL1)                     
  COPY FROM(IN2) TO(OUT1) USING(CTL2)                     
/*                                                       
//CTL1CNTL DD *                                           
  OMIT COND=(001,001,CH,EQ,C'1')                         
/*                                                       
//CTL2CNTL DD *                                           
  JOINKEYS FNAMES=IN2,FIELDS=(01,10,A)                   
  JOINKEYS FNAMES=IN3,FIELDS=(32,10,A)                   
  JOIN UNPAIRED,IN2                                       
  REFORMAT FIELDS=(IN3:2,9,IN2:1,350),FILL=(X'FF')       
  SORT FIELDS=COPY                                       
  OUTFIL IFTHEN=(WHEN=(1,1,CH,EQ,X'FF'),OVERLAY=(1:11,09))
/*


DFSMSGfor CTL2CNTL:
Code:
CTL2CNTL :                                               
  JOINKEYS FNAMES=IN2,FIELDS=(01,10,A)                   
           *                                             
  JOINKEYS FNAMES=IN3,FIELDS=(32,10,A)                   
           *                                             
  JOIN UNPAIRED,IN2                                       
               *                                         
  REFORMAT FIELDS=(IN3:2,9,IN2:1,350),FILL=(X'FF')       
           *                                             
  SORT FIELDS=COPY                                       
  OUTFIL IFTHEN=(WHEN=(1,1,CH,EQ,X'FF'),OVERLAY=(1:11,09))
WER428I  CALLER-PROVIDED IDENTIFIER IS "0002"             
WER268A  JOINKEYS STATEMENT: SYNTAX ERROR                 
WER268A  JOINKEYS STATEMENT: SYNTAX ERROR                 
WER268A  JOIN STATEMENT    : SYNTAX ERROR                 
WER268A  REFORMAT STATEMENT: SYNTAX ERROR                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000


I also tried with JOINKEYS FILES but giving the same error...

When using JOINKEYS, shouldn't we give both the files that needs to be joined in TOOLIN as below? Actually i tried but Job abends with RC 12.

Code:
COPY FROM(IN2,IN3) TO(OUT1) USING(CTL2)


Please advise...

Thanks!
Ramanan R
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: Mon Mar 01, 2010 1:05 pm    Post subject:
Reply with quote

Shouldn't FNAMES be FILE={F1/F2} like in an example:
Code:
JOINKEYS FILES=F1,FIELDS=(15,10,A), CUSTOMER NUMBER
INCLUDE=(25,6,Y2T,GE,Y'030101') ONLY SINCE 2003
JOINKEYS FILES=F2,FIELDS=(1,10,A) CUSTOMER NUMBER
REFORMAT FIELDS=(F2:1,67, NAME/ADDRESS RECORD

Check with Alissa Margulies of SyncSort Mainframe Product Services to get a copy of "Exploiting SyncSort JOIN"
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Mon Mar 01, 2010 1:28 pm    Post subject:
Reply with quote

Ramanan-R,

A SYNCTOOL JOIN requires the input ddnames to be CTLnJNF1 and CTLnJNF2 for a CTLnCNTL sort card. Modify your job as the ones provided in these previous topics. (synctool jcls at the end of the topic)

http://ibmmainframes.com/viewtopic.php?t=43554&highlight=ctl1jnf1
http://ibmmainframes.com/viewtopic.php?t=36696&start=15
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Mon Mar 01, 2010 2:27 pm    Post subject:
Reply with quote

Hi CICS guy/Arun,

Thanks for the suggestions.. I tried as advised by Arun but the Job again abends with RC 16 with same error message...

JCL:

Code:
//JSTEP010 EXEC PGM=SYNCTOOL                                 
//**                                                         
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//**                                                         
//IN1      DD DSN=INPUT FILE...                             
//            DISP=SHR                                       
//*                                                         
//CTL1JNF1 DD DSN=INPUT FILE 1...                           
//            DISP=SHR                                       
//*                                                         
//CTL1JNF2 DD DSN=INPUT FILE 2 GENERATED FROM INPUT FILE 1...
//            DISP=SHR                                       
//**                                                         
//CTL1JNF3 DD DSN=INPUT FILE 3 GENERATED FROM INPUT FILE 1...
//            DISP=(NEW,CATLG,DELETE),                       
//            UNIT=SYSDA,                                   
//            SPACE=(CYL,(200,150),RLSE),                   
//            DCB=*.IN1                                     
//**                                                         
//DEMOOUT  DD DSN=OUTPUT FILE 1...                           
//            DISP=(NEW,CATLG,DELETE),                   
//            UNIT=SYSDA,                                 
//            SPACE=(CYL,(200,150),RLSE),                 
//            DCB=(RECFM=FB,LRECL=359,BLKSIZE=0)         
//*                                                       
//**                                                     
//TOOLIN   DD *                                           
  COPY FROM(IN1)      TO(CTL1JNF3) USING(CTL1)           
  SORT FROM(CTL1JNF1) TO(OUT1)     USING(CTL2)   << Should we use SORT/COPY, I assume SORT coz key fields needs to be sorted...
/*                                                       
//CTL1CNTL DD *                                           
  OMIT COND=(001,001,CH,EQ,C'1')                         
/*                                                       
//CTL2CNTL DD *                                           
  JOINKEYS FILE=F1,FIELDS=(01,10,A)                       
  JOINKEYS FILE=F3,FIELDS=(32,10,A)                       
  JOIN UNPAIRED,F1                                       
  REFORMAT FIELDS=(F3:2,9,F1:1,350),FILL=(X'FF')         
  SORT FIELDS=COPY                                       
  OUTFIL IFTHEN=(WHEN=(1,1,CH,EQ,X'FF'),OVERLAY=(1:11,09))
/*


DFSMSG for CTL2CNTL:

Code:
CTL2CNTL :                                                 
  JOINKEYS FILE=F1,FIELDS=(01,10,A)                       
  JOINKEYS FILE=F3,FIELDS=(32,10,A)                       
           *                                               
  JOIN UNPAIRED,F1                                         
  REFORMAT FIELDS=(F3:2,9,F1:1,350),FILL=(X'FF')           
                   *                                       
  SORT FIELDS=COPY                                         
  OUTFIL IFTHEN=(WHEN=(10,2,CH,EQ,C'W9'),OVERLAY=(1:11,09))
WER428I  CALLER-PROVIDED IDENTIFIER IS "0002"             
WER268A  JOINKEYS STATEMENT: SYNTAX ERROR                 
WER268A  REFORMAT STATEMENT: SYNTAX ERROR                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000


Thanks!
Ramanan R
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Mon Mar 01, 2010 6:44 pm    Post subject:
Reply with quote

Ramanan-R wrote:
I tried as advised by Arun
No, You have n't.
Arun Raj wrote:
the input ddnames to be CTLnJNF1 and CTLnJNF2 for a CTLnCNTL sort card

Re-read my above statement. You have used CTL1JNF2 and CTL1JNF3 for the sort card in CTL2CNTL which voilates the rule. AFAIK, ONLY F1 and F2 makes sense to sort input dd names as well as control cards as only two files can be matched at a time. You should have used CTL2JNF1 and CTL2JNF2 for your ddnames and F1/F2 in your control cards.
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Wed Mar 03, 2010 12:21 pm    Post subject:
Reply with quote

Thanks a lot Arun icon_biggrin.gif, It worked after changing...

After reformatting the joined records, can we use INCLUDE COND & INREC on reformatted records?

Thanks!
Ramanan R
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Mar 03, 2010 12:22 pm    Post subject:
Reply with quote

Ramanan-R wrote:
After reformatting the joined records, can we use INCLUDE COND & INREC on reformatted records?

Have you actually tried this yourself before asking someone else ?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Wed Mar 03, 2010 1:47 pm    Post subject:
Reply with quote

Ramanan-R,

And you dont really need a SYNCTOOL job with multiple data passes to do the above processing, you can simplify it into a single SyncSort JOIN with the OMIT processing combined to the JOINKEYS statement as shown below.
Code:
  JOINKEYS FILE=F1,FIELDS=(01,10,A),
           OMIT=(1,1,CH,EQ,C'1')
  JOINKEYS FILE=F2,FIELDS=(32,10,A)
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Wed Mar 03, 2010 2:28 pm    Post subject:
Reply with quote

Arun, Thanks for the info...
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 Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Joinkeys operation betwen VB and FB file Susanta SYNCSORT 4 Sun Sep 25, 2016 9:49 pm
No new posts Joinkeys with duplicated keys juares castro SYNCSORT 19 Fri Sep 23, 2016 5:58 am


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