If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Variable date delivery name

Started by SynexusStuart, 24 Sep 2010 06:24:19 AM

Previous topic - Next topic

SynexusStuart

Hi,

I have to create a text file every day using Data Manager, this runs to a local folder on the server named "AppointmentLetters.txt".

What I would like is each day's file to be date stamped with the day it was run so we'd have:

AppointmentLetters_20100924.txt
AppointmentLetters_20100923.txt
AppointmentLetters_20100922.txt
AppointmentLetters_20100921.txt etc etc...

Currently, I would have to manually change the file names every day.

Is it possible to automate the above using DM?

Any help (even to tell me that it's impossible) would be useful.

Cheers,
Stuart



MFGF

Hi,

I reckon this should be fairly straightforward - just define a variable in the build which is populated with the filename you want to save to (use the Sysdate() function to get the current date and time), then use the variable as the filename in the delivery module.

Regards,

MF.
Meep!

SynexusStuart

Thanks MF,

I created the Variable (called "DateStamp").

The problem I have is getting the variable into the filename. How do you do this?

In FactDeliveryProperties > ModuleProperties there is a place to write a file destination. This must be suffixed with ".txt" but how do i put the variable in the directory string?

Hope this makes sense!

Stuart

MFGF

Hi Stuart,

From the top:

1. Create your variable (DateStamp) in the properties of your build.  Define it as a CHAR datatype and with a size (precision) of 35.  Set the initial expression to be Concat('AppointmentLetters_',Left(ToChar(Sysdate()),10),'.txt')

2. Set the Output Filename of your Text File Delivery (Fact Delivery Properties, Module Properties tab) in the build to be <some path or other>\{$DateStamp}

Hopefully this should work OK for you.

Best regards,

MF.
Meep!