Special Return Code from a Server Job to a Sequence

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
lagrangeusa
Participant
Posts: 11
Joined: Mon Jul 11, 2005 11:58 am
Location: Chicago, Illinois, USA
Contact:

Special Return Code from a Server Job to a Sequence

Post by lagrangeusa »

Greetings,

I have a server job that takes a source moves it through a transformer stage to perform 2 lookups to a hash files then writes it to a source. Simple. This is called from a job sequence.

Within this server job, I have placed a 2 sequential files under the transformer stage to catch any records that were not found within the lookup of the hash files for audit purposes. These sequential files may or may not have any rows in them depending on the lookups performed. If the lookups cannot be found, we are providing default values in order to continue processing.

I would like to notify the business users that we have a data integrity problem (the lookup keys could not be found), so I was hoping that after returning to control back to the job sequence from which the server process was called that I could generate an email notification and attach the file(s) that had the sequential file information.

I think this can be done, but I am at a loss to make it happen. Has anyone done this and can provide an example? Basically, I think that before the server job finishes, a routine or ????? would have to check for the existance on the sequential audit files and if they found 1 or 2 of them to generate a return code (possibly mutilple if I have more than 1 audit file).

I have searched the dsxchange for some notes about this, but I may not be asking the question in the correct context.

Thanks
Dean
La Grange Group
IBM/Ascential Business Partners
COGNOS Business Partners
Bill Inmon Certified Data Warehouse Architects

8770 W Bryn Mahr, Suite 1300
Chicago, Illinois 60631
773.867.8005
www.lggusa.com
wnogalski
Charter Member
Charter Member
Posts: 54
Joined: Thu Jan 06, 2005 10:49 am
Location: Warsaw

Post by wnogalski »

Set the link as Reject link - the job will finish with warnings when the lookup is not found. Then in the sequence simply add a link for "Warning", link it to Notification Activity, and from the notification activity to seqencer that will wait for any link - the other link will be a link from your job but for status "OK".
Regards,
Wojciech Nogalski
Post Reply