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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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