Output format control for SLU P DPM-An
For SLU P devices with the DPM-An option, You can use several specifications in MFS to control the format of output messages.
The RCDCTL= operand of the DIV and RCD statements identifies a related group of device field (DFLD) definitions that are within one record, which is usually sent to a remote program as one transmission (that is, if the RCDCTL= value is less than or equal to the value in the OUTBUF= parameter of the system definition TERMINAL macro).
The number of device fields in the record is determined by the length (numeric value) specified in RCDCTL. Device fields can be arranged in records through the RCD statements. The records created can be smaller than the size specified in RCDCTL. The SPAN/NOSPAN parameter determines whether fields are allowed to span record boundaries. All output messages are sent in record mode.
The PPAGE statement identifies a presentation page of a device format and can contain one or more records.
The DPAGE statement defines a logical page of a device format and can contain one or more records.
Paging
- MSG
- This specifies that all the data in the output message is to be
transmitted together to the remote program in one chain. This is the
default.
After transmitting the message to the remote program, IMS does not transmit another output message if PROGRAM2 has been specified as the media parameter of the COMPTn operand of the system definition TERMINAL macro. An input request is required from the remote program before the next message is sent. If PROGRAM1 is specified, IMS does not wait for an input request, but sends another output message if one is available.
- DPAGE
- This specifies that all the data in the logical page is to be transmitted together to the remote program in one chain. A paging request is required from the remote program to retrieve the next logical page of the output message.
- PPAGE
- This specifies that all the data in the presentation page is to be transmitted together to the remote program in one chain. A paging request is required from the remote program to retrieve the next presentation page of the output message.
A paging request can be specified through the input message header or through an operator control table. For OPTIONS=DPAGE or PPAGE, when the last logical or presentation page has been sent to the remote program, IMS MFS action is the same as for 3270 and 3604 devices regardless of PROGRAM1 or PROGRAM2 specification.
Each chain contains an output message header. The DATANAME in the output message header is the format name if OPTIONS=MSG is specified, the current name of the device logical page (DPAGE) if OPTIONS=DPAGE is specified, or the current name of the presentation page if OPTIONS=PPAGE is specified.
The output message header is always present in the first transmission record of the chain. For OPTIONS=MSG, the first transmission record contains only the output message header, and the next transmission begins the data for the message.
For OPTIONS=DPAGE or PPAGE, the data follows the output message header in the first transmission record if either of the following occurs:
- RCDCTL=(,SPAN) is specified, and the RCDCTL length is greater than the output message header length.
- RCDCTL=(,NOSPAN) is specified, the RCDCTL length is greater than the output message header length, and at least the first data field defined in the current DPAGE or PPAGE can be fully contained within the first transmission record.
Output message header
The basic output message header contains the following MFS fields, presented in this sequence:
- VERSION ID
- MIDNAME
- DATANAME
DATANAME is the FMT label for OPTIONS=MSG, the DPAGE label for OPTIONS=DPAGE, and the PPAGE label for OPTIONS=PPAGE.
If a forms literal is specified in the DEV statement, the FORMSNAME field is present in the output message header. For OPTIONS=MSG the FORMSNAME is present in the basic header after the DATANAME. For OPTIONS=DPAGE OR PPAGE, an optional forms output message header precedes the basic output message header. It contains the following fields:
- MIDNAME
- FORMSNAME
The forms header is sent to the remote program as the only element of a chain. A paging request is required after the header has been processed and the remote program is ready to process the first logical or presentation page of an output message.
The length of the output message header can be defined in the HDRCTL= operand of the DIV statement as fixed or variable.
The length of the fixed basic output message header (without FORMSNAME) is 23 bytes for OPTIONS=MSG and 25 bytes for OPTIONS=DPAGE or PPAGE. If FORMSNAME is present, the maximum length of the basic output message header for OPTIONS=MSG is 40 bytes, and the maximum length for OPTIONS=DPAGE or PPAGE is 33 bytes.
- If HDRCTL=FIXED is specified, the MIDNAME and DATANAME fields are always padded with blanks to the maximum definable length: MIDNAME to 8 bytes (if MIDNAME is not supplied, 8 blanks are presented), FMT name to 6 bytes, and DPAGE or PPAGE name to 8 bytes. For this reason, the position of the DATANAME is always at the same displacement in the basic output message header, and the FORMSNAME, if present, is always at the same displacement, following the FMT name if OPTIONS=MSG and following the MIDNAME if OPTIONS=DPAGE or PPAGE.
- If HDRCTL=VARIABLE is specified, neither MIDNAME nor DATANAME is padded. If MIDNAME is less than 8 bytes or is not present, the position of the DATANAME, FORMSNAME, or both within the output message header is variable.
The following table shows the format of the fixed output message header for OPTIONS=MSG.
| Type of Field Type | Base DPM-An Header With Length | Length of MIDNAME Plus 1 | Default MIDNAME | Length of Format Name | Data Fields Format Name | Length of Forms Literal Plus 1 | FORS= Parameter Literal |
|---|---|---|---|---|---|---|---|
| FIELD BYTES | BASE 7 | LI 1 | MIDNAME 8 | L2 1 | DATANAME 6 | L3 1 | FORMSNAME (user-coded literal) |
- BASE
- The base DPM-An output header with a length of 7 bytes, including the version ID.
- L1
- The full length of the MIDNAME plus 1. Contains the value 9.
- MIDNAME
- Contains the MIDNAME to be used for input. If this name is less than 8 characters, it is padded with blanks to a full 8 bytes. If the MIDNAME is not specified, this field contains 8 blanks.
- L2
- The full length of the format name (DATANAME) plus 1. Contains the value 7.
- DATANAME
- The name of the format that was used to format the data fields. If the format name specified is less than 6 characters, it is padded to a full 6 bytes.
- L3
- Contains the length of the forms literal plus 1. The maximum value is 17.
- FORMSNAME
- Contains the literal specified in the FORS= parameter of the DEV statement. It can have a length of 1-16 bytes. If FORS= is not specified in the DEV statement, the L3 and FORMSNAME fields are not included in the output message header.
If a variable output message header is specified in the HDRCTL= operand of the DIV statement, the output message header for OPTIONS=MSG will have the same format, but MIDNAME and DATANAME will have trailing blanks omitted and their length fields adjusted accordingly. If MIDNAME is not used, neither the MIDNAME field nor its length is present.
The following table shows the format of the fixed basic output message header (without FORMSNAME) for OPTIONS=DPAGE or PPAGE.
| Type of Field Type | Base DPM-An Header With Length | Length of MIDNAME Plus 1 | Default MIDNAME | Length of Format Name | Data Fields Format Name |
|---|---|---|---|---|---|
| FIELD BYTES | BASE 7 | L1 1 | MIDNAME 8 | L2 1 | DATANAME 8 |
- BASE
- Content is the same as for OPTIONS=MSG.
- L1
- Content is the same as for OPTIONS=MSG.
- MIDNAME
- Content is the same as for OPTIONS=MSG.
- L2
- This is the full length of the DPAGE or PPAGE name (DATANAME plus 1). Contains the value 9.
- DATANAME
- Contains the name of the DPAGE or PPAGE that was used to format the data fields for the current logical or presentation page. If the DPAGE or PPAGE name specified is less than 8 characters, it is padded with blanks to the full 8 bytes.
The following table shows the format of the optional forms output message header for OPTIONS=DPAGE or PPAGE.
| Type of Field Type | Base DPM-An Header With Length | Length of MIDNAME Plus 1 | Default MIDNAME | Length of Format Name | Data Fields Format Name |
|---|---|---|---|---|---|
| FIELD BYTES | BASE 5 | L1 1 | MIDNAME 8 | L2 1 | FORMSNAME (user-coded literal) |
- BASE
- The base of the optional forms output message header does not include a version ID.
- L1
- Contains the value 9.
- MIDNAME
- Content is the same as for OPTIONS=MSG.
- L3
- Contains the length of the coded forms literal plus 1.
- FORMSNAME
- Contains a user-coded literal, as in the fixed output message header for OPTIONS=MSG.
Naming conventions
Establish naming conventions for formats, device logical pages, and presentation pages (that is, for the labels of the FMT, DPAGE, and PPAGE statements). For example, you can establish conventions for FMT, DPAGE, and PPAGE names that allow the remote program to interpret them in terms of 3790 panels or functional program subroutines. Also standardize DPM-An output message headers.
User-written labels for PPAGE statements must be unique within a format definition. It is recommended that labels also be unique within the IMS system.
If OPTIONS=PPAGE has been selected for a format definition, the PPAGE label is sent as the DATANAME in the output message header. The label should give the remote program information that can be used in deciding how to process the data. When you have not coded a label for a PPAGE, MFS generates a label for it and sends this generated name in the output message header. The MFS-generated names can be used by the remote program, but leaving the label specification up to MFS is not recommended, because the generated name for a given PPAGE can change every time the MFS definitions are recompiled.
Deletion of null characters in DPM output records
See the discussion of FILL=NULL in the DPAGE statement in IMS Version 15.3 Database Utilities for a discussion of deletion of null characters in transmission records.