BookmarkSubscribeRSS Feed
darwise
Calcite | Level 5

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.

11 REPLIES 11
Reeza
Super User

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?

 

Spoiler

@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.


darwise
Calcite | Level 5

Yes - I've confirmed that the RDB file exists in my workspace.

ballardw
Super User

What does your LOG show when you run the code on SAS On Demand for what you use to read the file?

darwise
Calcite | Level 5
ERROR: Data for flow station 11012500 does not exist - station not processed
ERROR: The MACRO windowing environment cannot be initialized due to a XU supervisor failure.
ERROR: The macro PUT_COMMENT will stop executing.
 

 

Reeza
Super User
From that error it appears that there's a problem with the macro/code - it's designed to handle the case when a station data doesn't exist for some reason by telling you there's an error:

This is not a SAS error, this is code from your program:
ERROR: Data for flow station 11012500 does not exist - station not processed
darwise
Calcite | Level 5

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.  

Reeza
Super User
Is the source data the same locally as in On Demand?
darwise
Calcite | Level 5

Yes - the programs, the macros, and the input files are the exact ones used on the locally installed SAS.

Reeza
Super User
For 100% check - you're not using PROC IMPORT anywhere in your code correct?
I'm assuming you've checked the data and that Station data is present.
darwise
Calcite | Level 5

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 ;

Reeza
Super User
Run a proc contents on the data set of each data set imported via proc contents in each system and verify they are the exact same - length/formats/types.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 11 replies
  • 1010 views
  • 1 like
  • 3 in conversation