Would it be possible to have the 'xcomtcp' command issue a RC so that its caller was informed about the outcome of the transfer?
This would allow the utility to be run by a job scheduling solution like Control/M with conditional processing depending on the success or failure of the transfer.
Release : 11.6
Component : XCOM Data Transport for Linux PC
This can be done as far as xcomtcp utility is passed parameter QUEUE=NO. This parameter causes the utility itself to process the transfer request, opposite to parameter QUEUE=YES, which only posts the request to the XCOM queue so that the 'xcomd' daemon runs it
Program xcomtcp always issues a RC to its caller. This RC depends on the value specified by QUEUE parameter.
When running with QUEUE=NO, the RC from xcomtcp reflects the outcome of the transfer itself, so that:
- RC 0 means successful execution of the transfer.
- Nonzero RC means an unsuccessful transfer
A nonzero RC from xcomtcp is derived from the message number that caused the transfer to fail. Since the rc returned by xcomtcp is limited to a single byte, the RC returned equals the message number modulo 256.
Note that when xcomtcp runs with QUEUE=YES, the rc issued by xcomtcp only reflects the successful queuing of the transfer, but not its execution, which means that it cannot be used for this purpose.