BookmarkSubscribeRSS Feed
Q1983
Lapis Lazuli | Level 10

I am retrieving a directory listing used in ftp upload

%let HHF_host=********;             /* Machine to connect with ftp      */

%let HHF_userid=******;              /* ID to use with ftp command       */

%let HHF_ftppwd=********;                /* Password for the ftp userid      */

%let workpath =  %sysfunc(pathname(work));

filename dir ftp '' ls cd="/inbound" user=&HHF_userid pass="&HHF_ftppwd" 

         host="&HHF_host" prompt;

data folders;

  infile dir missover truncover;

   input name $;

   call symput('F'||trim(left(_N_)),compress(name));

run;

I get the following warning WARNING: Apparent symbolic reference DIR not resolved.

1 REPLY 1
Tom
Super User Tom
Super User

Does one of your passwords include an & character?

You might want to use macro quoting to prevent the macro processor from trying to expand the value.

Personally I normally include the quotes into the macro variables. This makes it possible to use single quotes around passwords that contain macro triggers.

%let HHF_ftppwd='********';                /* QUOTED Password for the ftp userid      */

...

pass=&HHF_ftppwd

...

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!

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
  • 1 reply
  • 659 views
  • 0 likes
  • 2 in conversation