Job Parameter Value Assignment
Posted: Mon Oct 13, 2014 7:36 am
Hi All,
Scenario:
My run-id is created by oracle sequence in one job.
In subsequent job I need to use this generated value. So the requirement is assigning value of run-id generated in job1 to some variable/parameter and then pass the value to job2.
What I did:
Step1:
1. Created a parameter set (Say PS1) in datastage designer.
2. Created param name as JOB_ID
3. In Values tab gave File1 as file name.
Step2:
1. Created a Job J1, that writes one value to File1.
So job_id has value. Lets say it as 1001.
2. Created a Job J2 which loads a table that has 4 columns as below:
SourceTable, Sourceid, targettable , targetid
A,0,B,1001
Not I tried to pass paramfile value PS1.JOB_ID to targetid through JobActivity using the value expression.
But I am getting a zero passed everytime.
I could see a unique number created in Job J1 and is loaded to File1 in job J1.
I also tried using : field(convert(@FM,',', PS1.JOB_ID),',',1)
Am I missing something here.
Any help is really appreciated.
Thanks in Advance.
Scenario:
My run-id is created by oracle sequence in one job.
In subsequent job I need to use this generated value. So the requirement is assigning value of run-id generated in job1 to some variable/parameter and then pass the value to job2.
What I did:
Step1:
1. Created a parameter set (Say PS1) in datastage designer.
2. Created param name as JOB_ID
3. In Values tab gave File1 as file name.
Step2:
1. Created a Job J1, that writes one value to File1.
So job_id has value. Lets say it as 1001.
2. Created a Job J2 which loads a table that has 4 columns as below:
SourceTable, Sourceid, targettable , targetid
A,0,B,1001
Not I tried to pass paramfile value PS1.JOB_ID to targetid through JobActivity using the value expression.
But I am getting a zero passed everytime.
I could see a unique number created in Job J1 and is loaded to File1 in job J1.
I also tried using : field(convert(@FM,',', PS1.JOB_ID),',',1)
Am I missing something here.
Any help is really appreciated.
Thanks in Advance.