XCOM for z/OS parameters:
**********
TYPE=SEND /* OPERATION = SEND
IPNAME=REMOTE_HOSTNAME
USERID=USER1
PASSWORD=XXXXXXXXXXX
FILETYPE=JOB /* A JOB IS BEING SENT
LFILE=AAAA.BBBB.TEST1
FILE='\\server_name\test\test1.bat'
RECSEP=NO /* RECORD SEPARATOR
CODE=EBCDIC /* EBCDIC,BINARY OR ASCII
TRUNCATE=NO /* NO TRUNCATION WILL BE
COMPRESS=RLE /* COMPRESSION TECHNIQUE
PACK=LENGTH /* REQUIRED FOR TCP/IP
CKPT=0 /* CHECKPOINT FREQUENCY
RNOTIFY=LOG
**********
The data set member AAAA.BBBB.TEST1 contains a single line:ren testfile.txt testfile.bak
The XCOM for Windows trace file showed:
LOGGED >>> 2024/04/29 11:54:13 TID=000061 [AAAA.BBBB.XCOMJOB at ##.##.#.#:7192 --> job]; XCOMN0026I Remotely initiated first try.;Mon Apr 29 11:54:14 2024
LOGGED >>> 2024/04/29 11:54:14 TID=000061 PRG=xcomtcp PID=7416 IP=##.##.#.#:7192; XCOMN0818I Secure TCP/IP Connection Ended.;
LOGGED >>> 2024/04/29 11:54:14 TID=000061; XCOMN0288E System function failed, RC=1;
For FILETYPE=JOB, the parameter FILE= is not used. That parameter only applies to FILETYPE=FILE and for FILETYPE=JOB the parameter will be ignored.
So although FILE='\\server_name\test\test1.bat', no SEND JOB test1.bat file will be created in the directory '\\server_name\test'.
The SEND JOB will transmit the content of LFILE=AAAA.BBBB.TEST1 to the Windows system and execute it in a CMD.EXE window.
To resolve the problem edit AAAA.BBBB.TEST1 and for the first line add a 'cd' command for the directory where the target file testfile.txt is located i.e.cd \\server_name\testren testfile.txt testfile.bak