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

Matching whole key from one file to any position in other


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
southee

New User


Joined: 17 Jun 2012
Posts: 20
Location: INDIA

PostPosted: Mon Aug 06, 2012 4:53 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 06, 2012 5:11 pm
Reply with quote

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
View user's profile Send private message
southee

New User


Joined: 17 Jun 2012
Posts: 20
Location: INDIA

PostPosted: Mon Aug 06, 2012 6:16 pm
Reply with quote

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...... icon_smile.gif
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: Mon Aug 06, 2012 7:11 pm
Reply with quote

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
View user's profile Send private message
southee

New User


Joined: 17 Jun 2012
Posts: 20
Location: INDIA

PostPosted: Mon Aug 06, 2012 7:59 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 06, 2012 8:31 pm
Reply with quote

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
View user's profile Send private message
southee

New User


Joined: 17 Jun 2012
Posts: 20
Location: INDIA

PostPosted: Mon Aug 06, 2012 9:40 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 06, 2012 9:47 pm
Reply with quote

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
View user's profile Send private message
southee

New User


Joined: 17 Jun 2012
Posts: 20
Location: INDIA

PostPosted: Mon Aug 06, 2012 10:04 pm
Reply with quote

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.... icon_smile.gif
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 -> DFSORT/ICETOOL Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top