Defining forms for IMS programs

EGL generates your FormGroup parts into IMS™ Message Format Services (MFS) maps. Each form that you define for use in the IMS environment must provide space for the following:

You can define the 8-byte constant field with the protect and dark attributes. The attribute byte on the form becomes the attribute byte in the EGL-generated MFS map. The 8-byte constant contains the name of the IMS transaction that is started when the form is processed. Specifying the constant on the form enables the user to specify the IMS /FORMAT command to display a formatted screen to start a transaction. Do not use the /FORMAT command if variable fields on the form have initial default values. If the /FORMAT command is used, the default values do not appear.

If you do not define an 8-byte, protected, dark constant on the form, EGL searches for any string of 9 blanks on the form and sets this area aside as a protected, dark variable field (1 byte attribute, 8 bytes of data) in the generated MFS map. The generated program uses this field to store the name for the next IMS transaction to be run after a converse statement, or after a transfer statement of the form transfer to a transaction that includes a map. The user cannot use the /FORMAT command to start a transaction for these maps because IMS does not have a default transaction name.

You do not need to explicitly define the 2-byte area on a form. EGL selects two adjacent blank bytes on the map and treats it as a protected, dark variable field (1 byte attribute, 1 byte of data).

Estimating the size of MFS blocks for a formGroup

When EGL generates a formGroup, it generates the MFS control blocks for that formGroup. There are three types of MFS control blocks:
Device input format (DIF) and device output format (DOF)
These control blocks describe the arrangement of data fields and literals in the device presentation space (for example, the screen for 3270 devices).

For 3270-type devices, a single set of statements describes both the DIF and the DOF. For printers, only a DOF is needed. Each device field is given a name that statements can refer to in the message input and output descriptors.

For EGL FormGroup parts, the DOF is always larger than the DIF because the DOF includes form constants.

Message output descriptor (MOD)
This control block describes the various fields of information in the output message inserted by the program. It also identifies corresponding device fields where the data for each message field is moved.
Message input descriptor (MID)
This control block describes the various fields of information in the input message retrieved by the program. The MID identifies the corresponding device field from which the data for each message field came.
MFS control blocks cannot exceed 32748 bytes. If you are using a large FormGroup part, the following formulas offer a guideline for estimating an upper limit for the size of the control blocks that will be generated. Using these formulas during your design helps you determine whether your FormGroup parts should be split into smaller ones. If a generated control block is too large, MFS generation issues a 3022 abnormal termination.

Calculating the DOF size for display devices

The following formula helps you estimate the size of the DOF:

DOF Size = 
    150 
  + 388 * Number of printer forms in the formGroup
  + 208 * Number of display forms in the formGroup
  +  63 * Number of variable field occurrences on display 
          forms in the formGroup
  +  62 * Number of constant fields on display forms in the 
          formGroup
  +1.12 * Total length of all constant fields on display forms 
          in the formGroup 

Calculating the DOF size for printer devices

The following formula helps you estimate the size of the DOF:
DOF Size = 
    206
  +  68 * Number of printer forms in the formGroup
  + 374 * Number of display forms in the formGroup
  +  63 * Number of variable field occurrences on printer
          forms in the formGroup
  +  62 * Number of constant fields on printer forms in the 
          formGroup
  +1.12 * Total length of all constant fields on printer forms 
          in the formGroup

Calculating the MOD size for all forms

The following formula helps you estimate the size of the MOD:
MOD Size = 
     36 
  + 724 * Number of display forms in the formGroup
  + 202 * Number of printer forms in the formGroup
  +  52 * Number of variable field occurrences in the formGroup

Calculating the MID size for terminal maps

The following formula helps you estimate the size of the MID for terminal maps:
MID Size = 
     36
  + 858 * Number of display forms in the formGroup
  +  52 * Number of variable field occurrences for display 
          forms in the formGroup

Related concepts
IMS runtime support

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.