MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

If Rec key of file1 = File2 key cpy f2 rec to outfile

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
emadhubabu
Beginner


Joined: 03 Sep 2005
Posts: 13
Topics: 6

PostPosted: Sat Nov 19, 2005 2:32 am    Post subject: If Rec key of file1 = File2 key cpy f2 rec to outfile Reply with quote

Hi I am podting question first time!

I have
FILE A
--------
123 AAAAAAA
234 BBBBBBB
345 CCCCCC
456 DDDDDD

FILE B
--------
123 XXXXXXX
123 YYYYYYYY
123 ZZZZZZZ
345 PPPPPPPP
345 QQQQQQ
345 RRRRRRR
456 sdsdsdsds
456 wewewew


output file
-----------
123 XXXXXXX
123 YYYYYYYY
123 ZZZZZZZ
345 PPPPPPPP
345 QQQQQQ
345 RRRRRRR
456 sdsdsdsds
456 wewewew


please help me with JCL.

Thanks

Madhu Babu
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sat Nov 19, 2005 3:15 am    Post subject: Reply with quote

Madhu Babu,

I understand that you are a new member to this forum. This board already contains tons of posts on file matching. In future, please use the SEARCH facility (see the top of this page) available in this forum before you post any query.

Check the following links which describes file matching using SORT / Easytrieve.
http://mvsforums.com/helpboards/viewtopic.php?t=5167&highlight=sort+match
http://mvsforums.com/helpboards/viewtopic.php?t=4972&highlight=sort+match
http://mvsforums.com/helpboards/viewtopic.php?t=4860&highlight=sort+match
http://mvsforums.com/helpboards/viewtopic.php?t=4838&highlight=sort+match
http://mvsforums.com/helpboards/viewtopic.php?t=4669&highlight=sort+match
http://mvsforums.com/helpboards/viewtopic.php?t=3939&highlight=sort+match
http://mvsforums.com/helpboards/viewtopic.php?t=11&highlight=sort+match

Note certain features like SPLICE are Product and Version dependant. Check out what sort product is installed in your shop (DFSORT / Syncsort) and also the version.

Thanks,
Phantom
Back to top
View user's profile Send private message
emadhubabu
Beginner


Joined: 03 Sep 2005
Posts: 13
Topics: 6

PostPosted: Sat Nov 19, 2005 3:44 am    Post subject: Reply with quote

when I tried to run 4th link code it is showing error
Code:

 SYSIN :                                               
   JOINKEYS FILES=F1,FIELDS=(01,3,A)                   
   *                                                   
   JOINKEYS FILES=F2,FIELDS=(01,3,A)                   
   *                                                   
   REFORMAT FIELDS=(F1:1,40)                           
   *                                                   
   SORT FIELDS=(1,3,CH,A)                             
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT       
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT       
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Sat Nov 19, 2005 7:14 am    Post subject: Reply with quote

Make sure you leave column 1 blank
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group