Developing CICS ApplicationsNext"

Chapter 1: CICS BMS Screen Painter

This chapter describes technical aspects of the BMS screen painter. The chapter CICS BMS Screen Painter in the User's Guide describes how to use the painter to create BMS maps, BMS macro files, copybooks, and BMS load modules.

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

1.1 The EXTATT, MAPATTS, and DSATTS Operands

The painter allows you to specify only the MAPATTS and DSATTS operands for map and mapset properties. You cannot specify the EXTATT operand (this was the old method of specifying attributes in the DFHMDI macro). You can find the Mapatts and Dsatts operands on the Common Attributes page of the Map Properties and Mapset Properties dialog boxes.


Note: The DSATTS attributes are generated in the order CPHVUMTO for the output portion of the symbolic description map to correspond to the CICS/ESA V3.3 data areas layout. The attributes are as follows:

C Field Color
P Programmed Symbol Set (PSS)
H Field Highlight
V Field Validation
U Field Outlining
M SO/SI Creation
T Field Transparency
O Output Data

1.2 Examples of SDF Copybooks

The following examples show the copybook entries created for different SDF arrays and groups. All these examples assume that the BMS screen painter is set up for SDF and displays copybook entries in the tree view.

1.2.1 SDF Array

To create a one-dimensional SDF array:

  1. Create a field and name it on the Field Properties dialog box.

  2. Right-click the field and click Make Horizontal Array on the popup menu.

  3. Right-click the field and click Add Array Column on the popup menu.

  4. Right-click the field and click Add Array Row on the popup menu.

  5. Right-click the field and click Add Array Row on the popup menu.

Although the fields on the screen look as though they are arranged in a two-dimensional array, the copybook entry shows a one-dimensional SDF array. See Figure 1-1.


Figure 1-1: One-dimensional SDF Array

The BMS macro file generated is:

SDFARR  DFHMSD LANG=COBOL,                                        -
               MODE=INOUT,                                             -
               STORAGE=AUTO,                                           -
               TIOAPFX=YES,                                            -
               TYPE=&&SYSPARM 
SDFARR  DFHMDI SIZE=(24,80) 
* FIELD
FIELD   DFHMDF LENGTH=4,                                               -
               POS=(5,9) 
* FIELD
FIELD2  DFHMDF LENGTH=4,                                               -
               POS=(5,14) 
* FIELD
FIELD3  DFHMDF LENGTH=4,                                               -
               POS=(5,19) 
* FIELD
FIELD6  DFHMDF LENGTH=4,                                               -
               POS=(6,9) 
* FIELD
FIELD5  DFHMDF LENGTH=4,                                               -
               POS=(6,14) 
* FIELD
FIELD4  DFHMDF LENGTH=4,                                               -
               POS=(6,19) 
* FIELD
FIELD9  DFHMDF LENGTH=4,                                               -
               POS=(7,9) 
* FIELD
FIELD8  DFHMDF LENGTH=4,                                               -
               POS=(7,14) 
* FIELD
FIELD7  DFHMDF LENGTH=4,                                               -
               POS=(7,19) 
        DFHMSD TYPE=FINAL
        END

You can see that this is a horizontal array by looking at the SDF properties of the second field of the top row:

  1. Double-click the second field of the top row.

  2. Click the SDF tab.

This shows the field as "Index 2 of 9". The fields are counted across the screen.

If you make the array a vertical array by checking Vertical Array and look at the SDF properties again, the field is now shown as "Index 4 of 9". The fields are now counted down the screen.

1.2.2 SDF Group

To create an SDF group:

  1. Create a field and name it on the Field Properties dialog box.

  2. Create a second and third field and name them.

  3. Select all three fields.

  4. Right-click one of the selected fields and click Make SDF Group on the popup menu.

Look at the SDF properties for one of the fields. The BMS Screen Painter has assigned a default SDF group name. If you want to refer explicitly to the group array in the copybook, you must change this default group name. If you don't change the SDF group name, it will not be included in the BMS macro file.

Having created the SDF group you can repeat it:

  1. Right-click one of the fields in the group.

  2. Click Add Group Row on the popup menu..

The copybook entries show that this is a one-dimensional array (a repeated group).

The map now looks like the one shown in Figure 1-2.


Figure 1-2: Repeated SDF Group

The default group name (assigned by the BMS Screen Painter) was not changed and so does not appear in the generated BMS macro file:

SDFGRP1  DFHMSD
               LANG=COBOL,                                             -               
               MODE=INOUT,                                             -               
               STORAGE=AUTO,                                           -               
               TIOAPFX=YES,                                            -   
               TYPE=&&SYSPARM 
SDFGRP  DFHMDI SIZE=(24,80) 
* FIELDA
FIELDA  DFHMDF LENGTH=4,                                               -
               POS=(3,10) 
* FIELDB
FIELDB  DFHMDF LENGTH=5,                                               -
               POS=(3,19) 
* FIELDC
FIELDC  DFHMDF LENGTH=6,                                               -
               POS=(3,29) 
* FIELDA
FIELDA2 DFHMDF LENGTH=4,                                               -
               POS=(4,10) 
