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

Need Help In Join Keys


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

New User


Joined: 21 Jan 2006
Posts: 19
Location: Mumbai

PostPosted: Sun Apr 07, 2013 5:13 am
Reply with quote

Hi,

I have File1 which conatis below fields;
FILE1: lenghth is 40 bytes

1 to 10 position A/C number
11 to 6 amount
17 t0 10 date

File 2 contains below fields:
FILE2: lenghth is 120 bytes

1 to 10 positions A/C number
16 to 5 position St Cd
21 to 3 position st type
40 to 10 position date

My requirement is to math file1 and file2 based on A/C number and if matches found my out put record should have

A/C number,amount and date and st cd,st type and date

Please help me how to get this.
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Sun Apr 07, 2013 9:28 am
Reply with quote

Hi Rajeev,

By using joinkeys you can achieve it.


Code:

JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
REFORMAT FIELDS=(F1:1,40,F2:16,8,F2:40,10)
SORT FIELDS=COPY


Quote:

I am a new joinee of this group,working in a softwrae company,time to time I need help.


The person who joined in 2006 will not consider as a "new joinee."

Thanks
-3nadh
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: Sun Apr 07, 2013 11:36 am
Reply with quote

If one or both of your input files are already sorted on A/C number, then add ",SORTED" to the end of the JOINKEYS for that file.
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 Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Join files where value in one is betw... DFSORT/ICETOOL 6
Search our Forums:

Back to Top