PreviousUsing Workgrouping Accessing Mainframe FilesNext"

Chapter 9: Uploading and Downloading Files

Use the MFA (Mainframe Access) Drag & Drop feature to transfer files between your PC and a mainframe.


You need to have read the chapter Start Here for the Tutorials and worked through the first session, Using Mainframe Express, before you do this session.

MFA Drag & Drop requires a separate Micro Focus Mainframe Access Server product running on the mainframe. Before running this session, check that your site is intending to use this product rather than some other method of uploading and downloading files. More information is supplied with the Mainframe Access product.


9.1 Overview

MFA Drag & Drop shows you two tree views alongside one another. One shows files and their locations on your PC, and the other shows data sets and their members on the mainframe. To copy a file from one machine to the other, you simply click the file's name in the one tree view and drag it across into the other tree view.

In this session you use MFA Drag & Drop to view files on your PC and on the mainframe, and to transfer files between the two. In this session you transfer a COBOL source file and a data file to the mainframe. You also transfer the same COBOL source file back to your PC.

In MFA Drag & Drop filenames generally appear in upper case on both the mainframe and your PC. In this chapter filenames on the PC are shown in lower case and filenames on the mainframe are shown in upper case. Filenames are not case-sensitive.

9.2 Preparation

You may be asked for the following information when you run the sample session. If in doubt, ask your system administrator.

Also check with your system administrator that the Communications module that Mainframe Express uses to communicate with the mainframe is installed, and that you have whatever access permissions you may need to allocate a PDS on your mainframe.

If you have closed Mainframe Express, open it as before. For this session, it does not matter whether any project is open. The session uses files in the folder \mfuser\projects\gsdemo\idedemo, which you used in the chapter Using Mainframe Express.

9.3 Sample Session

In this session you:

9.3.1 Contacting the Mainframe

To contact the mainframe:

  1. Click MFA Drag&Drop on the Tools menu.

    The MFA Drag & Drop window appears, and in front of it the Mainframe Access configuration dialog box. If you move the dialog box to one side, you'll see that the left hand pane of the window shows a list of the drives on your PC. The right-hand side is blank at the moment; it will show the mainframe data sets when the mainframe is contacted.

  2. In the dialog box, select TCP/IP or APPC under CCI Communication Type.

  3. Enter your user ID and password, and the name of the Standard Mainframe Access Server.

    Next, you need to enter in the Catalog Search Criteria field the criteria that you would use with TSO/ISPF 3.4 to enable you to see your own data sets. As with TSO/ISPF 3.4, you can use asterisks as wild cards. In the following steps, we use my-datasets to refer to the part of the data set names that is common to all your data sets.

  4. In the Catalog Search Criteria field, enter my-datasets*

    So, for example, if all your data sets begin with MFI01.MTS you enter: MFI01.MTS*

  5. Leave the remaining fields unchanged, and click OK.

    The dialog box closes and Mainframe Access establishes communication with the mainframe. Whenever you access the mainframe, there may be a short delay. Mainframe Access displays the message "Accessing mainframe, wait...".

    When communication is established, the right-hand pane lists data sets on the mainframe. Because you gave your usual search criteria, you should see your own data sets.

    In future, when you start Mainframe Access, you will find your user ID already set here, but will have to re-enter your password. The choice of TCP/IP or APPC, and the name of the Standard Mainframe Access Server, will remain set.

    You can change the catalog search criteria as necessary. Generally, you should specify the same criteria as you would when using TSO/ISPF 3.4.

9.3.2 Viewing Files on Your PC

You can use Mainframe Access to look at your files on your PC:

  1. In the left-hand pane, double-click the drive letter of the drive containing your \mfuser folder.

    This expands the tree view to show all folders on that drive.

  2. Similarly, double-click \mfuser, then projects, then gsdemo, then idedemo, then source.

    You can now see all the files and folders within the folder \mfuser\projects\gsdemo\idedemo\source. You can view a file by double-clicking it.

  3. For example, double-click vsamdemo.cbl.

    A window appears displaying the source of vsamdemo.cbl. You can drag its borders to make it wider.

  4. Close the source window.

9.3.3 Creating a Data Set

You can use Mainframe Access to create a data set on the mainframe. To create a partitioned data set:

  1. Click Partitioned dataset on the MFA Data Access Services Allocate menu.

    A dialog box appears for you to define the data set you want to create.

  2. Enter the following (leave the remaining fields unchanged):

    Dataset name my-datasets.DEMO.COBOL
    Quantity 1
    Directory blocks 1
    Logical record length 80
    Block size 6160

  3. Click OK.

    There is a short delay and then the right-hand pane is updated to show the new data set.

To create a sequential data set:

  1. Click Sequential dataset on the MFA Data Access Services Allocate menu.

    A dialog box appears for you to define the data set you want to create.

  2. Enter the following (leave the remaining fields unchanged):.

    Dataset name my-datasets.VSAMDEMO.INQUIRY.DATA
    Quantity 1
    Type VB
    Logical record length 534
    Block size  

  3. Click OK.

    There is a short delay and then the right-hand pane is updated to show the new data set.

9.3.4 Uploading a File

To upload a file means to copy it from your PC to the mainframe. You use MFA Drag & Drop to do this.

