BookmarkSubscribeRSS Feed
harsham
Calcite | Level 5

Hi  All,

 

I have a scenario as mentioned below

 

OS UNIX

 

source= /sas/basesas/avancedsas/advancedsas & basesas/abc.xls

 

destination=/one/two/three

 

I need to do a file transfer in sas eg 5.1 using x commands from source to destination.

 

Kindly suggest how to mask " & " values  while performing FTP using  X commands?

 

 

 

4 REPLIES 4
Kurt_Bremser
Super User

Using "&" in a pathname in a UNIX system is REALLY BAD, as the & character has very special meaning to the operating system.

Name your path like this:

/sas/basesas/avancedsas/advancedsas_and_basesas

and all your problems vanish in a puff of logic smoke.

 

See Maxim 44 and Maxim 15.

harsham
Calcite | Level 5

No it's not possible to make a change, please let me know in case of any alternatives

Kurt_Bremser
Super User

It's always possible to correct a mistake. In this case, the mistake is so egregious that making the change is not only possible, but mandatory.

Keeping that & in the pathname along with the blanks is an exercise in stupidity.

Astounding
PROC Star

The X command expects the command itself to be in quotes.  If you use single quotes instead of double quotes, that automatically masks all macro references.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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