XCOM is a file transfer tool to transfer file from mainframe to Unix/Window server or between server to server. To use XCOM in mainframe, you need to have a special RACF permission:
1) Read access to dataset (CAI.XCOM.**) for id XXXXXX
2) Define OMVS SEGMENT for XXXXXX
3) READ to EZB.NETACCESS.XXXX.TCPIP.XXXX CL(SERVAUTH) for id XXXXXX
If you do not define OMVS Segment to your id, you will get XCOMM0780E Txpi 224: gethostname error return value = 156 error, and you JCL job will ended with XFER XFERM1 - ENDED BY CC 0009.
If you do not have access to EZB.NETACCESS.XXXX.TCPIP.XXXX service, you’ll be ended with XCOMM0780E Txpi 211: Socket connect error return value = 111 error with the same JCL job abend code.
In order to transfer to a PC or server, you need to have XCOM agent or software to be installed in those target machines. The usual port that it used is 8044 for normal transfer and 8045 if using SSL for secured transfer. However XCOM port is configurable and you can use any of available port in your machine.
Example of XCOM JCL :
//XFERM01 EXEC XCOMSEND,XTYPE=EXECUTE
//SYSIN DD *