Chapter 33: CICS BMS Screen Painter

This chapter describes how to use the BMS screen painter to create:

It is assumed that you are familiar with BMS fields, maps and mapsets and with the DFHMDF, DFHMDI and DFHMSD macros.

Overview

The BMS screen painter is a powerful, flexible tool for designing maps and generating the BMS macros necessary for creating displayable mapset objects. The painter can also generate the corresponding copybooks needed for using these maps from your program, and compile them into executable modules.

The following terminology is used both in this chapter and by the painter itself:

Field An area, of a specified number of columns on an entry or display panel, designed to contain a single item of information of specified attributes and properties. Fields are arranged for display on a map. A painter field corresponds to a BMS field and is generated as a DFHMDF macro.
Attributes Settings for the visible appearance of a field, for example, foreground and background color and highlighting.
Properties Settings for the behavior and internal representation of a field or a map (for example, picture, justification, validation) or of a mapset (for example, BMS level, language, storage).
Map An arrangement of fields on a display panel, designed for the entry and display of related items of information. A painter map corresponds to a BMS display map and is generated into the BMS macro file as a DFHMDI macro.
Mapset A collection of related maps that generally are used for a single transaction. A painter mapset corresponds to a BMS mapset and is generated into the BMS macro file as a DFHMSD macro.

Step-by-step instructions for individual tasks are in the online help, rather than in this chapter. Click Help Topics on the Help menu. Then on the Contents tab click CICS Option , and Working with BMS Maps and Mapsets.

Using the Painter

You use the painter to design and define panels for the entry and display of data. To do this, you define maps and mapsets and generate these definitions into the corresponding BMS macros and COBOL and Assembler copybooks. You can create new maps or edit existing ones, whether created by you or downloaded from the mainframe (see the section Working with Previously Created Maps). You can create and edit a mapset either within a project or independently of any project.

You create a map by painting on it fields with specified attributes and properties. You design the map on-screen, so you can control precisely how it should appear.

Everything you paint on a map in a painter session is either static text or a named field. Both are automatically defined as fields (DFHMDF macros) when you generate the BMS macro file. For example:

By default, the painter generates copybook data descriptions for each field at the same level. You can, however, create group items by defining groups of fields in the painter.

Each field you create in the painter is generated as a BMS DFHMDF macro. Each field is also part of a map. With the painter you can group a collection of maps into a mapset. When you generate the BMS macro file, a DFHMDI macro defines each map and a DFHMSD macro defines the mapset.

The BMS screen painter generates a BMS macro file (.bms file) as its output. By compiling this BMS macro file from the Files View you can generate a BMS COBOL copybook (.cpy file), Assembler copybook (.mac file) and a BMS load module (.mod file). Output options are explained in more detail in the section Generating Output from the Painter

The Painter Window

The painter provides a window in which you can create and edit maps. The window, shown in Figure 33-1below, is divided into two panes.

The BMS Screen Painter Window

Figure 33-1: The BMS Screen Painter Window

The left-hand pane contains a tree view of the mapset that is being edited. At the top level of the tree is the mapset name and beneath it, at the second level, are the names of the maps within the mapset. Beneath each map name, at the third level, are the names of the individual fields within the map. If a field does not have a name because it is a protected field that cannot receive input, the tree shows the field as "static text". You can expand and contract the tree view by clicking the + and - symbols to the left of the mapset and map names.

The right-hand pane of the painter window shows the contents of the map you are editing as it would appear on the terminal screen when displayed by the CICS transaction that uses it. In the right-hand pane you can add and delete fields and move and copy individual fields or groups of fields. You can initialize fields with text and define whether or not they can receive input. While you are editing the map in the right-hand pane, the tree view in the left-hand pane is constantly updated to highlight the field that is being edited.

You can edit more than one map in a painter session by using the new window function of the IDE (click New Window on the Window menu). You can then use the painter clipboard to copy from one map to another within a mapset. You can also have more than one painter session open (although they must be for different mapsets) and, again using the painter clipboard, you can copy between mapsets.

Note: You cannot copy and paste between the painter and the system clipboard.

The title bar at the top of the painter window shows the name of the BMS macro (.bms) file you are editing (unless this is a new file which you have not yet saved). You see an asterisk to the right of this filename whenever there are unsaved changes during the painter session. The asterisk disappears when the BMS macro file is saved.

The status line at the bottom of the IDE window shows, on the left, the painter operation being performed and, on the right, the position of the cursor. The cursor position is shown both as the line number and column number within the map and as the absolute position (or offset) from the start of the map.

Configuring the Painter

You can configure the BMS screen painter using the BMS Screen Painter Options dialog box. Click BMS on the Options menu of the IDE to display this dialog box as shown in Figure 33-2.

The BMS Screen Painter Options Dialog Box - Edit Page

Figure 33-2: The BMS Screen Painter Options Dialog Box - Edit Page

The default settings on this dialog box should enable you to edit an existing BMS macro file or create a new mapset.

See the popup help for each field for a description of what it does - click ? in the title bar, then click the field.

You can see the View page of this dialog box in Figure 33-3.

The BMS Screen Painter Options Dialog Box - View Page

Figure 33-3: The BMS Screen Painter Options Dialog Box - View Page

