Write and run SAS programs in your web browser

Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

Reply
New Contributor
Posts: 4

Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

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"; 

 

Super User
Posts: 18,549

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

What browser are you using? 

New Contributor
Posts: 4

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

[ Edited ]
internet explorer##- Please type your reply above this line. Simple formatting, no
attachments. ##
Super User
Posts: 18,549

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

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

Try Chrome or Firefox. 

New Contributor
Posts: 4

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

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.

 

 

Super User
Posts: 7,094

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray


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?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 4

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

Server Files and Folders there is an option called Upload.

Super User
Posts: 7,094

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 18,549

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

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

SAS Super FREQ
Posts: 8,776

Re: Demand on Accademics SAS I am unable to copy and paste the code/ getting error for orion libaray

[ Edited ]

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

Ask a Question
Discussion stats
  • 9 replies
  • 183 views
  • 2 likes
  • 4 in conversation