Re: FCMP Function with HASH joins

The variable you refer to BENE_RACE_CD doesn't appear in the code you posted. It would be helpful not only to post the correct FCMP function code but also the DATA step log in which you are using it including error messages.

How big is your lookup tables? Remember hash tables have to be loaded into memory so unless you can guarantee you are always going to have enough memory, then using HASH table techniques could be problematic.

Re: FCMP Function with HASH joins

Wouldn't BENE_BIRTH_DT need to be in your KEEP = variables? Also 14M rows is getting pretty big for a hash table, depending on how much memory you have available. What is your SAS MEMSIZE option setting?

Re: FCMP Function with HASH joins

There are 4 nearly identical functions that I wrote and I keep mixing them up when posting. Basically the keep has two variables, the first is the key which is bene_id, the second is one of the following: bene_death_dt, bene_birth_dt, bene_race_cd, or bene_sex_cd. I double-checked the code to make sure everything is consistent in each function and it is. The error is consistent regardless of which function I use (telling me the second variable I keep is not present).

What is also annoying is if I create a new set that does the keep first that is accessed by the function without a keep then it works (at least with the test set of 500).

What is becoming quite apparent is that this seems like a case of me using the wrong tool for the job. Hash is probably not the answer, but it still is bugging me that the keep does not seem to be working.