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?
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.
No it's not possible to make a change, please let me know in case of any alternatives
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.
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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.