I am using SAS/ML Studio and loading the program as said:
/***********************************************/
/* In the line of code below, replace FILEPATH */
/* with the path to your EPG194/data folder */
/***********************************************/
%let path=C:\Program Files\SASHome\EPG194\data;
/**********************************************/
/* DO NOT EDIT THE CODE BELOW */
/**********************************************/
libname PG1 "&path";
It runs successfully with the following:
NOTE: Libref PG1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Program Files\SASHome\EPG194\data
15
but when i run the createdata programe the path is not the one i specified :
error message i am getting:
WARNING: Physical file does not exist, C:\WINDOWS\system32\&path\_1create_class.sas.
it does not default to the path specified, I am new to SAS am i overlooking something ?
Thanks
Posting the code/log causing the error would be useful to help you.
Hi there apology, here is the full log
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
Licensed to IQ BUSINESS PARTNER, Site 70210183.
NOTE: This session is executing on the X64_8PRO platform.
NOTE: Updated analytical products:
SAS/STAT 14.1
SAS/ETS 14.1
SAS/OR 14.1
SAS/IML 14.1
NOTE: Additional host information:
X64_8PRO WIN 6.2.9200 Workstation
NOTE: SAS Initialization used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
3
4 /**********************************************/
5 /* You must run SETUP.SAS before you run */
6 /* this code to create your data for EPG194 */
WARNING: Apparent symbolic reference PATH not resolved.
7 /* */
8 /* DO NOT EDIT THE CODE BELOW */
9 /**********************************************/
10
11 %include "&path/_1create_class.sas";
WARNING: Physical file does not exist, C:\WINDOWS\system32\&path\_1create_class.sas.
ERROR: Cannot open %INCLUDE file &path/_1create_class.sas.
WARNING: Apparent symbolic reference PATH not resolved.
12 %include "&path/_2create_natpark.sas";
WARNING: Physical file does not exist, C:\WINDOWS\system32\&path\_2create_natpark.sas.
ERROR: Cannot open %INCLUDE file &path/_2create_natpark.sas.
WARNING: Apparent symbolic reference PATH not resolved.
13 %include "&path/_3create_storm.sas";
WARNING: Physical file does not exist, C:\WINDOWS\system32\&path\_3create_storm.sas.
ERROR: Cannot open %INCLUDE file &path/_3create_storm.sas.
14
15 proc contents data=pg1._all_ nods;
16 run;
ERROR: Libref PG1 is not assigned.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: The SAS System stopped processing this step because of errors.
17
18 ;*';*";*/;
The macro-variable path is not defined in the program you have posted. The log has the following warning:
WARNING: Apparent symbolic reference PATH not resolved.
Thank you for the fast reply.
As i said new to SAS, how would i then fix this ? as the first thing we are told to do is the below:
/***********************************************/
/* In the line of code below, replace FILEPATH */
/* with the path to your EPG194/data folder */
/***********************************************/
%let path=C:\Program Files\SASHome\EPG194\data;
/**********************************************/
/* DO NOT EDIT THE CODE BELOW */
/**********************************************/
libname PG1 "&path";
Thank you
You have to execute that part of code each time you start a new session and want to use the variable "path".
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.