DATA Step, Macro, Functions and more

How do I put the current date into the name of a file to export?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

How do I put the current date into the name of a file to export?

I want to export a file in the format of abc_20120906.csv. How can I implement code so I don't need to hard code the date every time I run the pgm:

OUTFILE='''/depts/abc_date variable name..csv'''


Accepted Solutions
Solution
‎09-06-2012 04:27 PM
Trusted Advisor
Posts: 1,913

Re: How do I put the current date into the name of a file to export?

You would use a MACRO variable here, see Example 1 in the %SYSFUNC statement documentation

View solution in original post


All Replies
Solution
‎09-06-2012 04:27 PM
Trusted Advisor
Posts: 1,913

Re: How do I put the current date into the name of a file to export?

You would use a MACRO variable here, see Example 1 in the %SYSFUNC statement documentation

Occasional Contributor
Posts: 10

Re: How do I put the current date into the name of a file to export?

Posted in reply to PaigeMiller

worked as advertised. Thanks for the quick response!!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 177 views
  • 0 likes
  • 2 in conversation