How to capture shell script error in DS parallel jobs

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
ds_team
Participant
Posts: 48
Joined: Sun Dec 03, 2006 12:18 am

How to capture shell script error in DS parallel jobs

Post by ds_team »

Hi,

I am using a shell script to ftp a flat file from first machine to second machine. Then I am using the ftpped flat file from second machine through sequential stage to load data into database table by creating a parallel job. My query is that if the ftp shell script encounteres any error during ftp of data from one machine to another machine, then my job should abort. Can anyone tell me how I can achieve this scenario? Please note that I can not use ftp stage for this purpose because if I do so, some special characters specific to my application are getting missed out.This is the reason for using shell script to ftp data.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Job sequence.

Execute Command activity to execute your shell script. The exit status of the shell script is available as an activity variable that can be used to control a trigger that determines whether the Job activity is executed. Or whether some other processing takes place that handles the error situation.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply