I am retrieving the link info from the multiple instance job.
Code in UNIX script is as follows
Code: Select all
dsjob -linkinfo $DSproject $DSjob.$parmTypCd$dtTypCd $DSTransform $DSLink>$linkInfoFile 2>&1
rc=$?
if (($rc != 0))
then
cat $linkInfoFile
rm $linkInfoFile
print ABORT WITH RC = $rc
exit $rc
fi
grep 'Link Row Count' $linkInfoFile|awk '{print $5}'>$cntFile
linkCnt=$(cat $cntFile)
print $DSLink link count:
print $linkCnt
It works OK when the invocation ID is one of the valid 24 values that the job was executed with.
Now I tried the value that is invalid(the ID that this job was never executed under) expecting to get an error.
Problem is I got none.
The content of the linkInfoFile is
Return code of dsjob is 0.Status code = 0
Link Row Count : 0
Link Last Error : <none>
Link DBMS Code : not available
SQL State : not available
Link Name : ClaimsUnld
Apparently I am not able to recognize within the script that I am trying to get link info from none existing instance.
Any idea?
Thanks