Page 1 of 1

Help converting to Upcase in dataset directory path !!

Posted: Mon May 18, 2009 12:10 pm
by its_me48
New to parallel jobs. I created few datasets that will be used in the Lookups.
Presently all datasets are created under /dataset directory just fine.
But I want to create datasets under each project directory (we have DWDEV, DWTEST, DWSTAGE, etc...)

So for datasets here is what I did
/datasets/#DBNAME#/<DSName>
DBNAME is the parameter we pass in the job. However, we use lower case. mixed case, upper case to pass in the dbname.. I want to be upper case so that its consistent... Is there a way to UPCASE that variable in the job itself... I don't want to do it in a batch and pass because if I run the dataset job only it will fail..

Please help.

Thanks,
-Sam

Re: Help converting to Upcase in dataset directory path !!

Posted: Mon May 18, 2009 1:47 pm
by JRodriguez
Sam,

There is not way to do it in the job itself, because the filename path does not allow any function.

I would used UPCASE function in the sequence or batch used to execute this job and set my default values in the job using only upper cases so the job don't fail if executed as stand alone ....

Be aware that you should recreate all dataset using the new standard ...

its_me48 wrote:New to parallel jobs. I created few datasets that will
be used in the Lookups.
Presently all datasets are created under /dataset directory just fine.
But I want to create datasets under each project directory (we have DWDEV, DWTEST, DWSTAGE, etc...)

So for datasets here is what I did
/datasets/#DBNAME#/<DSName>
DBNAME is the parameter we pass in the job. However, we use lower case. mixed case, upper case to pass in the dbname.. I want to be upper case so that its consistent... Is there a way to UPCASE that variable in the job itself... I don't want to do it in a batch and pass because if I run the dataset job only it will fail..

Please help.

Thanks,
-Sam

Posted: Mon May 18, 2009 3:11 pm
by asorrell
I want to make sure I understand - you are trying to create your datasets in a subdirectory underneath your project folders? This is not a recommended practice if that is the case. You risk a job accidentally filling up the disk with a large dataset and corrupting your project when you run out of space. That can cause very large problems in recovery.

Posted: Mon May 18, 2009 3:33 pm
by chulett
However, the 'File' path declared in the Data Set stage with the .ds suffix is just for the control file - not the actual Data Set itself. The actual data files go across your 'resource' disks from what little I know. Yes? :?

Posted: Mon May 18, 2009 4:17 pm
by ray.wurlod
Yes.

Posted: Mon May 18, 2009 4:19 pm
by ray.wurlod
Parameter values can not be changed within the job that consumes them. They are read when the job starts and are fixed thereafter.

As noted, you need to handle your casing issue prior to executing the job run request. You can do so very easily in a job sequence, particularly if you are using version 7.5 or later.

Posted: Mon May 18, 2009 4:42 pm
by its_me48
Thanks to all who replied.

Looks like passing it in sequence or batch job would be the only way to go... So, if I were to run the dataset job only I need to make sure the parameters I pass in are UPPER CASE in dataset as well as the load job that is using the dataset jobs.

Thanks again,
-Sam
ray.wurlod wrote:Parameter values can not be changed within the job that consumes them. They are read when the job starts and are fixed thereafter.

As noted, you need to handle your casing issue prior to executing ...