- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have multiple SAS data bases or libraries consisting of data.
One is titled for example company.teamblue_weekly and company.teamred_weekly. It is social security numbers and relevant columns to that entry. I received a text file of society security.
I am trying to find where the social security in which databases listed above so I tried to do this.
filename in ("X:\folder\example.txt");
data test;
input in;
run;
proc sort data=in;
by ssn;
run;
data teamred teamblue;
merge in (in=a)
company.teamblue_weekly (in=b);
by ssn;
if a then output teamblue;
run;
this is what i was trying to do but i am not sure. Would anyone assist?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are you looking to create a permanent data set that can be used for look-ups? Or is this a one time thing?
Are the data sets in your Company library static or do they change (new files or content of existing files have records appended)?
Do all of your data sets have the same variable name for social security number? The same properties (all numeric or all character with the same defined length)?
Since your data set Test does not actually read anything (Input lists variables, not files, the file IN would be on an INFILE statement) your code doesn't do much.
SAS does have tools to examine the contents of data sets and find specific variables and properties which is why I ask those questions at the top.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
They have the same variables name and same properties.