BookmarkSubscribeRSS Feed
dkanand86
Calcite | Level 5

Hi Everyone,

 

I want to include the sas statements stored in an external file (.sas) into another sas code.

 

However, when i submit following code on server, it gives error.

 

RSUBMIT;
/*%let MyProgramFolder = \serverlocation\SAS_UTILITY_FOLDER_NEW;*/
%include "./ED_MACRO_for_fillr_v1.sas"  / lrecl=500;
ENDRSUBMIT;

 

ERROR:

ERROR: Invalid or unspecified remote session ID. Set OPTIONS REMOTE=session_id.

 

 

 

 

3 REPLIES 3
ballardw
Super User

You may be missing something in you %include file.

 

Try adding

options source2;

before the RSUBMIT to show the contents of the %include in the log and post the log. Post the results of the log.

 

Also between your comment and the %include there might confusion as the system you are running. The comment looks like Windows and the %include file looks like Unix or similar file system.

Generally it is a good idea to use a fully qualified path to the file as well.

Reeza
Super User

If your running on the server, the server needs to have access to the file path, ie usually not your local C drive. 

Kurt_Bremser
Super User

RSUBMIT is a statement of the SAS/CONNECT package.

To use it, you must have a CONNECT session to a host active; a session is initiated with the SIGNON statement.

 

Documentation for SAS/CONNECT is found here: SAS/CONNECT 9.4 User's Guide

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