using quotes in sas macro filename pipe

前端 未结 2 1523
轮回少年
轮回少年 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";

提交回复
热议问题