SFLMSGRCD (Subfile Message Record) keyword for display files
You 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 messages from a program message queue.
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 SFLPGMQ (Subfile Program Message Queue) keyword for display files.
The TEXT keyword is valid at the record-level for SFLMSGRCD.
- Message identifier. A 4-position, character data type, hidden field. Your program uses this field to pass a message identifier to the IBM® i 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.
- 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 IBM i operating system, the cursor is positioned at the same location as it was when the Page key was pressed.
- When SFLMSGRCD is specified, you cannot specify the SFLINZ keyword without specifying SFLPGMQ.
- 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.