All Forums Tools
k.anandmurali 1 post Joined 11/13
05 Nov 2013
How to pass return code of a mload to shell script

Hi All,
I am bit new to teradata. I have invoked a mload from UNIX and want to get the return code of the MLOAD to shell script to perform next operation. can any one help me out on this on how to get the same?
I serached the forum and found few but those werent working on.

veehell 19 posts Joined 07/12
06 Nov 2013

Any command executed on shell will lead to $? to be filled with exit status of the last command. After you can test it and branch it, in your envelope script ... for example like this ...
mload < my_mload_script
if [[ $? -eq 0 ]]
then echo "mload script ended with error"
# catch the signal/trap or/and exit nicely
else echo "mload script ended succesfully"
#some other commands 


You must sign in to leave a comment.