Help using Base SAS procedures

Export as a step - including a variable in the output filename?

Reply
Occasional Contributor
Posts: 7

Export as a step - including a variable in the output filename?

Hi again all,

Does anyone know how, using the Export File step in an EG project, to include a variable value in the output filename?  For example, if the report prompts for a favorite colour and I pick Red, I'd like for Red to appear in the filename of the saved report.

Thanks again!

Super User
Posts: 19,772

Re: Export as a step - including a variable in the output filename?

If you've created your prompt as &color then take the export code and modify it so that its something like the following:

proc export data=have out=&color._output....

Trusted Advisor
Posts: 2,115

Re: Export as a step - including a variable in the output filename?

Tarun,

Reeza's approach won't work with the point-n-click interface to the EGuide export file task.  It would only work with hard-coding for exporting SAS datasets.

I've never been able to do it, but would love to know how.  I've also tried to include the macro value in the result name to no success.  It may be an item for a SAS Ballot.

Doc Muhlbaier

Duke

Ask a Question
Discussion stats
  • 2 replies
  • 165 views
  • 0 likes
  • 3 in conversation