General format of input function management headers (SLU P)
IMS transactions, message switches, and commands are in the standard IMS format (transaction code, logical terminal name, or command verb, followed by a blank and text).
If a message is in nonstandard format, MFS or a Physical Terminal Input edit routine can be used to edit the message into the standard format. The first or only transmission of IMS transactions can have a variable-length FM header. If MFS is not defined for the terminal, the header is ignored. If MFS is defined, the header can contain either an MFS control request or optional MFS fields used to invoke MFS formatting. IMS uses the header in these cases, but removes it before passing the message on to the MPP or MFS. Incorrect header specifications or formats can cause the session to terminate. SLU P uses header type X'42'.
- Byte 0
- Header length including the length byte in binary (first byte)
- Byte 1
- Header type (must be X'42')
- Byte 2
- Message descriptor 1 (flag byte is binary)
- Byte 3
- Message descriptor 2 (flag byte is binary)
- Byte 4
- Input component identification (binary)
Optional MFS fields:
- Bytes 5 and 6
- Version ID (in binary) if bit 0 of byte 3 is on.
- Bytes 7-15
- MID name length, including length byte (1 byte), followed by the MID name (1 to 8 bytes). If bit 0 of byte 3 is off (version ID not included in the FM header), the MID name length and the MID name are in bytes 5 through 13.
- Bytes 3-13
- MID name length (in binary), including length byte (1 byte), followed by the MID name (1 to 8 bytes).
When IMS receives a message with a header, it determines the length of the message. If the message length is 5 bytes, IMS assumes that the message is an MFS control request. The specific MFS control request is indicated in message descriptor 1 (byte 2). If the message length is more than 5 bytes, IMS examines the message description bytes to determine whether an MFS version ID and a MID name are present. When both are present, the version ID must immediately precede the MID name length. (Version ID does not exist for SCS1.) The format description specified by the MID name is used to format the accompanying input message, and the version ID is used to validate the format description level. If no FM header is provided, no version ID is provided, or a version ID of zero is provided, MFS bypasses the validity check on the format description level.