PreviousIntroduction to Using Options Together Assembler, CICS, IMS, DB2 (SQL Option)Next"

Chapter 33: Assembler and CICS

In this session you take an application that includes CICS and contains some Assembler programs and get it working on Mainframe Express.


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

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


33.1 Overview

This session shows you how to get a CICS application that includes Assembler modules working on your PC.

The demo application used in this session is an Assembler version of the application that you used in the chapter CICS Applications. In this session, you get it working on your PC. It consists of several Assembler programs and one BMS mapset. The supplied project includes a transaction AACT that starts the first program.

This sample application uses the resources defined in the resource definition file supplied with Mainframe Express. You do not need to make any changes to the resources to get this application working.

33.2 Preparation

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

33.3 Sample Session

In this sample session you:

33.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. Enter acicdemo as the name of the project and change the name of the Project Folder to d:\mfuser\projects\gsdemo\acicdemo, 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.

    You now get a page asking which of the installed options this project uses.

  5. Ensure that only the CICS check box has a check mark, and click Next.

    Because you have said this project uses CICS, you get the pages that relate to CICS.

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

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

    Leaving this unchanged means you will use the resource definition file supplied with Mainframe Express.

  8. From the pulldown list, select MCOASM for the System Initialization Table and click Next.

  9. Click Finish.

33.3.2 Adding Files to the Project

To add your Assembler 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 \mfuser\projects\gsdemo\acicdemo\source. Ensure the Files of Type field is set to Source Files.

  3. Click Add All, then click Yes on the confirmation message.

    The files are added to the project.

  4. Click Done.

33.3.3 Modifying the Build Settings

Assembler Option automatically recognises EXEC CICS statements in an Assembler program and sets some compiler directives to indicate this, including settings for the standard CICS prolog and epilog macros. However, since all the Assembler programs contain EXEC CICS statements and use the standard macros, you can set these directives at project level:

  1. Click Project in the left-hand pane of the project view, and click Build Settings for Project on the Project menu.

  2. Click the Assembler tab.

  3. Click the Preproc subtab.

  4. Check EXEC CICS, then click More.

  5. Ensure that Insert standard prolog macros and Insert standard epilog macros are checked.

  6. Click Close.

  7. Click OK.

33.3.4 Viewing Mapset Properties

A setting in the properties of the BMS mapset controls whether Assembler or COBOL code is produced when you compile the mapset. Let's look at this:

  1. Ensure that in the left-hand pane either Project or Source or BMS is selected, then right-click acctset.bms in the right-hand pane and click Edit on the popup menu

    A BMS Painter window opens displaying the first map of acctset.bms.

  2. Double-click the mapset name ACCTSET in the left-hand pane.

    This displays the Mapset Properties dialog box.

  3. Find the Lang group on the right-hand side and note that Lang is set to ASM (for Assembler)

  4. Make no changes. Click Cancel.

  5. Click Close on the File menu.

33.3.5 Building the Project

To build the project:

  1. Click Build on the Build menu.

    As you saw in the chapter Using Mainframe Express, the correct compiler is automatically called for each source file - in this case, for the Assembler (.mlc) files and the BMS (.bms) file. Each Assembler module is linked to create six load modules.

    The build finishes with "Build finished with no errors".

33.3.6 Running the Application

Because there is no COBOL in this application, Run and Start Debugging have the same effect.

To run the application:

  1. Click Run on the Debug menu.

  2. Check Enable Assembler debugging. This causes the Assembler module to be debugged.

  3. Click the CICS tab, and enter AACT (upper case) in Initial TRANSID.

  4. Click OK.

    A 3270 Terminal Emulator opens in the Application Output window. Messages appear, showing the application starting up. You are taken into the Assembler debugger.

  5. Click in the Application Output window to select it, then press S several times to step through the Assembler code.

  6. Press Z (Zoom) to execute without further debugging.

    This takes you to a screen showing the application's first map (If the Application Output window is undocked, its title bar changes to "Single Tasking Region (ACCT)".)

  7. Press CICS Clear (Esc) twice to take you to a blank screen.

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

33.4 Before Continuing

Hide the Application Output window.

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.

PreviousIntroduction to Using Options Together Assembler, CICS, IMS, DB2 (SQL Option)Next"