how to store a value into a parameter from sql query.

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
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

how to store a value into a parameter from sql query.

Post by laxmi_etl »

I need to store the result from oracle enterprise stage which always returns single value into a parameter. I have to use this parameter in other jobs.
Any help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Run in a separate job, store the result in a file or in the job's user status area. Pick that up in the job sequence and feed its value to your job parameter in the Job activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post by laxmi_etl »

ray.wurlod wrote:Run in a separate job, store the result in a file or in the job's user status area. Pick that up in the job sequence and feed its value to your job parameter in the Job activity.

How to pick up the result from the file and pass it to next job in the sequence?. Do we need to use any special activity stage to store result from file created?.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Hi

Create a parm file and when you schedule your job thru script call this parm file with other parameters in the dsjob command.

A good discussion is available in this forum and a script is also available. Either do a search on DSGuru2B or Parm file.

Thanks
Sam
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post by laxmi_etl »

ray.wurlod wrote:Run in a separate job, store the result in a file or in the job's user status area. Pick that up in the job sequence and feed its value to your job parameter in the Job activity.
Ray,
Can you tell me how to store the value in user status area?. What stage to use for that?. We are using parallel edition.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a BASIC Transformer stage (the overhead for one row can be ignored) and use the DSSetUserStatus() function in a constraint or derivation expression. Search the forum for examples.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post by laxmi_etl »

ray.wurlod wrote:Use a BASIC Transformer stage (the overhead for one row can be ignored) and use the DSSetUserStatus() function in a constraint or derivation expression. Search the forum for examples.
We do not have BASIC Transformer stage . We have regular Transformer stage and it is not accepting any DSSetUserStatus() function. Is there anyway to do this with regular Transformer stage ?.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You DO have BASIC Transformer stage.

It's in the Stage Types branch of your Repository.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply