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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1156 views
  • 0 likes
  • 2 in conversation