using quotes in sas macro filename pipe

前端 未结 2 1428
轮回少年
轮回少年 2021-01-16 06:39

I am using the following Macro that uses filename pipe. But get an error saying invalid option name \"dir\", etc. I suspect it could be due to the quotes while defining file

相关标签:
2条回答
  • 2021-01-16 07:21

    The filepath Macro variable needs wrapping in double-quotes as it contains spaces. But as your string is double-quoted, you need double-double-quotes...

    filename CDR_Bulk pipe "dir ""&filepath"" /a:-d-h-s /b /s";
    0 讨论(0)
  • 2021-01-16 07:32

    Try changing %bquote in your macro to %str().

    %Str() works during macro compile time, and should mask the double quote marks.

    HTH

    0 讨论(0)
提交回复
热议问题