The point is to check and compare all environment variables during the script execution. Add a line in the script using the set or env commands output to a file. On AIX set always gives more output than env. Run the script from the command line and also from the DataStage job. Add to script:
Does your script execute any command whos standard out will be scraped?
Check your COLUMNS setting. I saw that the default COLUMNS setting was that of the shell window setting when the engine was last bounced. It was a small window, so 80 columns was the setting. Messed up a few scripts that anticipated having more.
When tested outside of DataStage, the tester maxed his window so the command worked great.