|
On Wed, 15 Oct 2008 07:01:07 -0700, Sassy <AugustinaO@GMAIL.COM> wrote:
>Hi all,
>
>I want to create an index for one of my datasets using two variables.
>I have to merge this dataset with other files and it take a lifetime
>to sort. To merge with one file I have to sort by one variable and to
>merge with another file i have to sort by another variable. I want to
>create an index using the two variables i merge with the most. So if
>I need to merge by x variable i can do that without sorting and if I
>need to merge by z variable i can do that also. this is the syntax i
>wrote, can someone confirm that is doing what i want. Also when you
>index a file, do you have to create a new data set for the indexed
>file?
>Thanks!
>
>proc datasets library=Medicine;
> modify Pharmacy_claims;
> index create class;
> index create ndc;
>run;
It is true that indexes allow you to merge without sorting, but that is
still not guaranteed to be efficient. Perhaps you can avoid the merge
altogether by using some other technique to do whatever combining of data is
required.
|