Pass Generated Value to After-job Subroutine

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Pass Generated Value to After-job Subroutine

Post by davidnemirovsky »

I have a job that generates a value in a transformer stage. I need to pass that value to an after-job subroutine. The routine takes a pipe '|' delimited string, parses it and runs another routine that updates a flat file and performs some other tasks.

What is a neat way to accomplish this?
Cheers,
Dave Nemirovsky
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Lots of neat ways but they all boil down to pretty much the same thing; park it on disk. Another output link writing to a text file or a hashed file.

The job's user status area isn't in memory, it's a field in one of the run time hashed files in the Repository. So any "neat" solution using the user status area is still parking it on disk.

You could, if you wanted to, search for STAGECOM.ARR in the forum and figure out how this relates to the columns on input and output links. This approach carries the danger that it may change at some point in the future. However, your Transformer stage and your after job subroutine execute in separate processes, so even variables in COMMON aren't available to you. By the time you're in the after-job subroutine, all references to the variables in the Transformer stage, including the array STAGECOM.ARR, have been destroyed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

Looks like I'll be parking it on disk then!

Thanks Ray.
Cheers,
Dave Nemirovsky
Post Reply