From your PC, use the Micro Focus software Mainframe Access from within Mainframe Express to view and access data sets held on the mainframe. You can access mainframe VSAM, QSAM, BPAM data sets, as well as Librarian, Panvalet and in-house source code control system data sets.
You need to have read the chapter Start Here for the Tutorials and worked through the first session, Using Mainframe Express, and the session Uploading and Downloading Files, before you do this session.
The use of Mainframe Access requires additional Micro Focus software (Mainframe Access Server) running on the mainframe. Before running this session, check that your site intends to use this software rather than some other method of accessing mainframe files. Full information is supplied with the Mainframe Access.
Mainframe Access provides the following facilities:
In order to use SourceConnect or DataConnect, you need to specify the communications link to the mainframe. Then, for SourceConnect, you assign a PC-type drive letter. You can associate catalog search criteria with the drive letter so that a number of partitioned data sets, or other source control systems on the mainframe, appear as folders (directories) for that drive letter. You can then, from within the IDE, access a data set on the mainframe as if it were a folder on your PC, and its members were files in that folder. For DataConnect, you simply specify the data set name on the mainframe when you add the data set to the catalog, or set a value in Project Settings that directs Mainframe Express to look on the mainframe for files that are not in the catalog on your PC.
In this session, you specify the information that allows Mainframe Express on your PC to communicate with the Mainframe Access Server on your mainframe. Then you assign a drive letter with search criteria that include the PDS you created in the chapter Uploading and Downloading Files. You then create and build a project similar to the one in the chapter Using Mainframe Express, except that you use two files that you transferred to the mainframe in the chapter Uploading and Downloading Files:
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 configured for access to your mainframe.
If you have closed Mainframe Express, open it as before. If any project window or other windows are open, close them.
In this session you:
Before you can use either SourceConnect or DataConnect, you must specify the link to the mainframe.
The Server Access Configuration dialog box appears.
The Node Configuration Wizard appears.
If you selected TCP/IP:
If you selected APPC, specify one of the following sets of information:
The configuration settings you specified are summarized.
For SourceConnect there are two further configuration actions:
To assign a drive letter to a group of partitioned data sets on the mainframe, all with the same search criteria:
The Add dialog box appears.
The next available drive letter on your PC appears in the Drive field. The next available letter is the first letter in the alphabet that isn't the name of a drive on your own PC and that you haven't assigned to a drive on another PC across the network. If you want to choose a different letter, click it to get a pulldown list.
In the following, we will use my-datasets to refer to the part of the data set names that is common to all your data sets, as we did in the previous chapter, Uploading and Downloading Files.
For example, if my-datasets is MF101.MTS, type MF101.MTS.DEMO*
Once you have assigned a drive letter using SourceConnect, it stays assigned until you use SourceConnect to remove it. Closing Mainframe Express, or even rebooting your PC, does not affect it. If you want to remove an assigned drive, select its entry and click Delete.
Whenever you are using Mainframe Express, if a drive letter you have assigned using SourceConnect clashes with one you have subsequently assigned to a network drive, you will from time to time get a warning message.
Don't click OK on the Server Access Configuration dialog box yet - there's more to do in the next section.
Since files on the mainframe don't have extensions to show file type, you need a way for Mainframe Express to recognize what type of file it is dealing with when it accesses a mainframe file. You do this by associating data set names with extensions. This is called a global extension override.
To set a global extension override:
The Dataset Configuration dialog box appears.
This specifies that any member of a data set whose name ends in .COBOL is to be treated like a PC file with extension .cbl.
We'll now create a project just like in the chapter Using Mainframe Express. The files for this demo are in \mfuser\projects\gsdemo\scondemo. The files in this folder are just the same as those used in the chapter Using Mainframe Express, with the following exceptions:
To create the project:
If you installed any of the Mainframe Express options, such as CICS Option or SQL Option, you now get a page asking which of them it uses. There is a check box for each option installed. This project uses none of them.
To add your files to the project:
Next we add the mainframe file to the project. Rather than entering its path and name in the Filename field, we will navigate the hierarchy of folders and drives to specify that it is on the mainframe, as follows.
The My Mainframe 2.5 icon was added to My Computer when you installed Mainframe Express.
Normally, when you do this, you get a dialog box asking for your user ID and password for the mainframe. You may not get this because you entered this information when you used Mainframe Access.
There may be a few seconds delay before the mainframe is contacted and the display in the dialog box changes.
You now see a list of the members of my-datasets.DEMO.COBOL, just as if it were a PC directory and they were the files in it. Notice that the COBOL source files are shown with a .cbl extension.
Before continuing, you need to edit scondemo.jcl to specify the part of the data set names that is common to all your data sets; my-datasets. This change is only required for my-datasets.VSAMDEMO.INQUIRY.DATA, as that is the only mainframe-based file that scondemo.jcl refers to.
To modify scondemo.jcl:
\\INQUIRYline (line 13), changing
USERIDto the value you used for my-datasets when you created my-datasets.VSAMDEMO.INQUIRY.DATA.
We now need to add the data files to the project's catalog. First we'll add the data file held on the mainframe, my-datasets.VSAMDEMO.INQUIRY.DATA, then we'll add the other two files, which are on the PC.
For example, if node-name is MVS-PROD, and my-datasets is MF101.MTS, enter $$MVS-PROD\MF101.MTS.VSAMDEMO.INQUIRY.DATA in this field.
For a mainframe dataset, you can't use the Browse button to set the PC Filename field. You must type the name.
The file is added to the catalog. Its details appear in the Catalog View.
|DS Name||PC Filename||DSORG||RECFM||LRECL|
As these files are on your PC, you can use the button to include the full path \mfuser\projects\gsdemo\scondemo\data in the PC Filename field.
If you wish, add the two input files on the PC to the Files View as you did when you worked through the tutorial in the chapter Using Mainframe Express. However, if you try to do this with the data file on the host, it has no effect; you cannot add a data file on the host to the Files View.
You have now created a project just as you did in the chapter Using Mainframe Express, except that vsamdemo.cbl and my-datasets.VSAMDEMO.INQUIRY.DATA are on the mainframe. You can use this project in just the same way - you can build, run, and debug it. You can treat vsamdemo.cbl just as if it were on the PC. You can edit it and compile it. You can open it using Open or Recent Files on the File menu when this is more convenient than via a project, and so on. However, you cannot edit a data file that is on the host.
If access to the mainframe takes an appreciable time, messages at the bottom left of the IDE keep you informed of the progress of the access.
We will build and run this project before looking at a further facility.
To build the project:
As you saw in the chapter Using Mainframe Express, the correct compiler is automatically called for each source file - in this case, for the COBOL and JCL files.
The build finishes with "Build finished with no errors".
Note: If building the project results in two build errors, you are probably using an unedited version of vsamdemo.cbl. For information on resolving the two errors, see the section Editing the Source Errors and Rebuilding in the chapter Using Mainframe Express.
To run the jobstream:
The Application Output window appears and the application runs. You can see its progress in the Application Output window.
Once you have satisfied yourself that you have full access to these files, you can alter the project to enable automatic mainframe lookup. We'll now delete the catalog entry for my-datasets.VSAMDEMO.INQUIRY.DATA and instruct Mainframe Express to look on the mainframe for any input files not in the catalog:
Run the project again, as above. When the data set my-datasets.VSAMDEMO.INQUIRY.DATA is allocated, Mainframe Express looks for it on the mainframe and creates a catalog entry for it. The application then runs as before.
Close the project. 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.
Comments on the books? Click Send Us Comments.
Copyright © 2001 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.