Developing the presentation logic using the BMS Editor in WD/z IBM-CICS

As part of our ground-up development of the sample application, we show how to use the BMS Editor in WD/z to create our BMS maps. This is a modern tooling alternative to using the traditional designer (such as SDF II) or straight coding of BMS source.

The WD/z BMS Editor is associated with .bms map set files and uses the following Eclipse views in its perspective:

  • Project Explorer

Lists the projects and the BMS map sets for that project.

  • Outline

Lists the maps and artifacts within the map.

  • Palette

Items associated with BMS maps are listed that can be easily dragged onto the design canvas.

  • Properties

Lists the attributes for the maps and the map sets that are highlighted in the Outline view.

This section demonstrates how we created one of the BMS maps for this project.

1. Create a Project

The following steps show how to create a project, into which we will be able to create the map set and map objects.

  1. Start up WD/z.
  2. Click File → New → Project.
  3. Select General → Project.
  4. Click Next.
  5. Type the name of the project.
  6. Click Finish.

The local project can be seen in the Project Explorer view in the Other Projects group.

Use the following steps to view the Project Explorer pane:

  1. Select Window → Show View → Other.
  2. Expand the General folder.
  3. Click Project Explorer.

The project can be seen in the Project Explorer view, as seen in Figure.

Creating the Redbooks local project

Creating the Redbooks local project

2. Create a new map set

The following steps show you how to create a map set for this project:

  1. Click File → New → Other → zOS.
  2. Select BMS → Map set from the list of wizards.
  3. Click Next.
  4. Select the folder for the destination of the BMS map set file, and enter the map set name. This is seen in figure.

    Defining the Map set name

    Defining the Map set name
  5. The map set itsoms1 are now listed in the project in the Project Explorer view, as seen in Figure.

    The Map set is created

    The Map set is created

3. Designing the BMS map

Now we use the drag and drop technique, dragging from the Palette view and dropping onto our design canvas to create a BMS map.

  1. Double-click the map set name in the Project Explorer view to display a blank canvas.
  2. Left-click and drag the fields from the Palette that you need, and drop them onto the canvas.
  3. Figure shows that we dropped titles, label, and instruction constant fields and seven input fields into approximate position
  4. The design canvas with Palette items

    The design canvas with Palette items

    The Outline view in Figure shows a list of all the fields associated with the map.

    The Outline view shows attribute names for the map

    Outline view shows attribute names for the map

    Properties for each of the fields can now be defined by either of the two following methods:

    • Double-clicking the field name in the Outline view.
    • Right-clicking the field on the design canvas, and selecting Field Properties.

    The position of the field can be moved by dragging the field around the design canvas.

  5. View the 3270 representation of the map by clicking the Preview tab, and view or edit the source (if required) by clicking the Source tab. These views are shown in Figures.

    Previewing the Map

    Previewing the Map

  6. Save the work using the standard eclipse key stroke Ctrl-S.

    The generated map source from the BMS Editor

    generated map source from the BMS Editor

4. Creating additional maps

The previous section described the creation of a single map into a map set. Ordinarily there is more than one map within a map set. We will now see how the BMS Editor handles multiple maps within the map set. There are a couple of methods for using multiple maps on the design canvas.

The first and easiest way to manage maps on the canvas is to drag and place the map to the side of the canvas:

  1. Click and hold the left mouse button anywhere in the design canvas.
  2. Drag and drop the full-window map towards the edge of the canvas view.
  3. Note that the size and the position of the map are displayed in the pop-up box.

  4. In the Palette, click Map.
  5. Move the cursor to the design canvas and drop the map.
  6. Alternatively, the map can be ‘hidden’ from view. The Palette contains a Map object that you can drag onto the design canvas to create additional maps. In 100 Developing Web Services Using CICS, WMQ, and WMB order to view only the current map, the Hide Map option is used to assist with the layering of maps on the work space.

    To demonstrate this, Figure shows the result of dragging a map object from the Palette onto the design canvas for MAP1. “Designing the BMS map” will be given a default name of MAP2.

The map object

The map object

The Outline Explorer view shows the newly created MAP2. To work with this map, you may want to hide MAP1 using the Hide Map option on the MAP1 object in the Outline Explorer view. Right-click the MAP1 object as shown in Figure.

The Hide Map Option

The Hide Map Option

Now the design canvas shows only the new map, which you can resize and work on it. The Outline Explorer view shows that the map is hidden as in Figure.

The Outline Explorer view showing hidden map

The Outline Explorer view showing hidden map

Copying map definitions

Many map sets contain maps that have a common layout or duplicate fields. From the Outline view of the map sets and maps, either the entire map or any of the fields within the map can be copied to another map in either the same or a different map set. Following is the procedure:

  1. Right-click the map or field in the Outline view. Multiple fields can be selected by holding the Ctrl key and clicking on additional fields.
  2. Choose Copy.
  3. Double-click the destination map set in the Projects view.
  4. Click the Outline tab to display the maps in the map set.
  5. Right-click the destination map.
  6. Choose Paste.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status