Question: I have been trying to execute a DOS Batch file using XCOM and I can't seem to make it work.
TYPE=SEND DROPSESS=NO LU=SD01 CKPT=0 USERID=xxxxxx PASSWORD=xxxxxxx FILETYPE=JOB FILE=\\<NT WorkStation>\<shared folder>\<path>\<bat file>
and I got this error, XCOMN0288E SYSTEM FUNCTION FAILED
I appreciate any help you can give me.
Thanks and Best Regards,
Answer: You can't use the FILE parameter when you have TYPE=SEND and FILETYPE=JOB. You need to instead use the LFILE= parameter to specify the file on your system that you are sending to execute on the remote system. The way that you do this in order to execute a specific batch file on the remote system is to create a file on your system containing the following:
CALL \\<NT WorkStation>\<shared folder>\<path>\<bat file>
You then specify that file as the local file to be sent and executed as a batch file on the remote system. The CALL statement is used by PC based operating systems that understand batch files to execute one batch file from within another batch file.
This article written by Stephen Chapman, Felgall Pty Ltd.