View previous topic :: View next topic
|
Author |
Message |
murali.andaluri
New User
Joined: 07 Jun 2013 Posts: 23 Location: USA
|
|
|
|
Hi,
i have file1 (VB) with the length 1003, and file2 (FB) with the lenght 13.
i wanted to compare file1 and file2 and write matched file1 record in output file (VB). Can anyone help me on this?
I am using below code...but getting error.
Code: |
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(45,13,A)
JOINKEYS FILE=F2,FIELDS=(1,13,A)
REFORMAT FIELDS=(F1:1,1003)
SORT FIELDS=COPY
/* |
Code'd |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What error? Paste the details please.
I'd go with:
Code: |
REFORMAT FIELDS=(F1:1,4,5) |
The 1,4 is the RDW, 5 on its own means "from position five to the end of the current record". With your 1003, you'll have potential problems. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Do we have to guess which error you got ?
|
|
Back to top |
|
|
murali.andaluri
New User
Joined: 07 Jun 2013 Posts: 23 Location: USA
|
|
|
|
Thank you very much Bill, it is working fine now. |
|
Back to top |
|
|
|