I am new in SAS environment. Maybe this is a stupid question but I cannot figure it out.
LIBNAME CODY '/folders/myfolders/Cody';
data In_Both
Missing_Name(drop = Name);
merge purchase(in=In_Purch)
inventory(in=In_Invent);
by Model;
if In_Purch and In_Invent then output In_Both;
else if In_Invent and not In_Purch then output Missing_Name;
run;
This is the error I receive
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 LIBNAME CODY '/folders/myfolders/Cody';
NOTE: Libref CODY was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/Cody
74
75 data In_Both
76 Missing_Name(drop = Name);
77 merge purchase(in=In_Purch)
78 inventory(in=In_Invent);
ERROR: File WORK.PURCHASE.DATA does not exist.
ERROR: File WORK.INVENTORY.DATA does not exist.
79 by Model;
80 if In_Purch and In_Invent then output In_Both;
81 else if In_Invent and not In_Purch then output Missing_Name;
82 run;
It seems that SAS cannot find the files even though they exists. I'm using SAS university Edition. The code should give me 2 datasets, one with the merged observation and another one with the unmerged observations.
Is there a specific way to load the datasets I need? The two datasets are in format sas7bdat
Thanks everyone for the help!