Chapter 21: Editing a BMS Mapset

Use the BMS screen painter in CICS Option to create and modify BMS maps. You see the maps as they would appear when displayed during a CICS transaction. You can alter the appearance and function of each field in the map.


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

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


21.1 Overview

This session shows you how to use the BMS painter to create and edit BMS maps and mapsets and use them in CICS applications.

This session uses the same demo application as the chapter CICS Applications.

21.2 Preparation

This demo uses the project cicsdemo.mvp that you created and built in the chapter CICS Applications.

  1. If you have closed Mainframe Express, open it as before. Close any project windows and any other windows that are open.

  2. Open the project cicsdemo.mvp in any of the ways described in the chapter Start Here for the Tutorials.

    The full path is \mfuser\projects\gsdemo\cicsdemo\cicsdemo.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.

21.3 Sample Session

In this session you:

21.3.1 Viewing BMS Maps

To view the BMS maps in this project:

  1. Click the Files tab on the project window.

  2. 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, as shown in Figure 21-1.



    Figure 21-1: The IDE with a BMS Painter Window

    The BMS Painter window appears, displaying the first map of acctset.bms.

  3. In the left-hand pane, click the "+" by ACCTSET, to expand the tree view.

    You see a full list of the maps in this mapset.

  4. Click ACCTDTL in the left-hand pane.

    This displays the map ACCTDTL in the right-hand pane.

  5. Click the map names in turn to display the maps in the right-hand pane.

  6. Click ACCTMNU in the left-hand pane.

    This displays ACCTMNU again.

21.3.2 Viewing Mapset Properties

To display the properties of the mapset:

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

    This displays the Mapset Properties dialog box. (You can also display the Mapset Properties dialog box by right-clicking the mapset name in the left-hand pane and clicking Properties on the pop-up menu.)

  2. Click the page tabs in the dialog box displayed to see all the properties of the mapset.

    This dialog box is where you can change the properties of the mapset.

  3. Make no changes. Click Cancel.

21.3.3 Viewing Map Properties

To display the properties of a map:

  1. Double-click the map name ACCTMNU in the left-hand pane.

    This displays the Map Properties dialog box.

  2. Click the page tabs in the dialog box displayed to see all the properties of the map.

    This dialog box is where you can change the properties of the map.

  3. Make no changes. Click Cancel

21.3.4 Viewing Field Properties

To display the properties of a field:

  1. Right-click on the characters indicating the Surname field (to the right of the "SURNAME:" label) on the map in the right-hand pane.

  2. Click Properties.

    This displays the Field Properties dialog box. Also, the tree view in the left-hand pane expands to list the fields on this map with the selected field name, SNAMEM, highlighted. Any fields that do not have a name are shown in the tree view as "static text".

  3. Click the page tabs in the dialog box to see all the properties of the field.

    This dialog box is where you can change the properties of the field.

  4. Make no changes. Click Cancel.

    An alternative way of viewing field properties is as follows.

  5. In the list of field names, double-click SNAMEM.

    This displays the Field Properties dialog box.

  6. Make no changes. Click Cancel.

    When you select a field in the left-hand pane, if the right-hand pane is not already displaying the map containing that field, the right-hand pane changes to display that map.

21.3.5 Editing the Color and Highlight of a Field

Although color and highlight are shown on the Field Properties dialog box, and you can edit them there, there's also a short-cut you can use:

  1. Right-click on the characters indicating the Surname field in the right-hand pane, and click Color on the popup menu. Then click Blue on the submenu that appears.

  2. Right-click on the characters indicating the Surname field in the right-hand pane, and click Hilight on the popup menu. Then click Blink on the submenu that appears.

    We've now finished using the BMS Painter for the moment.

  3. Click Close on the File menu. Click No on the message asking if you want to save the changes you just made.

21.3.6 View a Map as Text

As well as using the BMS painter to edit BMS maps, you can view and edit the BMS source directly.

  1. Right click acctset.bms in the right-hand pane of the project view, and click Edit as text on the popup menu.

    An edit window appears showing the BMS map as text. This has loaded the same editor as you would get for a plain text file or a COBOL source file, and you have all the same editing functions available.

  2. Make no changes. Click Close on the File menu.

21.3.7 Creating a New BMS Mapset

