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
 

 

Help Need in JoinKeys

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Help Need in JoinKeys
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

Site Director


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

PostPosted: Wed Oct 06, 2010 1:54 am    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Oct 06, 2010 1:54 am    Post subject: Reply to: Help Need in JoinKeys
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    Post subject: Reply to: Help Need in JoinKeys
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    Post subject:
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

Site Director


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

PostPosted: Wed Oct 06, 2010 2:42 am    Post subject:
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    Post subject: Reply to: Help Need in JoinKeys
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: 2180
Location: @my desk

PostPosted: Wed Oct 06, 2010 7:06 am    Post subject:
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: 2180
Location: @my desk

PostPosted: Wed Oct 06, 2010 7:12 am    Post subject:
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: 2180
Location: @my desk

PostPosted: Wed Oct 06, 2010 11:27 am    Post subject: Re: Reply to: Help Need in JoinKeys
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    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 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
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts JOINKEYs and Variable files migusd SYNCSORT 8 Fri Jun 17, 2016 3:16 am


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