IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Help Need in JoinKeys


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Wed Oct 06, 2010 1:33 am
Reply with quote

Hi,

Here is the requirement.

I have 2 input files.

File1 : Lrecl - 108
File2: Lrecl - 113


I my key is 1,10 in both files. I wanted to get the matched records from
File1, and unmatched records from File1 and Unmatched records File 2.

Below is the sort card i used. but its giving error
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
SORT FIELDS=COPY
REFORMAT FIELDS=(F1:1,110,F2:1,113)
OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD=(001,110)
OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
OUTFIL FNAMES=MATCH,SAVE,BUILD=(1,223)

Error:

JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
SORT FIELDS=COPY
REFORMAT FIELDS=(F1:1,110,F2:1,113)
OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD=(001,110)
OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
OUTFIL FNAMES=MATCH,SAVE,BUILD=(1,223)
*
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Can you please help me in this
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 06, 2010 1:54 am
Reply with quote

Hello,

It may help if you post the jcl used for this execution. . .
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Oct 06, 2010 1:54 am
Reply with quote

FWIW, I don't have Syncsort, but I'll bet that the OUTFIL statement being flagged should be formatted like this:

OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)
Back to top
View user's profile Send private message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Wed Oct 06, 2010 2:28 am
Reply with quote

Hi,

I tried with your suggestion...but it didnt work...sorry...
Back to top
View user's profile Send private message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Wed Oct 06, 2010 2:32 am
Reply with quote

here is the jcl:

Code:
//SORTJNF2 DD DISP=SHR,DSN=PROD.FILE.F2                 
//SORTJNF1 DD DISP=SHR,DSN=PROD.FILE.F1                 
//SYSOUT   DD SYSOUT=*                                   
//MATCH    DD DSN=PROD.FILE.F2.MATCH,                   
//             DISP=(NEW,CATLG,DELETE),                 
//             DCB=(MODEL,LRECL=223,RECFM=FB,BLKSIZE=0),
//             UNIT=DISK,SPACE=(CYL,(200,20),RLSE)       
//ONLYF1   DD DSN=PROD.FILE.F1.UNMTCH,                   
//             DISP=(NEW,CATLG,DELETE),                 
//             DCB=(MODEL,LRECL=223,RECFM=FB,BLKSIZE=0),
//             UNIT=DISK,SPACE=(CYL,(200,20),RLSE)       
//ONLYF2   DD DSN=PROD.FILE.F2.UNMTCH,                   
//             DISP=(NEW,CATLG,DELETE),                 
//             DCB=(MODEL,LRECL=223,RECFM=FB,BLKSIZE=0),
//             UNIT=DISK,SPACE=(CYL,(200,20),RLSE)       
//SYSIN    DD *                                         
  JOINKEYS FILES=F1,FIELDS=(1,10,A)                     
  JOINKEYS FILES=F2,FIELDS=(1,10,A)                     
  JOIN UNPAIRED,F1,F2                                   
  SORT FIELDS=COPY                                       
  OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD= (001,110)
  OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
  OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)             


If my key is matched i need to get the matched records from File2
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 06, 2010 2:42 am
Reply with quote

Hello,

Quote:
I tried with your suggestion...but it didnt work...sorry...
Posting "it didn't work" is simply a waste of everyone's time. . .

What happened? An error? unexpected/unwanted output? An abend?
Back to top
View user's profile Send private message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Wed Oct 06, 2010 3:37 am
Reply with quote

Its abended with syntax error.

SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1F464, MODEL 2097 603
SYSIN :
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
SORT FIELDS=COPY
REFORMAT FIELDS=(F1:1,110,F2:1,113)
OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD=(001,110)
OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)
*
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Oct 06, 2010 7:06 am
Reply with quote

What's you input LRECLs?

Correct your OUTFIL SYNTAX and check the file positions.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Oct 06, 2010 7:12 am
Reply with quote

Your file-1 LRECL is 108 and you're trying to access 110th byte. Correct it
Quote:
REFORMAT FIELDS=(F1:1,110,F2:1,113)
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Oct 06, 2010 11:27 am
Reply with quote

superk wrote:
FWIW, I don't have Syncsort, but I'll bet that the OUTFIL statement being flagged should be formatted like this:

OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)
Kevin,

Syncsort gives an error if the SAVE "parameter" is enclosed within parantheses saying "SAVE" ddname not defined.
If OUTFIL FNAMES is used, then the parantheses followed must be having only ddnames.

Since the "SAVE" is used in this case as a parameter and not a ddname, the OUTFIL given by the OP does n't seem to have any problem.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Sort with JOINKEYS using two VB files DFSORT/ICETOOL 1
No new posts JOINKEYS, how to keep all occurrences? DFSORT/ICETOOL 2
Search our Forums:

Back to Top