Passing an output content created in parllJob to its seqJob

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
bj_ds7
Premium Member
Premium Member
Posts: 32
Joined: Fri Dec 13, 2013 2:26 pm

Passing an output content created in parllJob to its seqJob

Post by bj_ds7 »

Hi All ,In datastage is it possible to store a output record content created in parallel job level in the form of variable and parses it to sequence level ? I am able to do this by the storing o/p in a file and then parsing this value after reading it using excute command activity sequence job .Is there any inbuilt function which datastage is able to do the same. ?
Thanks & Regards!
BJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Only via a Server job and USERSTATUS. Does your job that creates this 'output record content' really need to be a Parallel job?
-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 »

Or you may be able to accomplish that in a Parallel job by using a Server Shared Container for that USERSTATUS portion but I'd have to leave that to others to confirm / deny...
-craig

"You can never have too many knives" -- Logan Nine Fingers
bj_ds7
Premium Member
Premium Member
Posts: 32
Joined: Fri Dec 13, 2013 2:26 pm

Post by bj_ds7 »

Thanks for the response.The idea,for each time when this job run its creates a sequence number referred as run id , so that it can tied up with all records inserted that time.This run id value (output content ) should be parsed to next attached jobs ,and this runid value be stored as a variable ,instead of referring it from a table where the records are inserted.
Thanks & Regards!
BJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Server job. USERSTATUS. Pass as a Job Parameter to all downstream jobs that need it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
bj_ds7
Premium Member
Premium Member
Posts: 32
Joined: Fri Dec 13, 2013 2:26 pm

Post by bj_ds7 »

Thanks for response, I tried search for dsuserstatus in the routine list through basic transformer , i guess its missing in my client :? .Could you pls let me me know where I can find that .? or should we create a custom routine instead ?
Thanks & Regards!
BJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to look for DSSetUserStatus and provide a wrapper for it as noted in this post as one example. There are many. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
bj_ds7
Premium Member
Premium Member
Posts: 32
Joined: Fri Dec 13, 2013 2:26 pm

Post by bj_ds7 »

Thanks Craig ! ! It worked :)
Thanks & Regards!
BJ
bj_ds7
Premium Member
Premium Member
Posts: 32
Joined: Fri Dec 13, 2013 2:26 pm

Post by bj_ds7 »

Craig, One more query regarding this- I dont if this a stupid one. :roll: Will it creates any issue when we run this particular job as a multiple instance ? Like userstatus created by one instance may override the userstatus of the value created by another,when many instance are running simultaneously ?
Thanks & Regards!
BJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's a perfectly valid question! I'm going to take a guess as I don't remember ever actually testing that in my time with DataStage. I believe that since there still is only one job under the covers and one job log that you basically get 'views' into to see the instance logs, the answer will be that yes it would be a problem and what you'll find in USERSTATUS would be the value from the most recent instance.

Perhaps someone will chime in with a definitive answer. In the meantime it shouldn't be hard to build a simple test, try it out yourself.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

UserStatus area is separate for each instance. In general it won't be a problem.

Because of how and where it's stored, you should in general avoid storing dynamic arrays in the User Status area of multi-instance jobs. This is the only way I know to break the mechanism.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Good to know. I could see either answer being true, thanks for the clarification. I wonder if an instance's USERSTATUS value is lost when the log records for its run get purged? Compiling a job clears them all, FYI.
-craig

"You can never have too many knives" -- Logan Nine Fingers
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

chulett wrote:Or you may be able to accomplish that in a Parallel job by using a Server Shared Container for that USERSTATUS portion but I'd have to leave that to others to confirm / deny...
No. This won't work. It is currently impossible to manipulate the Userstatus-variable from within parallel-jobs.

The behaviour of many Basic-routines is quite strange when used from within a parallel-job. DSWarn will produce a warning in the job-log, for example, but the job will finish successfully, anyhow. The engine simply ignores user-generated warnings.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
bj_ds7
Premium Member
Premium Member
Posts: 32
Joined: Fri Dec 13, 2013 2:26 pm

Post by bj_ds7 »

Thank you all ! I tested the above multiple instance scenario(using server job) with different test scenarios.Its working perfectly fine. :)
Thanks & Regards!
BJ
Post Reply