10-20-2016 05:39 PM
I need your help.
I.m doing a activity .This is my activity.
In this practice, you submit a SAS program, review the log messages, and examine the results.
Reminder: Make sure you've defined the orion library.
data work.newcountry; length Country_Code $ 2 Country_Name $ 48; infile "&path/country.dat" dlm='!'; input Country_Code $ Country_Name $; run; proc print data=work.newcountry; run;
Ok, I create my library, this library is called Bea but can I can run my codige I have this message.
ERROR: Physical file does not exist, /folders/myfolders/ecprg193/country.dat.
I don,t understant this because this is the first activity and before I didn.t explain me anything.
10-21-2016 01:17 PM
10-20-2016 06:31 PM - edited 10-20-2016 06:35 PM
In the beginning instructions when setting up the course, you should have downloaded a zip file that contains the files you need to run the practice programs, like the country.dat data file you're referencing in this program. First, did you download the these? Second of all, you have to make sure you placed those files in the location that you've specified as the path: /folders/myfolders/ecprg193/. You may just have the files in a different location.
10-20-2016 06:45 PM - edited 10-20-2016 09:45 PM
In the Programming 1 e-learning class, we do NOT provide the SAS datasets in a zip file. (only EG and JMP and EM classes have zip files with data sets -- programming courses have programs to make the data and a few courses have some Excel files in a zip archive).
The Programming 1 e-learning class has a program inside the e-learning course that the student must copy and paste into their editor and that program, when run, makes ALL the data sets and .DAT files that are used in the course.
The OP did not indicate what class they were following, but the Reminder text looks like it comes straight out of the e-learning course.
In the e-learning course, in the instructions, the student is told to create a file called setup.sas or make a snippet file in SAS Studio that contains these 2 statements:
libname orion "&path";
That way if &PATH exists then the INFILE statement (as shown in the OP code)
infile "&path/country.dat" dlm='!';
Will work, because &PATH will have a value or path, as assigned in the setup.sas or setup snippet.
However, if you do NOT ever run the instructions in the Course Overview section of Programming 1, then the physical location will be empty.
BTW, in the Programming 1 class, all of our programs are expecting a library called ORION (not a library called BEA). And, all of our programs are expecting that the student will follow the instructions and issue a %let statement to create the "helper" macro variable called &PATH.
The "physical file does not exist message" implies to me that the OP did not follow ALL of the instructions in the Course Overview and Data Setup section of the Programming 1 e-learning course.
Reading country.dat is NOT the first activity. Running the program and doing the setup in the Course Overview section is the first activity and if you don't follow and complete ALL of the instructions, then the data files will not exist when you move into the lessons.
I can exactly replicate your error message if I submit my code WITHOUT submitting the setup program, as instructed in Task 1 in the course instructions.
1) Can generate the SAME error message if &PATH is not defined
2) Instructions that show where to save the setup statements
3) program submitted successfully AFTER running necessary statements
10-21-2016 01:19 PM
I wrote this code in my program.
libname orion "&path";
The log was
10-21-2016 01:17 PM
05-30-2018 07:43 PM - edited 05-30-2018 07:44 PM
The program inside the Programming 1 course creates a variety of files. What you see in your ORION library are the SAS7BDAT files -- those are SAS datasets. We also create several .DAT files and .CSV files, but you will NOT see those in the PROC CONTENTS output. Instead, you need to go to page 2 of this posting and look at #6 screen shot. In that screen shot, the Files and Folders list or Server Files and Folders list shows you ALL the files created and the PROC CONTENTS output shows you the SAS data sets that were created. I believe the date on that posting is 10-21-2016 at 01:32 PM -- look at screen shot #6.
if you do NOT see files in your Files and Folders list, such as shown in my screen shot #6, then you need to rerun the setup program again.
10-20-2016 06:41 PM
If you're on SAS UE and using the free e training courses, see this post:
Need further help from the community? Please ask a new question.