BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rtynd123
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
rtynd123
Calcite | Level 5

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

3 REPLIES 3
LinusH
Tourmaline | Level 20

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

Data never sleeps
LinusH
Tourmaline | Level 20

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
rtynd123
Calcite | Level 5

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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