DATA Step, Macro, Functions and more

Unable to use wildcards in log file name

Reply
Contributor
Posts: 71

Unable to use wildcards in log file name

 I am trying to run a macro on UNIx environment which takes the log filename as one input:

 

%custom_macro( lib=abc,

logfile= ad*.log);

 

but I get in log that the file /lib/ad*.log doesn't exist. However, I am able to run the same macro in Windows environment without any issues and it is taking the wildcard properly. Please suggest me any solution if it is due to the usage of * in UNIX env.

 

 

Super User
Super User
Posts: 9,193

Re: Unable to use wildcards in log file name

A quick Google states that Unix uses * as wildcard as well.  Its likely the macro itself, provide a log/code example.  Perhaps the path doesn't exist/you don't have access to it, or its on a different server.

Respected Advisor
Posts: 2,647

Re: Unable to use wildcards in log file name

Windows is not the same as UNIX. UNIX is not the same as Windows.

 

Why would you want to name the log file with an asterisk in the name anyway? Use an actual file name (without an asterisk).

--
Paige Miller
Super User
Posts: 9,549

Re: Unable to use wildcards in log file name

Please post the log, using the {i} icon to preserve formatting. Make sure that the macro code and the macro call are included.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 3 replies
  • 75 views
  • 0 likes
  • 4 in conversation