Prompt for a file name

One Star

Prompt for a file name

I'm trying to extract a query in a CSV file. This is not a problem.
I'd like to prompt to the user le file name for the file and then set the filename in the TfileOutpuDelimited task.
But I realy don't see how to do this, if it possible.
Any ideas are welcome!
greg
One Star

Re: Prompt for a file name

Define a variable by name FILE_NAME as a context variable and check the prompt checkbox for the context variable. While executing the job you will be prompted by TSO to enter the file name. The value you enter there will be assigned to the FILE_NAME context variable.
Enter context.FILENAME at TfileOutpuDelimited component's file name textbox. By this, the value you have entered in the prompt dialog will be used as a output file name.
The following you need to do in case you execute the exported batchfile.
After exporting the Job script, you need to modify the batch file and add some thing similar to the following
--context_param FILE_NAME=D:\output.txt
Thanks and Regards,
Pravu Mishra.
One Star

Re: Prompt for a file name

Thanks it works like this and it's very simple!!
One Star

Re: Prompt for a file name

Hi greg,
as Pravu said: You need to set the value at command line level if you export your job. If you need a dialog at this point to you should tae a log at the following request: 3424.
Bye
Volker