How to run command line or batch file IND$FILE file transfers with Reflection Desktop

  • 7024724
  • 10-Jul-2020
  • 23-Jul-2020


Reflection Desktop (including Pro, and for IBM) 16.2 and higher


This technical article explains how to run a command line or batch file IND$FILE file transfer with Reflection Desktop and supplements the information which is provided at


Here is how to run a command line or a batch file to perform an IND$FILE transfer in Reflection Desktop:

1.    To run the IND$FILE transfer from a command line or batch file with TSO, the Host session needs to be logged into the TSO subsystem and be at a Ready prompt or at the ISPF menu option 6.  These are the typical locations a user needs to be at for running any TSO IND$FILE file transfer.

2.    The Reflection Desktop file transfer interface needs to be configured for the IND$FILE file transfer type you are using. The default in Reflection Desktop is CMS and so if using TSO, the type will need to be changed to TSO within the Host session and the *.RD3X file will need to be saved to make sure the values will be used when run from a batch file.  In the open Host session do the following:

            a)    Select the Session menu.
            b)    Select File Transfer.
            c)    Note under the Host section on the right that the value is set for CMS.
            d)    Click on the “Settings…” button.
            e)    Select Mainframe.
            f)    Select TSO.
            g)    Press OK.
            h)    Under the Transfer method dropdown select “ASCII”.
            i)    Click the X in the upper right corner.
            j)    Save the RD3X file from the File / Save As menu option.

3.    The RECEIVE command to perform the IND$FILE transfer will need to include the appropriate HLLAPI shortname for the Host session where the file transfer is to be run.  The HLLAPI shortname is displayed in the Host session to the far right of the Operator Information Area (OIA line) at the bottom of the Host session. The short name is a single letter from A-to-Z and starts with an automatic assignment to the letter “A”.  The letters are assigned based on the order the Host sessions are opened.  Thus the first Host session opened will get the letter “A” and subsequent session will get “B”, then “C”, etc.  Opening host sessions in a different order will assign the HLLAPI shortname in a different order.

        Reflection includes two other methods of assigning HLLAPI shortnames to Host sessions.  One is under the “Configure Advanced Connection Settings” and the other is by running a file named “shortnamemapper.exe” which is found in the C:\Program Files (x86)\Micro Focus\Reflection folder.  With both of these configuration options, HLLAPI shortnames can be assigned to specific sessions, but these will be overwritten by the order in which the Host sessions are opened.

        If the user with the batch file is using multiple Host sessions, which get opened in a different order each time, then it might be necessary to modify the batch file used to prompt the user for the HLLAPI shortname at runtime.  An alternative option would be to create a VBA macro to run the file transfer, allowing the user to select the file and Host session being used and avoid using the HLLAPI shortname complication.

Additional Information

Here is a sample batch file which uploads a file called "testfile.txt" to TSO and then downloads the same file:


This batch file assumes that the Reflection Desktop program files folder is in the Windows Path, that the batch file and the file to be uploaded are both in the same folder, and the HLLAPI shortname for the Host session is "A".

Feedback service temporarily unavailable. For content questions or problems, please contact Support.