BookmarkSubscribeRSS Feed
Chip
Calcite | Level 5
There was a time when I was able to move SAS programs between our network drive and unix by using a FTP process. I'm pretty sure that way of moving programs has been eliminated by my company. I'm attempting to find a new way and was wondering if I could use proc download/upload. I'm getting an error trying to download. This is my code...

%signon(unix);

rsubmit;
OPTIONS MSTORED SASMSTORE=HOME;

filename locref 'z:\';
filename fref '/p02/data/penv/hgsa/intrnet';

proc download infile=fref('trend_12_graph.sas')
outfile=locref;
run;
endrsubmit;

This is my error...
ERROR: Invalid file, z:\.

I've tried a bunch of different file locations for locref but it always comes back as an invalid file. Any help is much appreciated.

Thanks!
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Are you attempting to move SAS source code programs or a SAS compiled macro catalog. The FILENAME statement expects a specific file, not a folder/directory; a LIBNAME statement points to a folder/directory. Also consider the issue with moving catalogs / objects between disparate operating environments.

Scott Barry
SBBWorks, Inc.
Chip
Calcite | Level 5
Thanks Scott and Gaurav! When I spelled out the outfile location, it worked.

rsubmit;
OPTIONS MSTORED SASMSTORE=HOME;

filename fref '/p02/data/penv/hgsa/intrnet';

proc download infile=fref('trend_12_graph.sas')
outfile='z:\test.sas';
run;
endrsubmit;
Gaurav
Calcite | Level 5
You may try using the following pseudo code to move your programs onto the local machine from the remote server.


filename locref 'c:\';
rsubmit;
filename fref '/local/programs';
proc download infile=fref('*.sas')
outfile=locref;
run;
endrsubmit;



This code would copy all the codes residing on the UNIX server under the directory '/local/programs'
Chip
Calcite | Level 5
Thanks Scott and Gaurav! When I spelled out the outfile location, it worked.

rsubmit;
OPTIONS MSTORED SASMSTORE=HOME;

filename fref '/p02/data/penv/hgsa/intrnet';

proc download infile=fref('trend_12_graph.sas')
outfile='z:\test.sas';
run;
endrsubmit;
Chip
Calcite | Level 5
Thanks Scott and Gaurav! When I spelled out the outfile location, it worked.

rsubmit;
OPTIONS MSTORED SASMSTORE=HOME;

filename fref '/p02/data/penv/hgsa/intrnet';

proc download infile=fref('trend_12_graph.sas')
outfile='z:\test.sas';
run;
endrsubmit;
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 2685 views
  • 0 likes
  • 3 in conversation