PreviousGetting Started with PL/I Applications

Chapter 4: Getting Started with CICS and PL/I Applications

This chapter comprises a tutorial-style session showing how to take an application consisting of PL/I programs that use CICS and get it working on Mainframe Express.


In your Getting Started, you need to have read the chapter Start Here for the Tutorials and worked through the sessions Using Mainframe Express and CICS Applications before you do this session. Also, you should work through the chapter Getting Started with PL/I Applications in this book.

You need to have installed CICS Option and PL/I Option to do this session. We assume you are familiar with CICS and PL/I on a mainframe.


4.1 Overview

This session shows you how to work with a PC-based PL/I application that uses CICS.

The demo application used in this session is a PL/I version of the application that you used in the chapter CICS Applications in your Getting Started. It consists of several PL/I (.pli) programs and one BMS mapset (.bms).

This sample application uses the resources defined in the resource definition file (RDF) supplied with Mainframe Express.

4.2 Preparation

If you have closed Mainframe Express, open it as before. If any project window or other windows are open, close them.

4.3 Sample Session

In this session you:

4.3.1 Creating a Project

To create the project:

  1. Click New on the File menu, then select Project on the New dialog box and click OK.

  2. Specify pcicdemo as the name of the project and change the name of the Project Folder to d:\mfuser\projects\gsdemo\pcicdemo, then click Next.

  3. Ensure that Using this wizard is selected and click Next.

  4. Leave the default folder for the catalog unchanged and click Next.

  5. Check the CICS and PL/I boxes and uncheck the other options and click Next.

  6. Change the CICS region name to APCT and click Next.

  7. Leave the default folder for the resource definition file unchanged and click Next.

    Accepting the default folder means that Mainframe Express uses the supplied resource definition file.

  8. Choose DEMOSIT from the drop-down list and click Next.

  9. Ensure that The project will use only AMODE 31 load modules is checked and click Next.

  10. Click Finish.

4.3.2 Adding Files to the Project

To add the source files to the project:

  1. Click Add Files on the Project menu.

  2. In the Add Files to Project dialog box, open the folder \mfe\mfcics\source\.

  3. Select the following files:
    • acctrec.inc
    • apct00.pli
    • apct01.pli
    • apct02.pli
    • apct03.pli
    • apct04.pli
    • apctset.bms


  4. Click Add and Done.

4.3.3 Viewing and Changing the Build Settings

When you add files to a project, Mainframe Express parses each file and determines the required build settings.

To change the default build settings for the PL/I source files:

  1. Click Build Settings for Project on the Project menu, and if the PL/I page is not visible, click PL/I.

  2. On the General page, select Error in the Message Level field to avoid seeing many warning messages when the project is built.

  3. On the Link page, make sure that Automatically link module is checked.

  4. On the Preproc page, make sure that EXEC CICS is checked.

  5. Click OK.

4.3.4 Modifying the Startup List

CICS Option is supplied with several pre-defined resource groups. This sample application uses the resources defined in the following resource groups:

To make sure the resources in these groups are defined when the application's region (APCT) is started, ensure these groups are in the startup list:

  1. Right-click CICS System in the left-hand pane of the CICS View and click Startup List on the popup menu.

  2. Click DFH$APCT in the Other groups available list and click Add. The group is added to the startup list.

  3. Click OK.

4.3.5 Building the Project

To build the application:

As you have seen before, Mainframe Express calls the correct compiler for each source file.

4.3.6 Running the Application

To run the application:

  1. Click Run on the Debug menu.

  2. Make sure Enable PL/I debugging is not checked.

  3. Specify APCT as the Initial TRANSID on the CICS page of the Start Debugging dialog box.

This runs the APCT transaction. The CICS Log page of the Output window displays the following message:

TXSI1744I PL/I Option support loaded successfully

The Application Output window shows the APCT transaction running.

To stop the application:

  1. Click in the Application Output window.

  2. Press 3270 Clear (Escape) to take you to a blank screen.

  3. Type EXIT and press 3270 Enter (right-hand Ctrl) to terminate CICS.

4.4 Before Continuing

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 in your Getting Started 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.

PreviousGetting Started with PL/I Applications