Redbrick bulk loader

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
jan_moolman
Participant
Posts: 6
Joined: Thu Apr 04, 2002 4:36 am
Location: South Africa

Redbrick bulk loader

Post by jan_moolman »

Hi
Does anybody have an idea on how to pass error messages back to the data stage bulk loader job?
The idea is to stop data stage from continuing with other jobs until the job has completed successfully. There must be a setting you set in redbrick that will allow the error message to be passed back to the session that is currently open.


If any body has worked with this please help?




Jan Moolman
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

rb_tmu is a well-formed executable, so its error output is on stderr which you can redirect where you will.
The Red Brick bulk loader stage (if you set it to automatic) will execute rb_tmu with file names, etc., as specified in the link properties.
Because rb_tmu (or rb_ptmu) is optimized for speed (especially if you are using optimized loading specified in rbw.config), you do not get row-by-row reporting. Instead, a log file is maintained and a discards file is maintained. In fact, more than one discards file may be maintained, you can have a separate one for duplicates, results for which will not be complete until the load is finished.
Therefore, there is no "real time" mechanism for providing feedback into the DataStage job.
What you need to do is to create a before/after subroutine that checks the existence/size of the log and discards files, and makes a decision about whether continue on this basis. Or you could do it in job control code or in a sequence.
Note that, if you set the "Load Automatically" property to "N", then none of the above applies; DataStage merely creates the files needed by rb_tmu but does not execute it.
Post Reply