Help converting to Upcase in dataset directory path !!

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
its_me48
Participant
Posts: 33
Joined: Fri Apr 29, 2005 10:09 am

Help converting to Upcase in dataset directory path !!

Post 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
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

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

Post 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
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post 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.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
its_me48
Participant
Posts: 33
Joined: Fri Apr 29, 2005 10:09 am

Post 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 ...
Post Reply