Hello - I am trying to run a contaminant load estimation model in the SAS Studio OnDemand environment that is configured to read in an rdb file with daily streamflow values. This program works successfully on a locally installed version of SAS, but is unable to find the rdb file when I try to run it in the SAS OnDemand environment. I've confirmed that the directory paths in the program are consistent with the paths in my OnDemand workspace. I suspect that this is probably not enough information for someone to help me out, but at least maybe it's a starting point.
Thanks.
By this:
I've confirmed that the directory paths in the program are consistent with the paths in my OnDemand workspace.
You mean you've uploaded the RDB files to the server space and you've verified the files exist in the workspace?
@darwise wrote:
Hello - I am trying to run a contaminant load estimation model in the SAS Studio OnDemand environment that is configured to read in an rdb file with daily streamflow values. This program works successfully on a locally installed version of SAS, but is unable to find the rdb file when I try to run it in the SAS OnDemand environment. I've confirmed that the directory paths in the program are consistent with the paths in my OnDemand workspace. I suspect that this is probably not enough information for someone to help me out, but at least maybe it's a starting point.
Thanks.
Yes - I've confirmed that the RDB file exists in my workspace.
What does your LOG show when you run the code on SAS On Demand for what you use to read the file?
Thanks for your feedback. This program (and all associated macros) ran successfully on a local version of SAS, but not in the SAS OnDemand environment. Therefore, I concluded that the problem was due to trying to run it using OnDemand.
Yes - the programs, the macros, and the input files are the exact ones used on the locally installed SAS.
One of the macros that is used has the code below (with PROC IMPORT). Is that causing a problem in the OnDemand version of SAS?
/* Macro loads the model specifications and associated key files into sas. */
%macro set_model_specs_files ;
options nomprint nomacrogen nosource ;
/* Point to an external file to be created */
filename tempout "&results_home.\tempout.txt" ;
/* Redirect the output to a file */
proc printto log=tempout new ;
run ;
proc import datafile = "&model_specs_file" out = model_specs_file dbms = tab replace ;
run ;
data model_specs_file ;
length station_id $ &station_id_length ;
format station_id $&station_id_length.. ;
informat station_id $&station_id_length.. ;
set model_specs_file ;
run ;
proc import datafile = "&model_specs_key_file" out = model_specs_key_file dbms = tab replace ;
run ;
/* Redirect the output back to the output window */
%if %upcase(&if_output_log) = YES %then %do ;
proc printto log = filelog ;
run ;
%end ;
%else %do ;
proc printto ;
run ;
%end ;
%let rc = %sysfunc(fdelete(tempout)) ;
options &sas_options ;
%mend set_model_specs_files ;
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!
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.