The script runs with no errors when submitted directly on Unix, but when sent to CA XCOM for Unix specifying FILETYPE=JOB, it fails with script errors.
With scripts, it is sometimes necessary for you to set up the environment within the script to have it work properly. This does not indicate a problem or bug. Since XCOM or XCOMTCP is submitting the script for you, the environment that the script is running in will not be the same one as if you submitted it yourself.
XCOM processes jobs under the root userid and use the effective userid (the userid coming in from the remote system or the one taken from the XCOM.GLB file) for its access permissions.
The system() function calls XCOM uses to submit the script use seteuid and setegid.
You may need to issue a su - userid or other statements to set up the environment in your job or script.
To debug a script, you may insert debugging statements such as those shown in the sample xcompp script, un-commenting them and making changes as necessary to be able to determine the environment the script is running in. Then use this information to add SET commands to your script to set the variables that are needed for your environment.
To see the debugging statements refer to page 95 Troubleshooting of the CA XCOM Data Transport for UNIX and Linux Release 11.6 Second Edition or the sample script installed with the product. These are the debugging statements in the pre and post processing scripts, but they may be inserted in your scripts also.