|
View previous topic :: View next topic
|
| Author |
Message |
Ramanan-R
New User

Joined: 21 Mar 2007 Posts: 66 Location: Chennai, Tamilnadu, India
|
|
|
|
Hi All ,
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 |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
| Back to top |
|
 |
Ramanan-R
New User

Joined: 21 Mar 2007 Posts: 66 Location: Chennai, Tamilnadu, India
|
|
|
|
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 |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| 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 |
|
 |
Ramanan-R
New User

Joined: 21 Mar 2007 Posts: 66 Location: Chennai, Tamilnadu, India
|
|
|
|
Thanks a lot Arun , It worked after changing...
After reformatting the joined records, can we use INCLUDE COND & INREC on reformatted records?
Thanks!
Ramanan R |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8798 Location: Welsh Wales
|
|
|
|
| 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 |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
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 |
|
 |
Ramanan-R
New User

Joined: 21 Mar 2007 Posts: 66 Location: Chennai, Tamilnadu, India
|
|
|
|
| Arun, Thanks for the info... |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|