Example: A message subfile using DDS
This example shows how to define a message subfile. The display shows the message subfile.
MESSAGE SUBFILE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The following keywords are important in the example:
SFLMSGKEY
SFLPGMQ
SFLMSGRCD
Records in the subfile are messages from a message file.
Figure 1. Message subfile
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A*
00020A* MESSAGE SUBFILE
00030A*
00040A R SFLR SFL
00050A SFLMSGRCD(3) (1)
00060A MSGKEY (2) SFLMSGKEY (2)
00070A PGMQ (2) SFLPGMQ (2)
A
00080A R STLCTLR SFLCTL(SFLR)
00090A SFLSIZ(12) (3)
00100A SFLPAG(6) (3)
00110A 01 SFLDSP
00120A 02 SFLDSPCTL
00130A 03 SFLCLR
00140A 04 SFLEND (3)
A
A
00150A 1 32'MESSAGE SUBFILE'
A
Legend:
- (1)
- Specifying the SFLMSGRCD keyword on the subfile record format identifies this subfile as a message subfile. The parameter value specified causes the subfile to appear on line 3 of the display.
- (2)
- The fields MSGKEY and PGMQ are user-defined names given to the two fields
required for the subfile record format for a message subfile. The only specifications
allowed for them are their names and the SFLMSGKEY and SFLPGMQ keywords, in
the order shown.
This subfile is built by a series of output operations to SFLR that place messages in the subfile as subfile records. Messages are truncated to fit single lines (76 characters or 128 characters, depending on display size), and second-level help is available. This subfile is displayed by an output operation to SFLCTLR with option indicator 01 set on.
- (3)
- This subfile is paged by the IBM® i operating system when the display station user presses a Page Up or a Page Down key. The SFLEND keyword allows the IBM i operating system to display a plus sign whenever the subfile can be paged up.