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
 

 

Need Help In Join Keys

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Apr 07, 2013 11:36 am    Post subject: Reply to: Need Help In Join Keys
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    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 Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am


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