Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with a master file please

Status
Not open for further replies.

sagobogger

Technical User
Jun 18, 2004
69
0
0
US
I need a simple (I think) master file but I'm just stuck :(

I have three fields:

ID_ONE/A6
ID_TWO/A12
NAME/A40

I need to be able to join to either ID_ONE or ID_TWO and get the NAME, so ID_ONE and ID_TWO both need to be indexed. (ID_ONE is in legacy data, ID_TWO is in current data.)

I'll populate the .FOC with MODIFY.

Any assistance would be appreciated.
 
I´m confused to what you need. What are you trying to do?

Frank
 
Let's say I have two sets of data relating to the same population of individuals. DATASET1 has a 6 character ID as the identifier, DATASET2 has a 12 character ID as the identifier. The data files do not contain demographic info.

So lets say we have someone called SMITH,JOHN and his ID in DATASET1 is A12345 and his ID in DATASET2 is QZY123456789.

I have that ID information available, so for this guy

ID_ONE = A12345
ID_TWO = QZY123456789
NAME = SMITH,JOHN

If I want to associate SMITH,JOHN with all his data I need to be able to join the ID in DATASET1 to ID_ONE, and the ID in DATASET2 to ID_TWO.

I could easily build two tables, one indexed on ID_ONE for DATASET1 ID to join to, and one indexed on ID_TWO for DATASET2 ID to join to, but that's pain to maintain so I would prefer to build a single demographic table with both ID_ONE and ID_TWO indexed. What I'm asking for is the master file description for such a file.

HTH

 
Are you sure you don't want to concat the data?? see if the contains comand is available to you. this may help after you create id_master/a18=id_one||Id_two;
 
Why don't you hold the file as like the following .

...
ON TABLE HOLD AS MY_FILE FORMAT FOCUS INDEX ID_ONE ID_TWO
END

You would have to look up the syntax as I'm rusty on FOCUS (10+ years)

Regards
Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top