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
 

 

JOINKEYS error while sorting

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JOINKEYS error while sorting
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    Post subject:
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    Post subject: Reply to: JOINKEYS error while sorting.
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Sat Jul 09, 2011 4:38 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Jul 09, 2011 5:11 pm    Post subject:
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

Senior Member


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

PostPosted: Sun Jul 10, 2011 5:00 pm    Post subject:
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    Post subject: Reply to: JOINKEYS error while sorting.
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: 2158
Location: @my desk

PostPosted: Sun Jul 10, 2011 8:58 pm    Post subject:
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    Post subject: Reply to: JOINKEYS error while sorting.
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: 2158
Location: @my desk

PostPosted: Mon Jul 11, 2011 10:57 am    Post subject:
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    Post subject: Reply to: JOINKEYS error while sorting.
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    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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm


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