* FIELDB
FIELDB2 DFHMDF LENGTH=5,                                               -
               POS=(4,19) 
* FIELDC
FIELDC2 DFHMDF LENGTH=6,                                               -
               POS=(4,29) 
        DFHMSD TYPE=FINAL
        END

1.2.3 Two-dimensional SDF Group Array

You can include an SDF array within an SDF group to create a two-dimensional SDF group array. To create a two-dimensional SDF group array:

  1. Create a field and name it on the Field Properties dialog box.

  2. Right-click the field and click Make Horizontal Array on the popup menu.

  3. Right-click the field and click Add Array Column on the popup menu.

  4. Select both fields.

  5. Right-click one of the selected fields. Note that the Make SDF Group option does not appear on the popup menu. This is because the selected fields are multiple occurences of one named field.

  6. Create another field and name it on the Field Properties dialog box.

  7. Select all the fields.

  8. Right-click one of the selected fields and click Make SDF Group on the popup menu.

  9. Right-click one of the fields in the SDF group and click Properties on the popup menu.

  10. Rename the new SDF group by replacing the default SDF group name.


Note: The default SDF group name was assigned by the BMS Screen Painter. If you want this SDF group array to be saved in the BMS macro file, you must replace the default SDG group name.


  1. Right-click a field and click Add Group Row on the popup menu.

The map now looks like the one shown in Figure 1-3.


Figure 1-3: Two-dimensional SDF Group Array

The default group name was changed so it appears in the BMS macro file:

SDGRP2  DFHMSD LANG=COBOL,                                             -              
               MODE=INOUT,                                             -               
               STORAGE=AUTO,                                           -               
               TIOAPFX=YES,                                            -   
               TYPE=&&SYSPARM
SDFGPAR DFHMDI SIZE=(24,80) 
* GROUP.FIELD1
FIELD1  DFHMDF LENGTH=4,                                               -
               POS=(4,6) 
* GROUP.FIELD1
FIELD2  DFHMDF LENGTH=4,                                               -
               POS=(4,11) 
* GROUP.FIELD1
FIELD3  DFHMDF LENGTH=4,                                               -
               POS=(4,16) 
* GROUP.FIELDA
FIELDA  DFHMDF LENGTH=7,                                               -
               POS=(4,31) 
* GROUP.FIELD1
FIELD6  DFHMDF LENGTH=4,                                               -
               POS=(5,6) 
* GROUP.FIELD1
FIELD5  DFHMDF LENGTH=4,                                               -
               POS=(5,11) 
* GROUP.FIELD1
FIELD4  DFHMDF LENGTH=4,                                               -
               POS=(5,16) 
* GROUP.FIELDA
FIELDA2 DFHMDF LENGTH=7,                                               -
               POS=(5,31) 
        DFHMSD TYPE=FINAL
        END

Once you have created a two-dimensional group array you cannot change the way the array is arranged. Look at the SDF properties for one of the fields and ensure that the Vertical Array check box is grayed out.

You cannot have a BMS group within an SDF group unless it is the only item in the group.

1.3 How the Painter Handles Comments in BMS Macros

The painter can recognize several types of comment embedded in the BMS macros. These comments are generated in the BMS macros by products such as IBM SDF and SDF II, and are used to specify long names for COBOL fields that are generated in the copybook (.cpy file). The painter also uses a special comment type that is used for fields that are repeated vertically or horizontally.

It is important to know what type of comments are embedded in your BMS macros before you try to import them into the painter. If you specify the wrong type, you might encounter problems because certain fields are not imported properly.


Note: The painter only processes SDF comments and ignores any incidental comments that are embedded in the BMS source. Incidental comments are those that are for documentation and are not related to COBOL field names as described above. These incidental comments are ignored during BMS import and are not regenerated in the output BMS produced by the BMS screen painter.


The comment formats that the painter can handle when the Enable SDF features check box is selected on the BMS build settings are as follows:

* 'COBOL-Name'                
    DFHMDF POS=
* COBOL-Name                  
    DFHMDF POS=
* Group-Name.COBOL-name          
    DFHMDF POS=
* 'Group-Name.COBOL-Name'    
    DFHMDF POS=

1.4 Handling Conditional Assembler Statements in BMS Source Files

BMS source files that contain conditional Assembler statements (for example .LOOP) cannot be read by Mainframe Express. However, if you have purchased the Assembler Option for Mainframe Express, you can convert the BMS files containing conditional Assembler statements to BMS files that can be read by Mainframe Express.

To generate BMS source code that can be read by Mainframe Express, from BMS source code containing conditional Assembler statements:

  1. Click on Mainframe Express Command Prompt from the Start menu.

  2. Go to the directory containing the BMS source code that uses conditional Assembler statements.

  3. Set the SYSLIB environment variable to a path which does not contain the dfh*.mac files.

  4. Type the following command:
    RUN MM370ASM filename.bms BAL NOASM
    This creates a file (named filename.bal) in the current directory.

  5. Rename, delete or move filename.bms.

  6. Rename filename.bal as filename.bms.

You can now open filename.bms in Mainframe Express.


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

Developing CICS ApplicationsNext"