SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Need to get the SAS DI Filewriter filename to use in another macro

Accepted Solution Solved
Reply
User
Posts: 1
Accepted Solution

Need to get the SAS DI Filewriter filename to use in another macro

I have a filewriter transform where I have added a timestamp parameter to the filename that gets written to. This of course changes each day it is run.

 

I would like to know how can I capture the filename to use in another macro that will FTP the file to another location?

 

The log shows something like this:

 

Filename=/usr/DATA/ETL/TextOutput/myfile_20160429.txt

 

Is this the best way to accomplish this issue or should I use a User Written solution?

 

Thank you


Accepted Solutions
Solution
‎04-29-2016 02:28 PM
User
Posts: 1

Re: Need to get the SAS DI Filewriter filename to use in another macro

I have a parameter defined in the Job named 'timestamp' that is used hold the date like '20160429'. This is appended to the file name for the external output file.

 

I now see where I can capture this date and append it to the hard coded part of the file name, so I appreciate the suggestion.

 

Thanks

View solution in original post


All Replies
Super User
Posts: 5,257

Re: Need to get the SAS DI Filewriter filename to use in another macro

Moved post to the forum for DI Studio issues - Data Management.

Data never sleeps
Super User
Posts: 5,257

Re: Need to get the SAS DI Filewriter filename to use in another macro

Can you specify what you mean by a parameter.

If you specify as a Parameter on the eternal, there will be a macro variable automatically assigned for you, and you could use that in a subsequent step, such as post code, or User Written code for your ftp.

Data never sleeps
Solution
‎04-29-2016 02:28 PM
User
Posts: 1

Re: Need to get the SAS DI Filewriter filename to use in another macro

I have a parameter defined in the Job named 'timestamp' that is used hold the date like '20160429'. This is appended to the file name for the external output file.

 

I now see where I can capture this date and append it to the hard coded part of the file name, so I appreciate the suggestion.

 

Thanks

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 345 views
  • 0 likes
  • 2 in conversation