Using an XCOM proxy server setup:
When using CODE=EBCDIC on Mainframe the character vertical bar/pipe in the file gets translated on destination Windows server to character n with a tilde i.e. ñ
When trying to use UNICODE i.e. using CODE=UTF8 on Mainframe it receives error:XCOMU0298E COMMAND FAILED, RC=222
The AIX xcom.log shows:ERROR: In CODE_FLAG, expecting a valid enumeration value, but found '8'. Check for possible misspelling
XCOM™ Data Transport® for z/OS
XCOM™ Data Transport® for UNIX/Linux PC
XCOM™ Data Transport® for Windows
Using CODE=UTF8 should translate internally to a code_flag value of '8' on the AIX side for the first Mainframe to AIX file transfer.
The "COMMAND FAILED" and CODE_FLAG errors are related to the code used in the xcompp.pl script for the 2nd transfer. The user added code is processing the code_flag from the 1st transfer i.e. received values of 'A', 'B', 'E', are respectively converted to 'ASCII', 'BINARY', 'EBCDIC' for use on the 2nd transfer:
So currently a value of '8' is not being handled and an extra line of code needs to be added to do that and convert it to 'UTF8'
The post-processing script was corrected to handle the value of '8' and CODE=UTF8 was then used for both transfers.
That resolved the vertical bar/pipe mistranslation problem.
Related article: XCOM transfer from z/OS to Windows vertical bar/pipe gets translated to ñ