Here you can specify whether the tree view shows macro entries or copybook entries.

Build Settings for the BMS Screeen Painter

You specify build settings for the BMS screen painter using the BMS page of the Build Settings for Project dialog box. Unlike the configuration options that you set using the BMS Screen Painter Options dialog box, build settings apply only within a project, either to all BMS files in the project, or to a specific file or files.

Click Build Settings for Project on the Project menu of the IDE to display the Build Settings for Project dialog box as shown in Figure 33-4.

BMS Build Settings - General Page

Figure 33-4: BMS Build Settings - General Page

On this page you can:

You can see the Advanced page of this dialog box in Figure 33-5.

BMS Build Settings - Advanced Page

Figure 33-5: BMS Build Settings - Advanced Page

On this page you can:

Working with Maps

When you have a map open in the BMS screen painter, you can:

Defining Field, Map and Mapset Properties

You define the properties of fields, maps and mapsets using the Field Properties, Map Properties and Mapset Properties dialog boxes. Many properties appear in all three dialog boxes, and where such properties are concerned, there is a hierarchy, with field properties at the top and mapset properties at the bottom. For example, you can specify at mapset level that entry fields are white; you can override this setting at the map level for all the fields in a map, and at field level for an individual field.

Note: If you specify the blink attribute, each affected field is displayed in the BMS Screen Painter window exactly as it would appear on the terminal screen. However, this attribute cannot be displayed in the Application Output window when the project is being run or debugged within the development system

Defining Field Properties

Use the Field Properties dialog box to define the properties of a field. Right-click the field in the right-hand pane of the painter window and click Properties to display the Field Properties dialog box shown in Figure 33-6.

The Field Properties Dialog Box

Figure 33-6: The Field Properties Dialog Box

The properties shown on the General page are the ones you are most likely to want to set. In particular, to make a field able to accept input you must set it as unprotected. To do this, click Unprot in the Attrb area of the General page.

Defining Map Properties

Use the Map Properties dialog box to define the properties of the map. Double-click the map name in the tree view in the left-hand pane of the painter window to display the Map Properties dialog box, shown in Figure 33-7.

The Map Properties Dialog Box

Figure 33-7: The Map Properties Dialog Box

These properties set the operand values for the corresponding BMS map definition macro DFHMDI.

Pages on the dialog box show the map properties. Depending on the configuration options set for the painter, some of the pages may not be displayed.

DBCS attributes are displayed on the DBCS page but they cannot be changed

Note: You can use the painter to specify values for all the DFHMDI operands, even though they might not be applied to the BMS macro file that is generated.

Defining Mapset Properties

Use the Mapset Properties dialog box to define the properties of the mapset. Double-click the mapset name in the tree view in the left-hand pane of the painter window to display the Mapset Properties dialog box, shown in Figure 33-8.

The Mapset Properties Dialog Box

Figure 33-8: The Mapset Properties Dialog Box

These properties set the operand values for the corresponding BMS map definition macro DFHMSD.

Pages on the dialog box show the mapset properties. The Standard BMS page is displayed only if the painter is configured for standard or full BMS. DBCS attributes are displayed on the DBCS page but they cannot be changed

Working with Previously Created Maps

You can open and work on a mapset that has been downloaded to your PC from the mainframe but as yet does not belong to a project.

When working on maps and mapsets created on the mainframe, you should bear the following in mind:

Generating Output from the Painter

The painter can generate the following types of file:

The painter generates the files using the name that you gave to the mapset. You can specify different filenames using build settings; see the section Build Settings for the BMS Screen Painter

BMS Macro Files

You create a BMS macro (.bms) file by saving the file that is open in the painter. You can save the file at any time while working on it in the painter or you can save it when you exit from the painter.

To save the file from the painter click Save on the File menu of the IDE. If you want to create a new BMS macro file click Save As on the File menu of the IDE and specify the new filename.

To save the file and exit from the painter click the close icon on the title bar of the painter and click Yes to save the changes. You cannot specify a new filename if you save the file in this way.

Copybooks and Load Modules

You generate the copybook and load module files by compiling the BMS macro (.bms) file. You do this from the Files View of the IDE.

The files generated are determined by the options specified on the General page of the Mapset Properties dialog box.

The language selected in the Lang group specifies the value of the LANG operand of the DFHMSD macro in the BMS source file. When you compile a BMS macro file, the value of the LANG operand is used to determine which type of copybook or include file to generate:

Note: Generation of C DSECT (include) files is not currently supported.

The option selected in Type determines the files generated:

If &&SYSPARM is selected you must specify whether you want to generate the copybook, the load module, or both, on the General page of the BMS page of the Build Settings dialog box; see the section Build Settings for the BMS Screen Painter.

To compile the BMS macro file while the painter is open, click Compile filename.bms on the Build menu of the IDE. The BMS macro file is automatically saved before the compilation takes place.

To compile the BMS macro file from the Files View, right-click the BMS file in the right-hand pane and click Compile filename.bms on the popup menu.

The copybook (.cpy or .mac file) is created in the copylib folder of the project and the load module (.mod file) is created in the loadlib folder of the project.


Copyright © 2006 Micro Focus (IP) Ltd. All rights reserved.