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

JOINKEYS error while sorting


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

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sat Jul 09, 2011 2:28 pm
Reply with quote

Hi,

I have to merge two files having the first twenty bytes of data same.

My requirement is to select the first 40 bytes of data from first file and merge it with the second file. I used the below sort card.

Code:
JOINKEYS FILE=F1,FIELDS=(1,20,A) 
JOINKEYS FILE=F2,FIELDS=(1,20,A)
JOIN PAIRED,F2
REFORMAT FIELDS=(F1:1,40,F2:41,2108)
SORT FIELDS=COPY
OUTREC FIELDS=(1,40,41,2108)


But when i run with this sort card am getting JOIN syntax error. But i am unable to find what is the error. Can you please help me with what is wrong with the above sort card?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Jul 09, 2011 2:30 pm
Reply with quote

it would help to provide us with the error (cut & paste) from the sysout.

and why are you using an OUTREC FIELDS parm?
that is what hte REFORMAT parm accomplishes.
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sat Jul 09, 2011 4:27 pm
Reply with quote

I removed the OUTREC statement after realising it. But am getting error at JOIN statement with error code WER268A. Am sorry i will not able to give the mainframe screen shot as am unable to access it.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Jul 09, 2011 4:38 pm
Reply with quote

What column are your control cards starting in. If column 1, try 2 or later.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Jul 09, 2011 5:11 pm
Reply with quote

Also post which product and release level you have installed
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Jul 10, 2011 5:00 pm
Reply with quote

I usually use FILES in JOINKEYs syntax not FILE; I can't test this, at this moment, however, with the given info, please give a try to this:
Quote:
JOINKEYS FILES=F1,FIELDS=(1,20,A)
JOINKEYS FILES=F2,FIELDS=(1,20,A)
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sun Jul 10, 2011 7:11 pm
Reply with quote

Thanks to all... After removing the JOIN PAIRED, F2 statement my sort card worked fine. However my requirement is to join only paired records.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Sun Jul 10, 2011 8:58 pm
Reply with quote

Quote:
However my requirement is to join only paired records
Yes. You got it right. AFAIK "JOIN,PAIRED" does not exist. If you need only paired records, you just need to omit the JOIN statement itself.
Back to top
View user's profile Send private message
prasanth_thavva

New User


Joined: 28 Jul 2005
Posts: 86
Location: Chennai

PostPosted: Mon Jul 11, 2011 10:08 am
Reply with quote

Mushreys,

Yes arun is correct, the default is JOIN PAIRED you need not declare/code this. PAIRED means matching records will be pulled based on KEYS.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Mon Jul 11, 2011 10:57 am
Reply with quote

Quote:
the default is JOIN PAIRED you need not declare/code this
Prasanth,

The "JOIN PAIRED" does not even exist. It is not like it is the default and you need not code it.
If you code it, you will end up in a syntax error. As I said earlier, if you need only matching records,
you just need to omit the JOIN statement.
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sun Jul 17, 2011 11:36 am
Reply with quote

Hey Thanks Arun and Prasanth for your help...icon_smile.gif
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top