BookmarkSubscribeRSS Feed
michaelkindo
Calcite | Level 5

Hi,

 

I am not able  to copy & paste the code.

 

Even though I am typing manually to create orion library I am getting error OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 

 

%let path=FILEPATH\ecprg193;

libname orion "&path"; 

 

9 REPLIES 9
michaelkindo
Calcite | Level 5
internet explorer##- Please type your reply above this line. Simple formatting, no
attachments. ##
Reeza
Super User

Yeah, try a different browser. Copy and paste issues are common in IE. 

Try Chrome or Firefox. 

michaelkindo
Calcite | Level 5

I tried doing in Chrome, but it's the same.

How about creating orion folder in Library ? I am getting error for the same.

 

There are four excel files uploaded in files(home) folder.

But when I am trying run the below code

 

%let path=/home/michael.kindo0/ecprg193;
 libname orion "&path";
 
Getting Notes
 
1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
59        
60         %let path=/home/michael.kindo0/ecprg193;
61         libname orion "&path";
NOTE: Libref ORION was successfully assigned as follows:
       Engine:        V9
       Physical Name: /home/michael.kindo0/ecprg193
62        
63         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
75 
 

Looks like orion is assigned sucessfully.

 

proc contents data=orion.sales;
run;

 

1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
59        
60         proc contents data=orion.sales;
ERROR: File ORION.SALES.DATA does not exist.
61         run;
 
Please help how to fix this.

 

 

Kurt_Bremser
Super User

@michaelkindo wrote:

I tried doing in Chrome, but it's the same.

How about creating orion folder in Library ? I am getting error for the same.

 

There are four excel files uploaded in files(home) folder.

But when I am trying run the below code

 

%let path=/home/michael.kindo0/ecprg193;
 libname orion "&path";
 
Getting Notes
 
1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
59        
60         %let path=/home/michael.kindo0/ecprg193;
61         libname orion "&path";
NOTE: Libref ORION was successfully assigned as follows:
       Engine:        V9
       Physical Name: /home/michael.kindo0/ecprg193
62        
63         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
75 
 

Looks like orion is assigned sucessfully.

 

proc contents data=orion.sales;
run;

 

1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
59        
60         proc contents data=orion.sales;
ERROR: File ORION.SALES.DATA does not exist.
61         run;
 
Please help how to fix this.

 

 


How did you import the Excel files into SAS?

michaelkindo
Calcite | Level 5

Server Files and Folders there is an option called Upload.

Kurt_Bremser
Super User

SAS works with dataset files that have a format specific to SAS. Dataset files have the extension .sas7bdat and reside in directories that need to have a libname assigned.

Excel files can only be used for import, or you can assign a libname to the Excel file, which allows you to address sheets in the workbook as individual datasets.

So your next step after uploading the Excel files needs to be a import into SAS.

Reeza
Super User

The course should have instructions on how to set up,datasets. 

Cynthia_sas
SAS Super FREQ

Hi, when you are using the OnDemand server, you have to follow ALL the directions inside the Course Overview and Data Setup section of the course.

Running the %LET statement and LIBNAME statement is what you do in TASK 1 of the SAS OnDemand instructions. For TASK2, there are instructions for how to create the files used in the course. ORION.SALES is created when you run the program that is found in TASK2 -- if you issue a LIBNAME statement, but do NOT run the program in TASK2, then you will NOT have ORION.SALES.

  
As for how to import Excel files into SAS. When you get to the lesson on reading Excel files, you are instructed to write the code ,but NOT to run the code because we already know that the PC File Server (which is the method used in the Programming 1 class) is NOT available on the OnDemand server.

 

cynthia

Please refer to these screen shots.

Here's the warning about NOT running the code to read Excel files when using SAS OnDemand or SAS Enterprise Guide or SAS University Edition:

prg1_do_not_submit_code_to_read_Excel_files.png

If you want to read Excel files with the OnDemand server, you'll have to upload the files to the server and then use the XLSX engine to read XLSX files. There have been previous postings about how to do this. Please note, this method is different from what is shown in the Programming 1 lecture.

 

How to make the data for Programming 1:

1c_verify_folder_name.png

 

Then copy program from Task 2:

2c_after_LIBNAME_Task2.png

 

Run the program after copying to SAS Studio editor window:

3a_copy_code_from_inside_class.png

 

3b_paste_code_into_SAS_Studio_window.png

 

After running see the log:

3c_SAS_Log_after_run_code_from_Task_2.png

 

Results should show PROC CONTENTS:

3d_results_show_proc_contents.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 9 replies
  • 1391 views
  • 2 likes
  • 4 in conversation