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)

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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