XCOMN0302E - Linux to Windows retrieve file with wildcard & NAS/UNC path
search cancel

XCOMN0302E - Linux to Windows retrieve file with wildcard & NAS/UNC path

book

Article ID: 225364

calendar_today

Updated On:

Products

XCOM Data Transport XCOM Data Transport - Linux PC

Issue/Introduction

Trying to receive files from a Windows server to a Linux server using wildcards for REMOTE_FILE_RF and LOCAL_FILE_RF but it does not work. However, when specify the complete file name, it works.

The CNF file for wildcard transfer:
REMOTE_SYSTEM=remotewindows_server
PROTOCOL=TCPIP
PORT=8044
QUEUE=NO
LRECL=600
DOMAIN=<USER_DOMAIN>
CODE_FLAG=BINARY
USERID=<USER_ACCOUNT>
PASSWORD=**********
FILE_OPTION_RF=REPLACE
REMOTE_FILE_RF=//flsy01/g_insto_equities_sy$/imagine/batch/temp/R*
LOCAL_FILE_RF=/imagine/UCR/*

Error received for the transfer:
$ xcomtcp -c4 -f wildcard.conf
2021/09/28 10:45:38 TID=086212 [\imagine\UCR* <-- //flsy01/g_insto_equities_sy$/imagine/batch/temp/R(*) at remotewindows_server]

    XCOMU0029I Locally initiated transfer started.

2021/09/28 10:45:39 TID=086212

    XCOMN0302E Unable to open local input file: Bad file descriptor


The CNF file for single/specific file transfer:
REMOTE_SYSTEM=remotewindows_server
PROTOCOL=TCPIP
PORT=8044
QUEUE=NO
LRECL=600
DOMAIN=<USER_DOMAIN>
CODE_FLAG=BINARY
USERID=<USER_ACCOUNT>
PASSWORD=**********
FILE_OPTION_RF=REPLACE
REMOTE_FILE_RF=//flsy01/g_insto_equities_sy$/imagine/batch/temp/R1
LOCAL_FILE_RF=/imagine/UCR/R1

$  xcomtcp -c4 -f r1.conf
2021/09/28 18:01:06 TID=086215 [/imagine/UCR/R1 <-- //flsy01/g_insto_equities_sy$/imagine/batch/temp/R1 at remotewindows_server]

    XCOMU0029I Locally initiated transfer started.

 
2021/09/28 18:01:08 TID=086215

    XCOMU0011I Transfer ended; 6 blocks (5265 bytes) transmitted in 2 seconds (2632 bytes/second)


It appears when using wildcard, the LOCAL_FILE_RF is making XCOM think it is pulling a file from NAS to the Local Windows server at /imagine/UCR/* which does not exist on the Windows server and hence errors out with: XCOMN0302E Unable to open local input file: Bad file descriptor

How can the wildcard be made to work with NAS?

Environment

Release : 11.6

Component : CA XCOM Data Transport for Linux PC

Resolution

1. XCOM Engineering and Support ran successful tests used this syntax with backslash(es) prefacing the NAS server name and also used as the directory separator, which is standard UNC path syntax (https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths) i.e.
REMOTE_FILE_RF=\\file_server\temp\R*
That is different to the above which is using a forward slash syntax:
REMOTE_FILE_RF=//flsy01/g_insto_equities_sy$/imagine/batch/temp/R1

2. Support tested the forward slash syntax.
a. Using it for a single file:
REMOTE_FILE_RF=//file_server/temp/R1
LOCAL_FILE_RF=/tmp/UCR/R1
The result is successful.
b. Using it with the wildcard syntax:
REMOTE_FILE_RF=//file_server/temp/R*
LOCAL_FILE_RF=/tmp/UCR/*
The result is the same XCOM error message code XCOMN0302E as reported but with a slightly different message for the final part:
XCOMN0302E Unable to open local input file: Invalid argument

So although the forward slash syntax works for a single file it does not work when using a wildcard and the standard UNC backslash(es) syntax needs to be used.