Changing case of parameters on the fly
Posted: Mon Mar 02, 2009 9:44 am
Hi all!
I have done some searching and haven't found anything like this question yet. If it is out there and I missed, I offer my apologies in advance.
I have a large project that runs common code for 19 different companies at the moment (and growing). Everything that I can parameterize to make things dynamic to prevent/minimize the need for company specific code has been done, including the naming of files created during processing. This is where my problem lies.
I have a simple job that pulls data from a SQL Server 2000 table and runs it into a sequential file and one of the parameters is called 'CompanyName'. It is passed in from the shell script that runs job control. It is capitalized when passed in and is used in that format most of the time. The one place that it isn't is in a file name that is defined as:
The rest of the code is expecting the filename to be look like this:
but the file name ends up like this:
On a case sensitive system, this is a problem. Is there a way to apply the Downcase() function to the CompanyName parameter where it needs to be lower case. Most of the time, it needs to be upper case as it is passed in by job control, but for the filename, it needs to be lower case.
Trying this:
gives me this:
I am probably just having a mental speedbump with this, but how do I get that stupid thing lower case on the fly as I need to be without affecting it's overall state within the job?
Thanks in advance!
I have done some searching and haven't found anything like this question yet. If it is out there and I missed, I offer my apologies in advance.
I have a large project that runs common code for 19 different companies at the moment (and growing). Everything that I can parameterize to make things dynamic to prevent/minimize the need for company specific code has been done, including the naming of files created during processing. This is where my problem lies.
I have a simple job that pulls data from a SQL Server 2000 table and runs it into a sequential file and one of the parameters is called 'CompanyName'. It is passed in from the shell script that runs job control. It is capitalized when passed in and is used in that format most of the time. The one place that it isn't is in a file name that is defined as:
Code: Select all
'#DirScripts#/#CompanyName#_#Environment#.csv'
Code: Select all
'/datastage/int/bts/ldr/scripts/lmc_int.csv'
Code: Select all
'/datastage/int/bts/ldr/scripts/LMC_int.csv'
Trying this:
Code: Select all
'#DirScripts#/downcase(#CompanyName#)_#Environment#.csv'
Code: Select all
'downcase(LMC)_int.csv'.
Thanks in advance!