BookmarkSubscribeRSS Feed
mediaeval
Calcite | Level 5

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?

1 REPLY 1
Reeza
Super User

What about

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1149 views
  • 3 likes
  • 2 in conversation