Hello,
Can anyone please tell me if it is possible to get a return code back from a wrapped UNIX command?
Consider the example stage from the Parallel Job Advanced Developer's Guide. This stage is a wrapper around the sort command. Sort returns either 0, 1, or a larger positive value (indicating an error). How can I get access to this value in DataStage so that I can be aware of and handle any error that occured?
The documentation did not seem to indicate if this is possible. I suppose I could customize my code so that a return code is sent to stdout or stderr and then map the stream to an output link - but is there a better solution?
TIA,
tpb
Return Code from Wrapped Parallel Stage
Moderators: chulett, rschirm, roy
Figued this one out.
Well, sort of. There are fields on the "Environment" tab that allow you to specify how different return codes are handled. It appears that the return code must be of integer type.
However, I still can't figure out how to differentiate behavior for various error codes - i.e. if return = 1, take this action, if return = 2, take this action, etc.
Any suggestions?
Well, sort of. There are fields on the "Environment" tab that allow you to specify how different return codes are handled. It appears that the return code must be of integer type.
However, I still can't figure out how to differentiate behavior for various error codes - i.e. if return = 1, take this action, if return = 2, take this action, etc.
Any suggestions?