columns of 1st sequencer to parameters in next linked seq.

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
unicorn
Participant
Posts: 3
Joined: Mon Aug 06, 2012 9:24 am
Location: India

columns of 1st sequencer to parameters in next linked seq.

Post by unicorn »

Can i pass 2 or more column values from a database stage inside one sequencer to assign 2 or more respective parameters in the next linked sequencer for a Sequence Job.
Ashish
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm not sure about the terminology here, since Job sequences don't have columns. Do you mean a sequence calling job or perhaps a job that you want to have call a sequence?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm thinking they mean having a job that is being run by a Sequence pass its output as parameters to a downstream job. If that what is meant then yes, there are ways to accomplish that. Server jobs can leverage the USERSTATUS area and the Sequence can automatically take information from there and pass it to a parameter. Do an exact search here for DSSetUserStatus for several examples of that. Only issue there is it can only pass a single value so if multiple values need to be passed, the common trick is to put them in a delimited string and then parse out the individual components, which thankfully can be done directly in the parameter assignment via the Field() function.

Trying to recall if Parallel jobs can do the same thing and thinking they can't. Worst case, any job can write data to an external source (like a flat file) and then have an intermediate step in the Sequence that captures that information. The downstream job can be passed parameter values from the output of that intermediate step. And that step can be as simple as an Execute Command stage that does a 'cat' of the file to a custom built BASIC routine called by a Routine Activity stage if more control over the retreival process is needed.
Last edited by chulett on Tue Aug 07, 2012 12:04 pm, edited 2 times in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
unicorn
Participant
Posts: 3
Joined: Mon Aug 06, 2012 9:24 am
Location: India

Post by unicorn »

There is a Sequence job containing two job activity for two parallel jobs. In the first parallel job, there is a database stage which results in say 3 columns. I want that 3 columns to be the value of the 3 parameters(3 parameters because of 3 coulumns ) of the second job activity in the sequence job.
Ashish
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Which I've explained how to do. Give it a shot!
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I should add that parameter value files give you another mechanism to solve this problem. The first job could also write those three values to the 'value file' that the parameters could be set to read from, which would make the second step pretty much automatic. I believe in that case the Job Activity stage would need to be 'set to default'?

Other ideas welcome!
-craig

"You can never have too many knives" -- Logan Nine Fingers
unicorn
Participant
Posts: 3
Joined: Mon Aug 06, 2012 9:24 am
Location: India

Post by unicorn »

How parameters can read from the value file (resulted sequential file in the first job containing 3 values).Is there any particular path where i need to store the value file.
And I'm not able to see any option in the parameters tab to read the record from any file.

Regards
Ashish
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's an option for Parameter Sets. Read about them in the Designer Client Guide pdf, Chapter 5, 'Creating a Parameter Set' section. It is also mentioned in the Parallel Job Tutorial pdf and probably other places as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply