XCOM transfer to Windows and redirecting remote file to different destination
search cancel

XCOM transfer to Windows and redirecting remote file to different destination

book

Article ID: 412674

calendar_today

Updated On:

Products

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

Issue/Introduction

XCOM for z/OS to XCOM for Windows transfer using a file server share for the destination remote file.

The jobs are currently being sent to FILESRV1 with remote file name: \\FILESRV1\...
The file server has changed to FILESRV2 and we want to be able to automatically redirect the file to FILESRV2 without having to change the z/OS JCL jobs.
How can this be done?

Environment

XCOM™ Data Transport® for Windows
XCOM™ Data Transport® for z/OS
XCOM™ Data Transport® for UNIX/Linux

Resolution

The XPRECMD (Use the Preallocation Script) was used to modify the destination file name i.e. modify the file server name from FILESRV1 to FILESRV2 before the file transfer is processed.

Detailed steps:

  1. In the default supplied Xcompre.bat script all example lines below "rem  Carriage Control Characters flag" should be removed and these lines added:
    *****
    echo %file% >> c:\temp\test\xcompre_trace.txt
    set "file=%file:FILESRV1=FILESRV2%"
    echo %file% >> c:\temp\test\xcompre_trace.txt
    %xcomqm% -p%local_reqno% LOCAL_FILE=%file%
    exit
    *****
    NOTES: 
    On the receiving Windows server in the Xcompre.bat script it is the incoming variable %file% which represents the remote file name. Therefore that variable value is updated and then in turn used for the XCOM LOCAL_FILE parameter.
    (The lines which echo the value of %file% to file xcompre_trace.txt are optional for testing purposes)

  2. Change the XPRECMD line in xcom.glb file from no value to:
    XPRECMD=%XCOM_HOME%\Xcompre.bat


After restart of the xcomd service subsequent transfers created the file under the required \\FILESRV2\...