I'm trying to use Unix shell script to call datastage job
Background:
I have a sequence job that contains a Sequential File,Transformer ,ODBC stage,lookup stage .It simply loads data from txt file to a table.
Here datastage job loads multiple input files using loop in unix scripts
i.e it takes first file ,processes it and then picks second file.
but prob here is lets say while processing first file if it has rejects,job finishes with warning ,and unix scripts returns different error code.and because of this error code returned,it dosent picks second file ,so where should I make changes?in order unix script should handle error code and should pick up next file
in unix script to handle error code?
If yes what are error code that needs to be placed in unix script
Or change in data stage job Sequencer job to set status to success even if it has warnings?
Unix shell script to call datastage job error
Moderators: chulett, rschirm, roy
at present I jave code wirtten as
And I'm thinking to change it as
Code: Select all
if [ $stat -ne 0]
then
errmsg="Error while running Datastage process"
ksh $erremailshell $feedname $jobname "${errmsg}"
exit 1
Code: Select all
if [ $stat = 1] OR [ $stat = 2]
then
errmsg="Job completed successfully"
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore