3270 or SLU 2 screen formatting
MFS is designed to transmit only required data to and from the 3270 display device. Device orders to establish fields and display literals can cause significant transmission time, because there can be more orders and literal data than program data.
Under normal operation, when the format to be displayed already exists on a device, only user-supplied data from the message and modifiable field attributes are transmitted. The current format on the device is determined by the device output format name, the DPAGE within the format, and the physical page within the DPAGE. The following conditions cause MFS to perform a full format operation (device buffer erased and all fields and literals are transmitted) for device output:
- The device output format changes.
- The DPAGE changes within a device output format.
- The physical page number changes.
- The operator presses the CLEAR key.
- The operator presses the CLEAR PARTITION key, which causes a full format write to the cleared partition.
- DSCA option of the DEV statement requests format write.
- SCA field in the output message requests format write.
- The MFS bypass has been used.
- Terminal has been stopped as a result of a permanent I/O error. The screen is cleared and the next output is a full format operation.
- The operator uses the operator identification card reader. The screen is cleared and the next output is a full format operation.
A full format operation must be carefully planned. Several factors can result in undesirable screen displays, program input, or both:
- If the program depends upon the existence of data in non-literal
fields and does not include this data in the output message, the data
might not be on the screen when the device receives the output message.
Several actions can cause this to occur:
- The terminal operator pressing the CLEAR key
- A device error
- Another message sent to the device before the response
- An IMS restart
- If the program sends only part of an output field, data that already
exists in the non-literal fields can cause confusion. If a partial
field is transmitted to a filled-in field, any modification of the
field causes the old data remaining in the field to be included in
the new input. Use the PT (program tab X'05') as a fill
character on the DPAGE statement to solve this problem. If the PT
fill character is specified, message data fields (and message literal
fields) that are to be transmitted are followed by a program tab order
if the data does not fill the device field. This clears the remainder
of the device field to nulls.
When a program sends only a few of the output data fields on a given display screen, it might be desirable to clear all the unprotected filled-in fields first. The unprotected fields can be cleared by specifying the
erase all unprotected
option in the application program output with the system control area (SCA) operand of the MFLD statement or the default SCA (DSCA) operand of the DEV statement. - Pre-modified attributes can be requested by the application program to ensure input of field data. If pre-modified attributes are requested and the message was completely transmitted to the device and not operator logically paged, then a device error, or IMS restart, prevents input. This error occurs because the screen is not reestablished with the message when the terminal is started or IMS is restarted.
- If dynamic attribute modification is specified for a device field
with predefined attributes, an attribute is sent to the device for
that field in every output operation, even if the data for this device
field is not included in the output message. These attributes are
used:
- If the output message field has an attribute and the attribute is valid, then the dynamic attribute modification is performed.
- If the message field is not included in the LPAGE being used or the attribute is not valid, the predefined attribute for the device field is used.
- Use a common device format for as many applications as possible. Reducing the number of full format operations can significantly reduce response time. Format block pool requirements are reduced as well as message format buffer pool I/O activity.
- Allow MFS to determine when a format operation is required. This results in transmission time savings when formatting is not required.
- Ensure that the application program output message contains all non-literal data required by the device operator. Do not rely on previous data remaining on the device.
- Use the PT fill option to ensure that fields on the device that receive program output data contain only data from the message.
- Use the erase all unprotected option of the SCA or DSCA if the application requires that unprotected fields be cleared.
Two MFS facilities are available for controlling format operations. Both the system control area (SCA) of the message field and the default SCA (DSCA) option of the DEV statement provide the ability to cause IMS to force a reformat or to erase all unprotected fields or all partitions before transmitting output. The force format write option causes the device buffer to be erased, all fields to be established, and all literals to be transmitted. The erase all option causes all unprotected fields or all partitions to be cleared to NULLs before data is written.