To upload vsamdemo.cbl:

  1. Click vsamdemo.cbl in the left-hand pane. Then, holding down the mouse button, drag it across and onto the name of the data set my-datasets.DEMO.COBOL.

    The mouse pointer changes to a document icon as you drag, and the data set name is highlighted when you have positioned the mouse pointer on it.

  2. Release the mouse pointer.

    Messages appear showing that vsamdemo.cbl is being copied to the mainframe

To upload salesinq.dat:

  1. Double-click data in the left-hand pane, so you can see all the files and folders within the folder \mfuser\projects\gsdemo\idedemo\data.

  2. Click salesinq.dat in the left-hand pane. Then, holding down the mouse button, drag it across and onto the name of the data set my-datasets.VSAMDEMO.INQUIRY.DATA.

    The mouse pointer changes to a document icon as you drag, and the data set name is highlighted when you have positioned the mouse pointer on it.

  3. Release the mouse pointer.

    Messages appear showing that salesinq.dat is being copied to the mainframe.

If you have a JCL file on your PC that you want to execute on the mainframe, drag and drop it to <JES>My jobs.

9.3.5 Viewing Data Sets on the Mainframe

You can look at data sets on the mainframe in the same way as you did the files on your PC:

  1. Double-click my-datasets.DEMO.COBOL in the right-hand pane.

    The tree view expands, and you can see VSAMDEMO is a member of the data set. The extension .cbl has been dropped as extensions are not used on the mainframe.

  2. Double-click VSAMDEMO in the right-hand pane.

    A window appears displaying the source of vsamdemo.cbl. You can drag its borders to make it wider.

  3. Close the source window.

9.3.6 Downloading a File

To download a file means to copy it from the mainframe to your PC. You use MFA Drag & Drop to do this.

We will start by renaming the vsamdemo.cbl on the PC, to save it.

  1. Right-click vsamdemo.cbl in the left-hand pane, and on the popup menu click Rename.

  2. In the dialog box, change the name to vsamdemo.bak and click OK.

    We are now ready to download vsamdemo from the mainframe. First we need to arrange to add .cbl, the usual extension for a COBOL source file on the PC in Mainframe Express.

  3. Click Options on MFA Data Access Services Configure menu.

    A dialog box appears for you to specify the session options.

  4. Check Prompt for an extension on import, then click OK.

  5. Make sure the left-hand pane is positioned so you can see the folder \mfuser\projects\gsdemo\idedemo\source.

  6. Put your mouse pointer on VSAMDEMO in the right-hand pane. Then, holding down the mouse button, drag it across and onto the name of the folder \mfuser\projects\gsdemo\idedemo\source.

  7. Release the mouse pointer.

    A dialog box appears for you to specify the extension to be added.

  8. Enter cbl and click OK.

    Messages appear showing that VSAMDEMO is being copied to your PC. When the messages disappear, the transfer is complete, and if you scroll down the left-hand pane you will see vsamdemo.cbl is again in the list of files in the folder \mfuser\projects\gsdemo\idedemo\source.

9.3.7 Copying a File Within a Folder

You can make a copy of a file in the same folder, provided you give the copies different names (these files are used in the next section):

  1. Right-click vsamdemo.bak in the left-hand pane, and click Copy on the popup menu.

    Nothing visible happens, but a reference to the file is stored by Drag & Drop internally ready to copy the file.

  2. Right-click vsamdemo.bak in the left-hand pane, and click Rename on the popup menu.

  3. Change the name in the Rename 'VSAMDEMO.BAK' to field to vsamdem2.bak and click OK.

    The file's name changes in the left-hand pane.

  4. Right-click the name of the folder \mfuser\projects\gsdemo\idedemo\source, then click Paste 'VSAMDEMO.BAK' on the popup menu.

    vsamdemo.bak is added as a file within the folder source.

9.3.8 Displaying and Transferring Selected Files

You can use asterisks as wildcards to display selected files in a folder. You can then transfer them together. For example, you could transfer a set of copy files from a PC folder to a mainframe copyfile PDS.

To select and transfer all files in source with the extension .bak:

  1. Right-click the name of the folder \mfuser\projects\gsdemo\idedemo\source, then click Change directory display criteria on the popup menu.

  2. Type *.bak in the Display directory based upon field, and click OK.

    Now, of the files in that folder, only the two .bak files are displayed.

    To avoid overwriting the vsamdemo that you transferred to my-datasets.demo.cobol earlier, we'll rename vsamdemo.bak.

  3. Right-click vsamdemo.bak and click Rename, then change its name to vsamdem1.bak and click OK.

  4. Select both vsamdem2.bak and vsamdem1.bak by clicking the first and then shift-clicking (click while holding down Shift) the last.

  5. Click within the highlighted area, and then drag the files to my-datasets.demo.cobol, as before.

  6. Click Yes on the message asking if sure you want to export them.

  7. When the transfer has finished, click Mainframe on the Refresh menu, and then double-click my-datasets.demo.cobol, to see the new files on the mainframe.

9.4 Before Continuing

Close MFA Drag&Drop by either clicking Exit on its File menu or clicking its g           button.

The mainframe data set my-datasets.DEMO.COBOL and its member vsamdemo, and the mainframe data set my-datasets.VSAMDEMO.INQUIRY.DATA, are used in a subsequent session, Accessing Mainframe Files.

If you want to take a break before going on to the next session, you can close Mainframe Express.

Return to the Tutorials Map in the chapter Start Here for the Tutorials and choose which session to go on to next, depending on your interests.


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousUsing Workgrouping Accessing Mainframe FilesNext"