Want to make changes at the parameterset through the unix

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

Want to make changes at the parameterset through the unix

Post by mikva2012 »

Hi All,

I have a query , I want to make the changes at the parametset of the datastage through unix .
Is it possible to achieve the same through the unix.
Irfan.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Changing the "(As pre-defined)" values is not possible through operating system commands.

However, you can change values defined in values files belonging to the Parameter Set. Values files are text files that reside in the ParameterSets sub-directory in the project. Within that there is a sub-directory for each Parameter Set, and each values file may be found in that directory.

For example, if you have a parameter set called psQualifiers with four values files DEV, SIT, UAT and PRD, then the following structure will exist.

Code: Select all

         <ProjectDirectory>
              |
              |
            --+--
              |
              |
         psQualifiers
              |
              |
   +------+---+--+------+
   |      |      |      |
  DEV    SIT    UAT    PRD
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

Post by mikva2012 »

Hi Ray,
I tried with the parameter value file, However I'm running the job by default it is showing (As-predefined) , everytime I have to select the value file name,
Is there any way I can make that value file default.

Or

How I can achieve the same through the Shell script.
Please reply with your valuable suggestion.
Irfan.
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
You can set the particulat value in job sequence.Lets say if have parameter set called "SourceDB" and it has four Values
Sourcedb_DEV
Sourcedb_SIT
Sourcedb_UAT
Sourcedb_PRD
If you are in dev env,you can set like below in sequence job:-

SourceDB="Sourcedb_DEV"
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

Post by mikva2012 »

Hi Prasson,

Is there any way we can dynamically update the parameter value.
Suppose if i'm running the job from command line , then how can I achieve the same.
Irfan.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

The method Ray mentioned (updating value files) is the proper and best way to accomplish this task when using parameter sets to pass your parameter values. You can certainly use whatever method you desire to create or modify a value file dynamically (shell script/awk/sed/perl/etc.), then pass that value file to the job.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

dsjob ... -param psQualifiers=DEV ...
Here psQualifiers is the name of a Parameter Set and DEV is the name of a values file in that Parameter Set.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

Post by mikva2012 »

much Thanks to Ray, Jwiles and Prasoon for your helps.
Yeah It is working for me , but I got one point if will use this concept for password , it will decipher my password in the datastage log and it will be visible to each and everyone
Irfan.
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
You can probably encrypt the password and store the encrypted value in file.

If you are encrypting the job parameter values,you can store the encrypted value in job parameter file by copying the output and pasting the value in parameter file.

Encrypt the information by running the encrypt command:-

Code: Select all

/opt/IBM/InformationServer/ASBNode/bin/encrypt.sh myPa$$w0rd
{iisenc}PvqKLr7z3QOLJCQ4QhbrrA==
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

Post by mikva2012 »

Thanks , Prasoon.
One more doubt, through which user-id should I run this script , the one which I used to run the datastage job or any of the user-id will be Ok.
Irfan.
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
You can try and test with your own userid but i think you need dsadm user to run this script.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Whatever your Engine-credentialled user is should be able to run.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mikva2012
Participant
Posts: 27
Joined: Sat Dec 01, 2012 4:14 pm
Location: India

Post by mikva2012 »

Thanks for your valuable suggestion.
Irfan.
Post Reply