View previous topic :: View next topic
|
Author |
Message |
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
I Have been successful in completing this requirement but i have used the Combination of DFSORT and Easytrieve
First i have parsed the Full name file for e.g.
Code: |
Key full name
010653607 WHITE FAMILY FOUNDATION
020166013 DE AMORIM MARIA C
033448266 WALLS TRAMMELL SANDRA C
|
into
Code: |
Key ful-name1 full-name2 full name3 full name4
010653607 WHITE FAMILY FOUNDATION
020166013 DE AMORIM MARIA C
033448266 WALLS TRAMMELL SANDRA C
|
Till this point of parsing i used DFSORt but later to comapre short name with either Full name1 or Fullname2 or Fullname3 i used easytrieve logic to match and pull the recrods to output...
Then i have used Easytrieve
Code: |
SORT BNRFILE TO BNRFILE USING (IN1-KEY)
SORT TRANFILE TO TRANFILE USING (IN2-KEY)
JOB INPUT (BNRFILE KEY(IN1-KEY) +
TRANFILE KEY(IN2-KEY))
IF MATCHED
IF ((BN-SHORT-NAME = TX-NAME1) OR +
(BN-SHORT-NAME = TX-NAME2) OR +
(BN-SHORT-NAME = TX-NAME3)OR +
(BN-SHORT-NAME = TX-NAME4))
PUT OUTFILE
END-IF |
NOTE: as my logic depends on only these two fields i haven't pasted the rest of the columns in each record here |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
But this won't work with two elements in the short name.
The code is very similar in DFSORT anyway.
Are you happy with what you have? |
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
Bill Woodger wrote: |
But this won't work with two elements in the short name.
The code is very similar in DFSORT anyway.
Are you happy with what you have? |
Yes Bill as i said i just posted you the method not the actual code i actually parsed my full name into 10 subnames because i have few names like ESTATE OF JUDITH JANE MARSHALL-DE COSMO like for e.g.
Code: |
OPTION COPY
INREC PARSE=(%01=(ENDBEFR=C' ',FIXLEN=10),
%02=(ENDBEFR=C' ',FIXLEN=20),
%03=(ENDBEFR=C' ',FIXLEN=20),
%04=(ENDBEFR=C' ',FIXLEN=20),
%05=(ENDBEFR=C' ',FIXLEN=20),
%06=(ENDBEFR=C' ',FIXLEN=20),
%07=(ENDBEFR=C' ',FIXLEN=20),
%08=(ENDBEFR=C' ',FIXLEN=20),
%09=(ENDBEFR=C' ',FIXLEN=20),
%10=(ENDBEFR=C' ',FIXLEN=20)),
BUILD=(%01,%02,%03,%04,%05,%06,%07,%08,%09,%10) |
and for the shorter name i have parsed them into 3 subanmes and during imatched them using Easytrieve.
It worked like a charm.
In easytrieve logic i have used two outputs one for matched and the other for unmatched this way i have checked the unmatched too... and eded up with perfect result....
Thank you for all your help and support...... |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Very well done then. It is not often that someone here just seeks a bit of advice and then gets on with it. Congratulations and good luck. |
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
Bill Woodger wrote: |
Very well done then. It is not often that someone here just seeks a bit of advice and then gets on with it. Congratulations and good luck. |
Thank you very much for all giving some valuable sugestions. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i assume you are doing this exercise in order to clean-up
the relationships between short-name and full name.
if so, is anything being done to amend the data input procedures
to prohibit this inconsistency in the future? |
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
dbzTHEdinosauer wrote: |
i assume you are doing this exercise in order to clean-up
the relationships between short-name and full name.
if so, is anything being done to amend the data input procedures
to prohibit this inconsistency in the future? |
Sorry dbz i havent got what you were trying to say? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why are you doing this analysis?
What will be done with the results?
If indeed short name should be a physical sub-set of full name,
is anything being done to prohibit future instances
of short name not being a sub-set of full name?
actually, those are all rhetorical questions. |
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
dbzTHEdinosauer wrote: |
why are you doing this analysis?
What will be done with the results?
If indeed short name should be a physical sub-set of full name,
is anything being done to prohibit future instances
of short name not being a sub-set of full name?
actually, those are all rhetorical questions. |
I'm working for a Project in IBM and these are the requirements from the clients.
I had got the requirements from the clients to match tw files in this way.... |
|
Back to top |
|
|
|