BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

You can open a ticket with SAS Support to figure out how to get REMOTE libname engine to work right for your connections.

Technical Support Form

Tom
Super User Tom
Super User

The other syntax in the help file is to put the port number into the macro variable, then you can reference it as a single level name.

%let host1=Server1 50001 ;

signon host1 user=????? password=?????  ;

libname from1 remote '~/temp/test/year/1997/' server=host1;


Florent
Quartz | Level 8

Hi Jerry,

When looking at your errors (see below), it looks obvious to me that you did not declare the macro variables Path1, Path2 and Path3. Because of that, you get the warning on symbolic reference PATH not resolved.

WARNING: Apparent symbolic reference I not resolved.

8     libname prod&&i "~/dc/data_test&&path&i" access=readonly ;

WARNING: Apparent symbolic reference I not resolved.

ERROR: Libref in LIBNAME statement must be followed either by quoted string or

       engine name or semicolon; "&" found.

ERROR: Error in the LIBNAME statement.

WARNING: Apparent symbolic reference I not resolved.

WARNING: Apparent symbolic reference PATH not resolved.

WARNING: Apparent symbolic reference I not resolved.

Also, the definition of the libname should rather look as follows (without a double ampersand in the name of the libname):

libname prod&i "~/temp/test&&path&i" access=readonly ;

Tom
Super User Tom
Super User

You are still having trouble because of the interaction of the macro execution and the remote submission.

You are running the macro on your local session so the variable I is defined in the local session.  One way to fix that is to copy it to the remote session using %SYSLPUT.

%macro xx;

rsubmit;

%do i=1 %to 1 ;

  %syslput i=&i ;

  libname path&i '.';

%end;

endrsubmit;

%mend xx;

%xx;

Another way is to define and execute the macro on the remote session.

rsubmit;

%macro xx;

  %do i=1 %to 1 ;

    libname path&i '.';

  %end;

%mend xx;

%xx;

endrsubmit;

jerry898969
Pyrite | Level 9

Hi Tom,

I ended up getting it to work with %syslput.  Here is my code that works.  The paths table has a list of paths.

data _null_ ;

    set paths ;   

    call symput('path'||trim(left(_n_)), trim(path)) ;   

    call symput('nrows', trim(left(_n_))) ;

run ;

%macro paths ;

%do i=1 %to &nrows ;

options netencryptalgorithm = tripledes ;

%let host=test.test ;

signon host.50001 user=???? password=???? ;

%SYSLPUT q="~/temp/test/&&path&i" ;

rsubmit ;

libname mdata &q access=readonly ;

proc download inlib=mdata outlib=work ;   

run;

endrsubmit ;

signoff ;

options netencryptalgorithm = tripledes ;

%let host=test.test ;

signon host.50002 user=???? password=???? ;

%SYSLPUT q="~/temp/test_temp/&&path&i" ;

rsubmit ;

libname mdata &q ;

proc upload in=work out=mdata ;       

run;

endrsubmit ;

signoff ;

proc datasets lib = work nolist ;

quit ;

%end ;

%mend paths ;

%paths ;

My question I have now is by using the code abover will proc upload allow my tables to convert over from 9.1.3 to 9.2 64-bit?

Thank you everyone for all your help.

MarkW
Calcite | Level 5

I just went though this exercise on remote linux servers and found the easiest and fastest way was to ftp the data and then run proc migrate.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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