BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Junyong
Pyrite | Level 9

1. Can I code at SAS OnDemand to upload my local files? Or do I always need to use my mouse to upload something? For example, the following code enables SAS OnDemand to read FRED data without clicking a mouse.

data will5000indfc;
	infile "https://fred.stlouisfed.org/graph/fredgraph.csv?id=WILL5000INDFC" url firstobs=2 dsd truncover;
	input date yymmdd10. +1 will5000indfc;
run;

Or for example, I can code at SAS OnDemand to directly download whatever data on the Internet as follows.

data _null_;
	infile "https://www.mathematik.uni-wuerzburg.de/fileadmin/10040800/user_upload/time_series/data_sets/iq.sas7bdat" url recfm=f;
	input;
	file "%sysfunc(getoption(work))/iq.sas7bdat" recfm=n;
	put _infile_;
run;

What if the files I want to analyze are in my C drive? I wonder whether I can automate the processes using code at SAS OnDemand.

2. Can I code at SAS OnDemand to download some results? Suppose I analyzed something at SAS OnDemand and want to download the results as follows.

data will5000indfc;
	infile "https://fred.stlouisfed.org/graph/fredgraph.csv?id=WILL5000INDFC" url firstobs=2 dsd truncover;
	input date yymmdd10. +1 will5000indfc;
run;

data tedrate;
	infile "https://fred.stlouisfed.org/graph/fredgraph.csv?id=TEDRATE" url firstobs=2 dsd truncover;
	input date yymmdd10. +1 tedrate;
run;

data residual;
	merge will5000indfc tedrate;
	by date;
run;

proc reg noprint;
	model will5000indfc=tedrate;
	output residual=residual out=residual;
quit;

Can I code at SAS OnDemand to download the resultant residual data set? Or suppose I exported the data set to a csv file as follows.

proc export replace file="/home/junyong/residual.csv";
run;

Do I need to use my mouse to download the residual.csv? Or can I code at SAS OnDemand to download this file automatically to, for example, my desktop?

3. Is there a URL for the residual.csv such as, for example, https://welcome.oda.sas.com/junyong/residual.csv? If this is possible, then I will be able to use the second code above to download the results locally.

4. Can one SAS OnDemand user access to the data of another SAS OnDemand user? I wonder whether multiple SAS OnDemand users can share their uploaded data interactively.

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

For 1 and 2, if your PC presents one of the usable services (HTTP(S), FTP, SFTP/SSH) to,the internet, then you can access those through code.

I don't know if ODA provides a SSH service which would allow to use a local client like WinSCP to access your ODA data.

For 3, I am very sure that your private files in ODA won't be available to the world like that. That would be a super-serious violation of all security concepts.

For 4, I hope (and I'm quite sure) not. Your home directory will only be accessible by you and the superuser(s). I don't know if SAS would provide a shared resource on ODA if requested, but I know enough of the implications in terms of security and administration to think they won't do that.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

For 1 and 2, if your PC presents one of the usable services (HTTP(S), FTP, SFTP/SSH) to,the internet, then you can access those through code.

I don't know if ODA provides a SSH service which would allow to use a local client like WinSCP to access your ODA data.

For 3, I am very sure that your private files in ODA won't be available to the world like that. That would be a super-serious violation of all security concepts.

For 4, I hope (and I'm quite sure) not. Your home directory will only be accessible by you and the superuser(s). I don't know if SAS would provide a shared resource on ODA if requested, but I know enough of the implications in terms of security and administration to think they won't do that.

Junyong
Pyrite | Level 9

So coding to directly upload my local file to SAS OnDemand or directly download to my desktop is impossible—at least one mouse clicking is necessary. Or my file needs to be readily available somewhere on the Internet. Sad, but thanks.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 647 views
  • 0 likes
  • 2 in conversation