Use these record-level keywords on the subfile control record format to identify a message to be displayed on the message line when your program does an output operation to the subfile control record format.
Your program has the responsibility to reverse the images of any fields and to position the cursor appropriately in the subfile being displayed.
SFLMSG('message-text' [response-indicator])
SFLMSGID(msgid [library-name/]msg-file [response-indicator] [&msg-data])
Specify SFLMSG as you do the ERRMSG keyword. The parameters specify a message text and, optionally, a response indicator. The message text is the message to be displayed.
If you specify a response indicator, it should be the same as the option indicator used to condition SFLMSG. On the input operation that follows the display of the error message, the i5/OS™ operating system turns off the indicator. If the response and option indicators are the same, they are both turned off. One exception to this rule is that if the response indicator is also specified for another keyword, such as CHANGE, CAnn, or CFnn, the on/off setting of the response indicator is based on the results of the function provided by the CHANGE or CFnn keyword.
When a response indicator is specified, the first 50 characters of the message text are also used as indicator text. Separate response indicator text is not valid for SFLMSG.
Specify SFLMSGID as you do the ERRMSGID keyword.
The response indicator, if specified, should be the same as the option indicator used to condition the SFLMSGID keyword. On the subsequent input operation, after the display of the error message, the i5/OS operating system turns off the indicator. However, if the response indicator is also specified on another keyword, such as CHANGE, CAnn, or CFnn, the on/off setting of the response indicator is based on the results of the function provided by the CHANGE, CAnn, or CFnn keyword.
The msg-data field, if specified, contains the replacement text for the specified message. The field must exist in the record format, and the field must be defined as a character field (data type A) with usage P. For more information about how replacement text works, see the SNDPGMMSG (Send Program Message) command in the Control language topic in the Programming category of the iSeries™ Information Center.
The display of messages using SFLMSG and SFLMSGID is similar to the display of messages by the i5/OS operating system when field validation errors are detected. An important difference from ERRMSG and ERRMSGID is that the program, and not the i5/OS operating system, must position the cursor to the appropriate field within the subfile, reverse the image of that field within the subfile, and also optionally reverse the image of more than one field at a time. On the 5250 workstation, blinking cursor and message highlighting are allowed.
See the Restoration of reversed image fields section in the ERRMSG (Error Message) and ERRMSGID (Error Message Identifier) keywords for display files topic.
You can specify either SFLMSG or SFLMSGID several times for a single subfile control record format. In your program, set option indicators to select a particular message to be displayed and to select particular fields to be displayed in reverse image. Several fields can be displayed in reverse image in different records of a subfile when the subfile is displayed again. However, only one message can be displayed at one time.
If more than one error message is selected at a time, the i5/OS operating system displays the first of the following keywords:
Multiple subfile messages (SFLMSG and SFLMSGID) are allowed on error subfiles.
Option indicators are valid for these keywords.
The following example shows how to specify the SFLMSG and SFLMSGID keywords.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R SFLR SFL 00020A* 00030A* (at least one displayable field) 00040A* 00050A R SFLCTLR SFLCTL(SFLR) 00060A SFLPAG(17) 00070A SFLSIZ(17) 00080A SFLDSP SFLDSPCTL 00090A 11 SFLMSGID(USR0006 PAYROLL/UMSGF1 + 00100A 11 &RPLTXT); 00110A 12 SFLMSGID(USR0007 PAYROLL/UMSGEF1 + 00120A 12 &RPLTXT); 00130A RPLTXT 78A P A