I have a UNIX job that does the following;
1. Create a script input file with echo commands.
2. Execute an Oracle SQR program that reads the script input file.
3. Remove the script file.
It has come to my attention that if the Oracle SQR program finishes gracefully but with a bad return code, I'm failing to trap the return code because Automic is only checking the return code from step 3.
What would be the best way to make Automic check the return code from step 2, but not until after step 3 has finished?