The CICS Option Interface | Developing CICS Applications |
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.
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 CICS Option executable modules.
The following terminology is used both in this chapter and by the painter itself:
Detailed step-by-step instructions for individual tasks are in the online help, rather than in this chapter. Click Help Topics on the Mainframe Express Help menu then on the Contents tab click CICS Option, and Working with BMS Maps and Mapsets.
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 provides a window in which you can create and edit maps. The window, shown in Figure 31-1, is divided into two panes.
Figure 31-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.
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 31-2.
Figure 31-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 31-3.
Figure 31-3: The BMS Screen Painter Options Dialog Box - View
Page
Here you can specify whether the tree view shows macro entries or copybook entries.
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 31-4.
Figure 31-4: BMS Build Settings - General Page
On this page you can:
You can see the Advanced page of this dialog box in Figure 31-5.
Figure 31-5: BMS Build Settings - Advanced Page
On this page you can:
When you have a map open in the BMS screen painter, you can:
Fields can be single or repeating and you define them by specifying text or by marking the relevant area on the map in the painter window.
Any string of characters that you specify on a map is automatically generated by the painter as an autoskip BMS field. You must explicitly define any field you intend to use for displaying or accepting variable data; see the section Defining Field Properties.
You can define groups of fields, for which you can specify common attributes for all the fields in the group. When you define a standard BMS group, you generate both a value for the BMS GRPNAME operand and a group item in the copybook.
You can define an SDF array by creating additional occurrences of a single field that you have already defined. The field must have a name defined for it on the Field Properties dialog box either in Field Name on the General page or in Name in the Field section on the SDF page. In the latter case the painter generates a field name on the General page.
To create an SDF group or an SDF array you must have enabled the mapset for SDF on the General page of the BMS page of the Build Settings dialog box; see the section Build Settings for the BMS Screen Painter.
You can move fields within a map either as single fields or in groups of fields. You can move fields between maps using the clipboard
You can copy fields within a map either as single fields or in groups of fields. When a field is copied, its properties are copied as well, except for any SDF array or SDF group information.
You can delete fields and groups of fields.
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 Mainframe Express.
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 31-6.
Figure 31-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.
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 31-7.
Figure 31-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.
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 31-8.
Figure 31-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
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:
POS=number
convention (as opposed to POS=(row
,col)
).
The BMS macros are generated always in the POS=(row
,col)
format.
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
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.
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, Mainframe Express uses the value of the LANG operand to determine which type of copybook or include file to generate:
Note: Mainframe Express does not currently support the generation of C DSECT (include) files.
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 © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
The CICS Option Interface | Developing CICS Applications |