I have an application that executes a shell within which calls an ETL Datastage. When the app runs the job fails in the ETL calls,but if I executes the shell directly in the server, with the same user used in the app, the shell runs succesfully.
Other thing, this shell is generic, and is used in other servers and app in CAWA without problems.
Anyone has any idea why could be happening this and how could i fix it?
Thanks a lot!
Has this job ever worked through CA Workload Automation?If not then i would think that there is a difference in the environment.
Add a "set" command to the script and redirect the output to a file. Run it from the command line then though CA WA and check for differences.
I completely agree with Rick's comment. FYI...if this is a UNIX box use a env command at the top of the script. The output can be compared between when a person does it and when it is run through the scheduler. I usually redirect the output to a file location. Something like.....
set > c:\temp\tempfile.txt
env > /opt/path/tempfile.txt
One other big difference is related to the environment:
When the user is initiating the script they are probably in the script directory. Relative paths will be found based on where the user initiated it. When the agent kicks it off it is started by default in the agent's home directory. It may not be able to find a dll or some other file because those files are not in the agent's home directory.
There are ways around this......I am not sure what master you are using. The universal solution is to add a line to the top of the script to cd to the location of the script.