BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cynthia_sas
SAS Super FREQ
Did you actually RUN the program in Task 2, step 2, as highlighted in my previous posting. If so, and if the program WAS successful, then you would have files underneath the ecprg193 folder.

Since you do NOT have files under the ECPRG193 folder, you will need to go back to the beginning and do not try to read country.dat until AFTER you have run the program from Task 2, step 2 successfully and you see files under the ecprg193 folder.

cynthia
Cynthia_sas
SAS Super FREQ

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

_0_start_with_instructions_inside_course.png

 

#1 Make a folder (you have already done this step)

_1_make_folder_for_class.png

 

#2 Check folder properties

_2_right_click_see_folder_properties_note_correct_path.png

 

#3 Run "setup" with LIBNAME

_3_after_setup_task_1_LIBNAME.png

 

#4 at some point save code as setup.sas or save as snippet

_4_save_as_setup_file.png

 

#5 Task 2, Step 2, Paste code into the Studio editor window

_5_code_pasted_in_editor_window.png

 

#6 After code runs, see files in ecprg193 folder and see PROC CONTENTS in Results window

_6_after_Task2_code_runs_in_SAS_Univ_Edition.png

 

#7 After Task 2, Step 2 code runs successfully, you should be able to see the files in your shared folder location

_7_compare_windows_view_of_shared_folder_with_UE_view.png

 

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

tahoora
Calcite | Level 5

I do whatever you say at this topic but I still get 25 errors about the file does not exist.

I work with ubuntu 16.04 lts
this is one of this error:
 
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.
NOTE: The SAS System stopped proces

 

Screenshot from 2018-06-10 15-50-01.pngScreenshot from 2018-06-10 15-56-21.pngScreenshot from 2018-06-10 13-37-14.png

 

Cynthia_sas
SAS Super FREQ

Hi:

  This %LET statement is incorrect:

let_stmt_wrong.png

Please go back and look at my example posted as image #4, and as shown below:

let_stmt_correct.png

 

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:

correct_setup_statements.png

 

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:

also_OK.png

 

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:

do_not_use_FILEPATH.png

 

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

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 18 replies
  • 2712 views
  • 1 like
  • 6 in conversation