Creating a dynamic named zip file using Automation Designer

I’m trying to use the Automation Designer tool to create a dynamically named zip file. Basically I want the query run start date (sysdate -7 ) and end date (sysdate) appended to the end of the zip file name (example testfilename_ddmmyyyy_ddmmyyyy.zip). I have been able to successfully create dynamically named files in the past using the file iterator and variables on export data sets, but when I try the same steps to create an archive file it simply shows the variable holder (example testfilename_%zip_dt%.zip) in the file name.

Steps that I’m following:

  1. create Execute Script to get the dates and save them for later

set serveroutput on size 10000
set feedback off

declare

l_filename4 varchar(50) ;

begin
select to_char(trunc(sysdate-7),‘yyyymmdd’) ||’-’|| to_char(trunc(sysdate-1), ‘yyyymmdd’)
into l_filename4
from dual;

dbms_output.put_line(l_filename4);
end;

Outputting to Output2.txt

  1. Create a File Iterator with variable and archive

FileIterator1 [C:\output2.txt]

|

|-- Create Variable[postzip = c:\testfilename_%FileIterator1%.zip]

|–Archive[c:%postzip%.zip]

Items to compress = c:\samplefiles*.csv

The output2.txt creates correctly, the zip file compresses all csv files, but the new zip file is called %postzip%.zip

Hopefully, this makes sense.

Version info:

Toad Version 12.1.0.22

Oracle 10g 64bit

THANKS IN ADVANCE!!

Doesn’t look like the filename field in the archive action allows for variable control, which would be needed to do what you want. Looks like this would
be a good enhancement. Please add this to the Toad for Oracle Idea Pond…

http://www.toadworld.com/products/toad-for-oracle/i/utilities/default.aspx

From: oohmylord [mailto:bounce-oohmylord@toadworld.com]

Sent: Wednesday, January 29, 2014 1:32 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Creating a dynamic named zip file using Automation Designer

Creating a dynamic named zip file using Automation Designer

Thread created by oohmylord

I’m trying to use the Automation Designer tool to create a dynamically named zip file. Basically I want the query run start date (sysdate -7 ) and end date (sysdate) appended to the end of the zip file name
(example testfilename_ddmmyyyy_ddmmyyyy.zip). I have been able to successfully create dynamically named files in the past using the file iterator and variables on export data sets, but when I try the same steps to create an archive file it simply shows the
variable holder (example testfilename_%zip_dt%.zip) in the file name.

Steps that I’m following:

  1. create Execute Script to get the dates and save them for later

set serveroutput on size 10000

set feedback off

declare

l_filename4 varchar(50) ;

begin

select to_char(trunc(sysdate-7),‘yyyymmdd’) ||’-’|| to_char(trunc(sysdate-1), ‘yyyymmdd’)

into l_filename4

from dual;

dbms_output.put_line(l_filename4);

end;

Outputting to Output2.txt

  1. Create a File Iterator with variable and archive

FileIterator1 [C:\output2.txt]

|

|-- Create Variable[postzip = c:\testfilename_%FileIterator1%.zip]

|–Archive[c:%postzip%.zip]

Items to compress = c:\samplefiles*.csv

The output2.txt creates correctly, the zip file compresses all csv files, but the new zip file is called %postzip%.zip

Hopefully, this makes sense.

Version info:

Toad Version 12.1.0.22

Oracle 10g 64bit

THANKS IN ADVANCE!!

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

It will take longer to discuss than to just add variable support there, and it should probably be there anyway. I’ll be there next beta.

You’ll be there or variable support will be there? :slight_smile:

iheartjimmy.wordpress.com/…/potato-potahto