To create a new BMS map:

  1. Click New on the File menu.

  2. Select CICS BMS Mapset on the New dialog box and click OK.

    The Mapset Properties dialog box appears

  3. Enter DEMOSET in the Mapset Name field, then click OK.

    The Map Properties dialog box appears

  4. Enter DEMO in the Map Name field (replacing the default - it has defaulted to DEMOSET, the same as the Mapset name), then click OK.

    The painter is displayed with an empty map in the right-hand pane and the new mapset name and map name in the left-hand pane.

21.3.8 Adding a Field

To create a field in the map

  1. Click near the top left-hand corner of the empty map.

  2. Type Enter name:

    This creates some static text.

  3. Click somewhere to the right of this text.

  4. Press Shift+Cursor-right twelve times (hold down either Shift key while pressing either Cursor-right key).

    This marks the extent of the field, and initializes it to x"00" (hexadecimal 00), the initial value used for an input field. This doesn't mark it as an input field though.

  5. Right-click the field and click Properties on the popup menu.

    Notice that the new field appears in the left-hand pane. It is shown as "static text".

  6. On the Field Properties dialog box, make sure the General tab is selected.

  7. Enter DEMO1 as the field name.

  8. Select Unprot, then click OK

    This sets the "Unprotected" property, meaning users will be able to type data into this field. So it is now an input field.

    Notice that the field's entry in the left-hand pane now shows its name, DEMO1.

  9. Click the field (which is still selected) and, holding the mouse button down, drag the field to somewhere near the middle of the map, then release the mouse button.

    While you're dragging it, the field is colored green. It stays green while the field is in a valid position in the map. If part of a field is in an invalid position (such as on top of an existing field) it turns red. Releasing the mouse button while part of the field is red returns the field to its original position. When the field is dragged back to its original position it turns white.

21.3.9 Copying a Field

To create a new field by copying an existing one:

  1. Right-click the field named DEMO1 that you just created, and click Copy on the popup menu.

  2. Click an empty part of the map to deselect the field.

  3. Right-click the map a little below the field, and click Paste.

    A new field appears at the chosen position. It has the same properties as the field you copied, and a unique name is generated for it. The new field appears in the left-hand pane as DEMO2.

    If the position on the map is invalid the Paste will not complete and nothing happens.

    You can drag the new field to a new position if you want to.

21.3.10 Moving a Block of Adjacent Fields

As well as moving individual fields you can move a block of adjacent fields:

  1. Put the mouse pointer on an empty part of the map slightly above and to the left of the two input fields. Then, still holding the mouse button down, drag the frame that appears down and to the right until it encloses the two fields. Then release the mouse button.

  2. Click either of the enclosed fields and drag it some distance to the right. Then release the mouse button.

    Both fields move together to new positions.

21.3.11 Copying a Block of Adjacent Fields

You can also copy a block of adjacent fields:

  1. Enclose the two input fields as above.

  2. Right-click either of the enclosed fields, and click Copy on the popup menu.

  3. Click an empty part of the map to deselect the fields.

  4. Right-click where you want the copy to go, and click Paste.

21.3.12 Moving and Copying Non-adjacent Fields

You can also move and copy blocks of non-adjacent fields. Instead of dragging the frame to select the block of fields, select the fields as follows:

  1. Double-click one of the fields you want to move or copy.

    This selects it, and deselects all others.

  2. With the Ctrl key depressed, click all the fields you want to move or copy.

  3. With the fields now highlighted continue with the move or copy operation as described above.

    As with all the editors in Mainframe Express, the functions such as Cut, Copy, and Paste that appear on the popup menus are also on the Edit pulldown menu.

  4. Close the BMS Painter window. Click No on the message asking if you want to save the file.

21.3.13 Generating .mod and .cpy Files

Compiling a mapset generates a .mod and a .cpy file for use in the build of the project. There are several ways on the menus of the IDE to start a compilation. Usually the most convenient way is to click Build on the Build menu, to rebuild the project. Here will we illustrate one of the other methods.

  1. In the project view, right-click acctset.bms in the right-hand pane, then click Compile acctset.bms on the popup menu.

    Compiling a file invokes automatically the correct compiler for that type of file.

  2. Messages in the Output window show that the BMS compiler runs and compiles the mapset.

The .mod file is generated into the loadlib folder and the .cpy file into the copylib folder for the project (see the chapter Using Workgrouping).

21.4 Before Continuing

The Cicsdemo project is used in a related session, Running with Multitasking. If you're planning to go onto that session, you can keep the project open.

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.