BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kmckin
Calcite | Level 5

Hi,

 

I'm currently getting the error message that says the file I'm trying to call in does not exist. As you can see from my screenshot, both of the datasets I'm trying to call in are located within my temporary 'Hrif' library. I've included the log and code below. Any advice is appreciated.

 

libname hrif 'L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets';
run;

data HRIF; set Hrif_notes;  

run;

proc sort data = HRIF;  

	by pat_mrn_id;  

run;

data I2E; set I2e_output;  

run;

proc sort nodupkey data = I2E;

	by pat_mrn_id;

run;

data hrifscores;  

	merge HRIF (in = a) I2E (in = b) ;  by pat_mrn_id;

	if a = 1 and b = 1;

	keep pat_mrn_id; 

run; 

Log:

51 libname hrif 'L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets';
NOTE: Libref HRIF was successfully assigned as follows:
Engine: V9
Physical Name: L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets
52 run;
53
54 data HRIF; set Hrif_notes;
ERROR: File WORK.HRIF_NOTES.DATA does not exist.
55
56 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HRIF may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.HRIF was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


57
58 proc sort data = HRIF;
59
60 by pat_mrn_id;
ERROR: Variable PAT_MRN_ID not found.
61
62 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

63


64 data I2E; set I2e_output;
ERROR: File WORK.I2E_OUTPUT.DATA does not exist.
65
66 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.I2E may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.I2E was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds


67
68 proc sort nodupkey data = I2E;
69
70 by pat_mrn_id;
ERROR: Variable PAT_MRN_ID not found.
71
72 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

73


74 data hrifscores;
75
76 merge HRIF (in = a) I2E (in = b) ; by pat_mrn_id;
77
78 if a = 1 and b = 1;
79
80 keep pat_mrn_id;
81
82 run;

ERROR: BY variable pat_mrn_id is not on input data set WORK.HRIF.
ERROR: BY variable pat_mrn_id is not on input data set WORK.I2E.
WARNING: The variable pat_mrn_id in the DROP, KEEP, or RENAME list has never been referenced.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HRIFSCORES may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.HRIFSCORES was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You forgot the libname reference.

 

set hrif.hrif_notes;

@kmckin wrote:

Hi,

 

I'm currently getting the error message that says the file I'm trying to call in does not exist. As you can see from my screenshot, both of the datasets I'm trying to call in are located within my temporary 'Hrif' library. I've included the log and code below. Any advice is appreciated.

 

libname hrif 'L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets';
run;

data HRIF; set Hrif_notes;  

run;

proc sort data = HRIF;  

	by pat_mrn_id;  

run;

data I2E; set I2e_output;  

run;

proc sort nodupkey data = I2E;

	by pat_mrn_id;

run;

data hrifscores;  

	merge HRIF (in = a) I2E (in = b) ;  by pat_mrn_id;

	if a = 1 and b = 1;

	keep pat_mrn_id; 

run; 

Log:

51 libname hrif 'L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets';
NOTE: Libref HRIF was successfully assigned as follows:
Engine: V9
Physical Name: L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets
52 run;
53
54 data HRIF; set Hrif_notes;
ERROR: File WORK.HRIF_NOTES.DATA does not exist.
55
56 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HRIF may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.HRIF was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


57
58 proc sort data = HRIF;
59
60 by pat_mrn_id;
ERROR: Variable PAT_MRN_ID not found.
61
62 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

63


64 data I2E; set I2e_output;
ERROR: File WORK.I2E_OUTPUT.DATA does not exist.
65
66 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.I2E may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.I2E was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds


67
68 proc sort nodupkey data = I2E;
69
70 by pat_mrn_id;
ERROR: Variable PAT_MRN_ID not found.
71
72 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

73


74 data hrifscores;
75
76 merge HRIF (in = a) I2E (in = b) ; by pat_mrn_id;
77
78 if a = 1 and b = 1;
79
80 keep pat_mrn_id;
81
82 run;

ERROR: BY variable pat_mrn_id is not on input data set WORK.HRIF.
ERROR: BY variable pat_mrn_id is not on input data set WORK.I2E.
WARNING: The variable pat_mrn_id in the DROP, KEEP, or RENAME list has never been referenced.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HRIFSCORES may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.HRIFSCORES was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


 

View solution in original post

2 REPLIES 2
Reeza
Super User

You forgot the libname reference.

 

set hrif.hrif_notes;

@kmckin wrote:

Hi,

 

I'm currently getting the error message that says the file I'm trying to call in does not exist. As you can see from my screenshot, both of the datasets I'm trying to call in are located within my temporary 'Hrif' library. I've included the log and code below. Any advice is appreciated.

 

libname hrif 'L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets';
run;

data HRIF; set Hrif_notes;  

run;

proc sort data = HRIF;  

	by pat_mrn_id;  

run;

data I2E; set I2e_output;  

run;

proc sort nodupkey data = I2E;

	by pat_mrn_id;

run;

data hrifscores;  

	merge HRIF (in = a) I2E (in = b) ;  by pat_mrn_id;

	if a = 1 and b = 1;

	keep pat_mrn_id; 

run; 

Log:

51 libname hrif 'L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets';
NOTE: Libref HRIF was successfully assigned as follows:
Engine: V9
Physical Name: L:\PRUNIT\PROJECTS\Active Projects\HRIF\2018-Oct-Nov-pull\datasets
52 run;
53
54 data HRIF; set Hrif_notes;
ERROR: File WORK.HRIF_NOTES.DATA does not exist.
55
56 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HRIF may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.HRIF was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


57
58 proc sort data = HRIF;
59
60 by pat_mrn_id;
ERROR: Variable PAT_MRN_ID not found.
61
62 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

63


64 data I2E; set I2e_output;
ERROR: File WORK.I2E_OUTPUT.DATA does not exist.
65
66 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.I2E may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.I2E was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds


67
68 proc sort nodupkey data = I2E;
69
70 by pat_mrn_id;
ERROR: Variable PAT_MRN_ID not found.
71
72 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

73


74 data hrifscores;
75
76 merge HRIF (in = a) I2E (in = b) ; by pat_mrn_id;
77
78 if a = 1 and b = 1;
79
80 keep pat_mrn_id;
81
82 run;

ERROR: BY variable pat_mrn_id is not on input data set WORK.HRIF.
ERROR: BY variable pat_mrn_id is not on input data set WORK.I2E.
WARNING: The variable pat_mrn_id in the DROP, KEEP, or RENAME list has never been referenced.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HRIFSCORES may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.HRIFSCORES was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


 

kmckin
Calcite | Level 5

Thank you, Reeza! That solved the problem. 

 

Have a great rest of your day,

Kirby

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 21291 views
  • 0 likes
  • 2 in conversation