"XCOMN0416E Error writing output file: Invalid argument" for 1st file sent to Windows file share
search cancel

"XCOMN0416E Error writing output file: Invalid argument" for 1st file sent to Windows file share

book

Article ID: 233761

calendar_today

Updated On:

Products

XCOM Data Transport - z/OS XCOM Data Transport - Windows XCOM Data Transport

Issue/Introduction

XCOM Production environment z/OS to Windows transfer where remote file is located on UNC/NAS file share.
It failed once for the first file transferred with: XCOMN0416E Error writing output file: Invalid argument

All subsequent files in the same job transferred successfully and the first file that failed was also later transferred successfully.
This error has only occurred the one time.

Environment

Release : 11.6

Component : XCOM Data Transport for Windows

Resolution

The xcom.log shows that after the TID=615031 for the failed transfer is initiated there are no references to it for over 7.5 minutes until it fails and there are no other transfer requests from the same z/OS IP during that time. After the TID=615031 fails with "XCOMN0416E Error writing output file: Invalid argument" the next transfer TID 615093 from the same z/OS IP was then successful:
===
2022/01/22 03:04:27 TID=REMOTE PRG=xcomtcp PID=38936 IP=nnn.nnn.nnn.nnn:53378
    XCOMN0812I Remote Secure TCP/IP Connection Requested.

2022/01/22 03:04:30 TID=615031 [AAA.BBB.CCC.DDD1 at nnn.nnn.nnn.nnn:53383 --> \SERVER\SHARE_NAME\DIRECTORY_NAME\FILE_NAME1]
    XCOMN0026I Remotely initiated first try.
...
...
2022/01/22 03:12:06 TID=615031 PRG=xcomtcp PID=38936 IP=nnn.nnn.nnn.nnn:53378
    XCOMN0818I Secure TCP/IP Connection Ended.

2022/01/22 03:12:06 TID=615031
    XCOMN0416E Error writing output file: Invalid argument

2022/01/22 03:12:06 TID=REMOTE PRG=xcomtcp PID=21084 IP=nnn.nnn.nnn.nnn:53383
    XCOMN0812I Remote Secure TCP/IP Connection Requested.

2022/01/22 03:12:09 TID=615093 [AAA.BBB.CCC.DDD2 at nnn.nnn.nnn.nnn:53383 --> \SERVER\SHARE_NAME\DIRECTORY_NAME\FILE_NAME2]
    XCOMN0026I Remotely initiated first try.

2022/01/22 03:12:11 TID=615093 PRG=xcomtcp PID=21084 IP=nnn.nnn.nnn.nnn:53383
    XCOMN0818I Secure TCP/IP Connection Ended.

2022/01/22 03:12:11 TID=615093
    XCOMN0011I Transfer ended; 16982 records (1035904 bytes) transmitted in 3 seconds (345301 bytes/second) 
===

XCOM Engineering's initial interpretation was that after a successful connection to the XCOM for Windows server the "XCOMN0416E Error writing output file: Invalid argument" message was caused by some problem with that server's connection to the file server. They ran an in-house test targeting a UNC file share and were able to create the same error by deliberately breaking that connection.
From XCOM’s point of view it logs into the file server, uses fwrite() to write the file and then logs out of the file server after the transfer. In this scenario fwrite() has returned errno 22 ("Invalid argument") because its operation failed due to the broken connection (MS C runtime library > errno constants).
So in summary this problem is not directly related to XCOM itself and rather is related to the Windows server connection to the file server failing which could of course be caused by many things e.g. network failure or the file server rebooting etc.
This failure seems to have been a one-off but to investigate it or any future occurrences further, Engineering has advised to log a support call with Microsoft.