SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
new4sas
Calcite | Level 5

Hi There,

 

I am learning SAS for  R users.  I am using Studio via OnDemand Academic webpage. i tried to run the code below to create a new dataset, but i did not see anything created, nor did i see any error in error section. Can someone point out what's wrong  here?

 

Code below :

 

/*SP4R02e01


libname sp4r '/home/asiangirlhost/folders/myfolders';
DATA SP4R.Shelter2;
length Name $ 25 Color $ 10 Cats $ 3;
INPUT Name $ Age Weight Color $ Cats $ ;
DATALINES;
Pluto 3 25 Black No
Lizzie 10 43 Tan Yes
Pesci 10 38 Brindle No
;
run;

 

this is message from log :

NOTE: ODS PDF(WEB) printed no output.
(This sometimes results from failing to place a RUN statement before the ODS PDF(WEB) CLOSE statement.)
92 FILENAME _GSFNAME;
NOTE: Fileref _GSFNAME has been deassigned.
93 DATA _NULL_;
94 RUN;
 
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 461.00k
OS Memory 22184.00k
Timestamp 03/26/2020 10:19:50 PM
Step Count 39 Switch Count 0
Page Faults 0
Page Reclaims 24
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
 
 
95 OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
96
 
1 REPLY 1
Tom
Super User Tom
Super User

Your code should run or at least show an error, such as an invalid path for the LIBNAME statement.

 

Is that the whole log? If the log does not show the code you submitted then something is wrong. Either you didn't send it the code you showed or something else happened.

 

Looks like you are using some interface to send code to SAS, perhaps SAS/Studio?, because of that message about PDF(WEB) and spurious data step at the bottom of the lines you do show from the log. Those systems also normally send code in front of your code, perhaps that is messed up.

 

Did you really send that /* at the top of the code you showed? If so then SAS is waiting for the */ to end the comment and nothing in your code will do anything because it is all one long comment.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2177 views
  • 0 likes
  • 2 in conversation