Job Parameter Value Assignment
Moderators: chulett, rschirm, roy
Job Parameter Value Assignment
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.
Thanks,
Pavan
Pavan
Re: Job Parameter Value Assignment
Thank you for the quick reply.
Now I have set First Line is Column Names = True in the job J1.
Keeping all others same, I ran the job and I am getting the same output.
Do you think I should use a Execute Command Activity before Job J2 in the Job sequence?
Now I have set First Line is Column Names = True in the job J1.
Keeping all others same, I ran the job and I am getting the same output.
Do you think I should use a Execute Command Activity before Job J2 in the Job sequence?
Thanks,
Pavan
Pavan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What Craig is trying to say is that the entry in the value file should be of the form
First line is column names should be False.
Code: Select all
ID=1001
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Job Parameter Value Assignment
Yes. The value in the file looks like :
ID=1055
and is located at
F:\IBM\InformationServer\Server\Projects\PRO_NAME\valuefileDB
I created the file at this path rather creating it using Parameter Sets from designer.
I am confused on how to read this file now.
ID=1055
and is located at
F:\IBM\InformationServer\Server\Projects\PRO_NAME\valuefileDB
I created the file at this path rather creating it using Parameter Sets from designer.
I am confused on how to read this file now.
Thanks,
Pavan
Pavan
Re: Job Parameter Value Assignment
I was missing a execute command stage in below and the command.
I found it now. To read contents of param file we should use a in command 'type'.
It worked now.
Thank you all for your time.
I found it now. To read contents of param file we should use a in command 'type'.
It worked now.
Thank you all for your time.
Thanks,
Pavan
Pavan