Set Environment Variable
Moderators: chulett, rschirm, roy
Set Environment Variable
Hi
In a sequence, we have two different jobs depending on one job. Currently we are passing the parameter value to sequence using parameter file.
Now, the design has changed and we need to pass the parameter value from Oracle Database by reading the param table.
Option one:
Read the parameter from Oracle Database and write into existing parameter file.
However with this option, we are not removing the dependency of parameter file completely.
I was trying to add new environment variable and set the value for that for environment variable at runtime. But, didn't find a way to assign a value to Environment Variable at runtime.
Is there any other options using which I can read the parameter from Oracle Database and Pass to the Sequence Variable?
Thanks in Advance.
Thanks
Bob
In a sequence, we have two different jobs depending on one job. Currently we are passing the parameter value to sequence using parameter file.
Now, the design has changed and we need to pass the parameter value from Oracle Database by reading the param table.
Option one:
Read the parameter from Oracle Database and write into existing parameter file.
However with this option, we are not removing the dependency of parameter file completely.
I was trying to add new environment variable and set the value for that for environment variable at runtime. But, didn't find a way to assign a value to Environment Variable at runtime.
Is there any other options using which I can read the parameter from Oracle Database and Pass to the Sequence Variable?
Thanks in Advance.
Thanks
Bob
Re: Set Environment Variable
Hi ,
We can pass the value to the job at the runtime by using dsjob.
dsjob -run -param parameter=`cat filename ` projectname jobname . I
think we have to use the option of storing that value in a file .
Thanks
We can pass the value to the job at the runtime by using dsjob.
dsjob -run -param parameter=`cat filename ` projectname jobname . I
think we have to use the option of storing that value in a file .
Thanks
bbobpop1 wrote:Hi
In a sequence, we have two different jobs depending on one job. Currently we are passing the parameter value to sequence using parameter file.
Now, the design has changed and we need to pass the parameter value from Oracle Database by reading the param table.
Option one:
Read the parameter from Oracle Database and write into existing parameter file.
However with this option, we are not removing the dependency of parameter file completely.
I was trying to add new environment variable and set the value for that for environment variable at runtime. But, didn't find a way to assign a value to Environment Variable at runtime.
Is there any other options using which I can read the parameter from Oracle Database and Pass to the Sequence Variable?
Thanks in Advance.
Thanks
Bob
Nag
Hi
USERSTATUS is a good option, however If I have to pass 15-20 parameters, then I need to set the USERSTATUS with comma separated string and assign it to another job using some manipulation..
Is there any way, using which I can assign Parameters of job one to another using sequence?
Can we create our own Variables like $UserStatus and assign them a value at Job Level?
Thanks in Advance.
Bob
USERSTATUS is a good option, however If I have to pass 15-20 parameters, then I need to set the USERSTATUS with comma separated string and assign it to another job using some manipulation..
Is there any way, using which I can assign Parameters of job one to another using sequence?
Can we create our own Variables like $UserStatus and assign them a value at Job Level?
Thanks in Advance.
Bob
Sure, a UserVariables stage could be set up to grab values from somewhere and instantiate them for other jobs, including an Oracle table I would think. Unless you pull them all at once and parse out what you need, however, pulling one at a time from a database will be pretty slow I'd wager.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi Craig,
I am trying to avoid parsing the values and trying to develop a solution in which I can fetch all the values for parameters from Oracle Database in one parallel job, assign each parameter with the value from database and directly (without parsing) pass those parameters (with values) to another job.
So I was trying to set the values for environment variable in a job and use them in a sequence, but the scope of variables stuck me.
Also, If I use the USERSTATUS then I need to set a value in Server Job, I guess we are not using SMP system so unable to see the BASIC Transformer Option in Parallel.
About User Variables:
If I define user variables then to assign value for those user variables I need to fetch the values from another job. And one way I know to assign the user variable is using $USERSTATUS.
Can you please guide me and correct me if I am wrong or on wrong path or misunderstood your suggestion?
Thanks
Bob
I am trying to avoid parsing the values and trying to develop a solution in which I can fetch all the values for parameters from Oracle Database in one parallel job, assign each parameter with the value from database and directly (without parsing) pass those parameters (with values) to another job.
So I was trying to set the values for environment variable in a job and use them in a sequence, but the scope of variables stuck me.
Also, If I use the USERSTATUS then I need to set a value in Server Job, I guess we are not using SMP system so unable to see the BASIC Transformer Option in Parallel.
About User Variables:
If I define user variables then to assign value for those user variables I need to fetch the values from another job. And one way I know to assign the user variable is using $USERSTATUS.
Can you please guide me and correct me if I am wrong or on wrong path or misunderstood your suggestion?
Thanks
Bob
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi
Thanks for reply. I was trying to use the utility "UtilityRunJob" as below
UtilityGetRunJobInfo(UtilityRunJob("Depend_Job", "my_date=": DSLink2.STATUS, 0,0),"JobCompletionStatus",'')
I guess, we can only read the value of parameter my_date i.e. "DSLink2.STATUS" in the transformer. (That means in the same job)
Can we read metadata (column name and value) of job one (A) from another Job (B)? Consider a scenario in which Job A will execute first in sequence.
If possible, we can read the value of executed job i.e. parameter job say Job A and use those values in Job B.
Thanks in Advance
Thanks
Bob
Thanks for reply. I was trying to use the utility "UtilityRunJob" as below
UtilityGetRunJobInfo(UtilityRunJob("Depend_Job", "my_date=": DSLink2.STATUS, 0,0),"JobCompletionStatus",'')
I guess, we can only read the value of parameter my_date i.e. "DSLink2.STATUS" in the transformer. (That means in the same job)
Can we read metadata (column name and value) of job one (A) from another Job (B)? Consider a scenario in which Job A will execute first in sequence.
If possible, we can read the value of executed job i.e. parameter job say Job A and use those values in Job B.
Thanks in Advance
Thanks
Bob