Hi:
Here is a set of numbered screen shots that illustrate the entire process from an empty folder for ecprg193 to a successful program.
Start with instructions
#1 Make a folder (you have already done this step)
#2 Check folder properties
#3 Run "setup" with LIBNAME
#4 at some point save code as setup.sas or save as snippet
#5 Task 2, Step 2, Paste code into the Studio editor window
#6 After code runs, see files in ecprg193 folder and see PROC CONTENTS in Results window
#7 After Task 2, Step 2 code runs successfully, you should be able to see the files in your shared folder location
Note that your shared folder location might not be the same as what is shown in my screen shot.
You CANNOT try to read COUNTRY.DAT until AFTER you have successfully run the program inside Task 2.
cynthia
I do whatever you say at this topic but I still get 25 errors about the file does not exist.
9262 run; 9263 data _null_; 9264 infile datalines truncover length=length; 9265 input; 9266 file mydata(nonsales.csv) lrecl=256; 9267 put _infile_ $varying. length; 9268 datalines4; ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/FILEPATH.
Hi:
This %LET statement is incorrect:
Please go back and look at my example posted as image #4, and as shown below:
You do not use the string FILEPATH in the %LET statement. That is incorrect, as shown in your screen shot.
You MUST use the path location to your data. Until you create the correct setup file statements, the data creation program will not be able to make the data correctly and any subsequent programs will not run correctly. We use the helper variable &PATH in all of our programs. For example, when you see something like this:
INFILE "&path/sales.dat";
That is because everybody will have a different location for the physical storage of their data files. Here are some examples of how you would specify the setup statements that MUST be in effect for our programs to work correctly, including the setup statements:
It would be OK to use the fully qualified value instead of using &PATH in the LIBNAME statement. But, you STILL need to specify the helper variable &PATH correctly. This would be acceptable (unnecessary, but acceptable) for all of the above statements:
As I explained, using this statement:
%let path=FILEPATH; is incorrect. We intended for you to replace the string "FILEPATH" with YOUR location, as illustrated in my screen shots in the previous posting. It would be unlikely that your physical storage location for the data would be in a location called FILEPATH. Your location appears to be in this path:
/folders/myfolders/sasuser.v94/ecprg193
and if this is the case, when you right click on the ecprg193 folder and you see THIS path location for your folder, then your correct setup statements BEFORE you run the setup program would be:
Please correct your code and re-run the program from Task 2 again. Then save the statements as setup.sas or as a snippet, whichever you prefer.
Our code in the course expects that &PATH will be correctly assigned so that statements that reference that physical location will find the SAS datasets AND the flt files (the .dat and .csv) files that the data creation program creates. If &PATH is not correct when that program runs, then the flat files will not be created correctly the first time and the files will not be found with any FILE or INFILE statements.
Fixing this issue is entirely in your control. My suggestion is that you revisit the screen shots that I posted and re-read the instructions to make the data again, keeping in mind that
%LET path=FILEPATH;
is model syntax that you are expected to change BEFORE you run the data creation program.
Hope this helps,
Cynthia
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.