Uploading and Downloading Files | Running JCL on the Mainframe |
From your PC, use the Micro Focus product Mainframe Access from within Mainframe Express to view and access data sets held on the mainframe. You can access sequential data sets, which hold data input to and output from your programs, and partitioned data sets, which hold source code. Partitioned data sets include Librarian, Panvalet, and in-house source control systems.
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 a separate Micro Focus Mainframe Access Server product running on the mainframe. Before running this session, check that your site intends to use this product rather than some other method of accessing mainframe files. More information is supplied with the Mainframe Access product.
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 drive 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 SourceConnect Configuration dialog box appears.
For direct-connect TCP/IP, this is where you would specify MFNODE:your-tcp/ip-address,MFPORT:your-tcp/ip-portnumber. For example, MFNODE:CSIMVS,MFPORT:6000.
For ACCP, this is where you would specify LUname.mode
Don't click OK yet - there's more to do in the next section.
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:
This is where you assign the drive letter.
The next available drive letter on your PC appears in the Drive column in the listbox.
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 wanted to choose a different letter you could 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* and press Enter.
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 Remove.
Don't click OK 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 Mainframe Type to Override column is selected.
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 and they are just the same as those used in the chapter Using Mainframe Express except that vsamdemo.cbl and salesinq.dat are not included. These two files will be accessed on the mainframe, where you put them in the previous chapter, Uploading and Downloading Files.
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. To access a drive on the mainframe, you must indicate explicitly that it's on the mainframe. You can't simply enter its path and name in the Filename field (which was one of the methods described in the appendix Windows Tips for changing drive or folder). You must go up the hierarchy of folders and drives to specify that it is on the mainframe, as follows.
The My Mainframe 2.0 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.
We now need to add the data files to the project's catalog. First we'll add the data file held on the mainframe, VSAMDEMO.INQUIRY.DATA, then we'll add the other two files, which are on the PC.
For example, if standard-server-name is FILESHR2.CSIMVS, and my-datasets is MF101.MTS, enter $$FILESHR2.CSIMVS\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 |
---|---|---|---|---|
VSAMDEMO.SALEDATA.DATA | saledata.dat | PS | FB | 26 |
VSAMDEMO.VSAMINIT.DATA | vsaminit.dat | PS | FB | 80 |
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 input files to the Files View as you did when you worked through the tutorial in the chapter Using Mainframe Express.
You have now created a project just as you did in the chapter Using Mainframe Express, except that vsamdemo.cbl and 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 and VSAMDEMO.INQUIRY.DATA just like files on the PC. You can view and edit them and you can compile vsamdemo.cbl. You can open them using Open or Recent Files on the File menu when this is more convenient than via a project, and so on.
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".
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 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 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.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Uploading and Downloading Files | Running JCL on the Mainframe |