Use the JCL support in Mainframe Express to run on the mainframe an application you have created on the PC.
You need to have read the chapter Start Here for the Tutorials and worked through the first session, Using Mainframe Express, and the sessions JCL Jobstreams, Uploading and Downloading Files and Accessing Mainframe Files, before you do this session.
In this session, we assume you are familiar with JCL on a mainframe.
Having created and built an application on the PC, you can run it on the mainframe under the control of Mainframe Express. You link to the mainframe using SourceConnect, which you saw in the chapter Accessing Mainframe Files.
In this session, you use the same demo application as you used in the chapter JCL Jobstreams.
You need to have configured SourceConnect. You did this at the start (up to the section Configuring SourceConnect) of the chapter Accessing Mainframe Files.
This demo uses the project jcldemo.mvp that you used in the chapter JCL Jobstreams.
The full path is \mfuser\projects\gsdemo\jcldemo\jcldemo.mvp. If you use Open on the File menu, you need the Files of Type field on the Open dialog box set to Project files (*.mvp) to see this file.
In this session you:
The job mfdemo01.jcl includes a JCL procedure mfdemout.prc. When you submit the job to the mainframe from your PC, the copy of the job file on the PC is used, but the procedure file must reside on the mainframe. So you need to create a procedure library on the mainframe and copy the procedure file to it, as follows:
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.
A dialog box appears for you to define the data set you want to create.
Dataset name | my-datasets.PROCLIB |
---|---|
Quantity | 1 |
Directory blocks | 1 |
Logical record length | 80 |
Block size | 6160 |
There is a short delay and then the right-hand pane is updated to show the new data set.
This expands the tree view to show all folders on that drive.
You can now see all the files and folders within the folder \mfuser\projects\gsdemo\jcldemo\source.
The JCL procedure mfdemout.prc executes a COBOL program mfdemout.cbl. When you submit the job to the mainframe, the load module for this program must reside on the mainframe. So you need to copy the program to a source library on the mainframe. We will copy it to the partitioned data set my-datasets.DEMO.COBOL that was created in section Creating a Data Set in the chapter Uploading and Downloading Files, but you could use any suitable data set.
Before you can run the job mfdemo01.jcl on the mainframe you must compile the COBOL program mfdemout.cbl on the mainframe. You can do this by submitting a job from the PC.
First you need to create a load library on the mainframe to contain the load module produced by the compilation.
A dialog box appears for you to define the data set you want to create.
Dataset name | my-datasets.LOADLIB |
---|---|
Quantity | 1 |
Directory blocks | 1 |
Logical record length | 80 |
Block size | 6160 |
There is a short delay and then the right-hand pane is updated to show the new data set.
Next you need to add the compile and link-edit job to the project, as follows:
In the Output window you might see several messages when the file is parsed because it uses a JCL procedure that does not exist on the PC. You can ignore these messages.
Now you can run the compilation job on the mainframe.
Normally, when you do this, you get a dialog box asking for your user ID and password for the mainframe. You might not get this because you entered this information when you used Mainframe Access.
The job is then run on the mainframe.
The Status field shows Executing while the job is running. This changes to On hardcopy queue when the job has completed.
By default, the Spool View is updated every 10 seconds. To change this value, click the Catalog tab and the Spool subtab on the Project Settings dialog box and edit the Poll mainframe every xx seconds field.
To run the mfdemo01.jcl jobstream on the mainframe:
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.