SFLMSGRCD (Subfile Message Record) keyword for display files

Use this record-level keyword on the subfile record format to specify that this subfile is to be a message subfile and that the records displayed when the subfile is displayed are to be messages from a program message queue.

The format of the keyword is:
SFLMSGRCD(line-number)

The parameter value specified with SFLMSGRCD specifies the first line on the display on which messages are displayed. The value specified must not be greater than the maximum line number for the display size being used. The number of messages displayed depends on the SFLPAG value specified for the subfile.

For more information about building and displaying message subfiles, see the SFLPGMQ (Subfile Program Message Queue) keyword for display files topic.

The TEXT keyword is valid at the record-level for SFLMSGRCD.

There can be only two predefined fields specified on the subfile record format for a message subfile as follows:
  • Message identifier. A 4-position, character data type, hidden field. Your program uses this field to pass a message identifier to the i5/OS™ operating system. This field must always be the first field defined in the message subfile. You must specify the SFLMSGKEY keyword with this field.
  • Program queue name. A 10-position, character data type, hidden field. Your program passes the name of the program message queue that contains the messages in this field. It must be the second field of a subfile message record and must immediately follow the first field. If specified also on the subfile control record, it can be anywhere within the record specification. You must specify SFLPGMQ with this field.

Display size condition names can be specified for SFLMSGRCD and are required if the line number for the first message displayed is to change, based on display size.

Data is not returned in your input buffer if your program does an input operation for a message subfile.

The messages are displayed as follows:
  • Each message is displayed on a separate line and is truncated if it is longer than the display line length.
  • Each message starts in position 2. The maximum message length for the 24 x 80 display size is 76 characters. The maximum message length for the 27 x 132 display size is 128 characters.
  • Each message is displayed with the high intensity (HI) field attribute.

When a message subfile is paged through the i5/OS operating system, the cursor is positioned at the same location as it was when the Page key was pressed.

Message help is supported for these messages. The workstation user chooses which message help is to be displayed by placing the cursor on the line containing the message and pressing the Help key.
Notes:
  1. When SFLMSGRCD is specified, you cannot specify the SFLINZ keyword without specifying SFLPGMQ.
  2. The message subfile, starting on the line specified on SFLMSGRCD, must not overlap any displayable fields in the subfile control record, even if option indicators are specified on the displayable fields.

Option indicators are not valid for this keyword; display size condition names are valid.

Example

The following example shows how to specify the SFLMSGRCD keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00030A          R RCDMSG                    SFL SFLMSGRCD(3)
00040A            FLDKEY                    SFLMSGKEY
00050A            FLDPGM                    SFLPGMQ
00060A          R SFLCTL                    SFLCTL(RCDMSG)
00070A                                      SFLPAG(17)
00080A                                      SFLSIZ(17)
00090A                                      SFLDSP SFLDSPCTL
     A

The highlighted keywords are required on the subfile record format for a message subfile. The SFLMSGKEY and SFLPGMQ keywords must be specified in the order shown.

Related reference
SFL (Subfile) keyword for display files
SFLCTL (Subfile Control) keyword for display files
SFLINZ (Subfile Initialize) keyword for display files