DATA Step, Macro, Functions and more

passing parameters to SAS macros

Reply
Contributor
Posts: 44

passing parameters to SAS macros

I want to pass a parameter to a macro as follows:

%CreateCSVFile(&OutputDirectory || "FD_Summary.csv", 'InputDataset')

This throws an error. I know I can get around it by saying:

Data _Null_;
Informat OutputFile $200.;
OutputFile = &ExperienceOutput || "FD_Summary.csv";
Call Symput('OutputFile',OutputFile);
Run;

%CreateCSVFile(&OutputFile, 'FD_Summary', 1000);

I'd like to avoid the extra data step if I can though. Is this possible?

Super User
Posts: 17,871

Re: passing parameters to SAS macros

What about

%createscsvfile(&outputdirectory.FD_summary.csv, inputdataset)

Ask a Question
Discussion stats
  • 1 reply
  • 143 views
  • 3 likes
  • 2 in conversation