Display Message Window

DspMsgWin

The DspMsgWin procedure display an impromptu (ad hoc) text string in a window.

The DspMsgWin procedure is used to display long text messages in a fixed-size window, to the end-user. The end-user may reply by press F12 or Enter. If the amount of text is greater than will fit on the display window, DspMsgWin will display a "more..." prompt allowing the end-user to use the roll/page keys to scroll through the message text.

  DspMsgWin(
  szMsgText        65535A   Const Varying
  szMsgID              7A   Const OPTIONS(*OMIT : *NOPASS )
  szMsgFile           21A   Const OPTIONS(*OMIT : *NOPASS )
)

See also: SndMsgID, SndMsg, SndStsMsg, GetMsgText, GetMsgInfo

Parameters

szMsgText 
[input VChar(64k) ]  The text to be displayed in the window. Any text up to 64k may be specified. Word wrap is automatically supported as well as scrolling to the next page of text when the length of the text exceeds the size of the window.
 
szMsgID [ optional ]
[input Char(7) ]  A message ID whose message text is to be used as a one-line title for the window containing the text. If no message ID is specified, the the first line of the window is blank. If a message ID is specified, then that message ID's text is display as high intensity (white) text on the first line of the message window.
 
szMsgFile  -  [ optional ] DFT('QCPFMSG')
[input Char(21) ]  Any qualified message file. If this parameter is not specified, QCPFMSG in *LIBL is used unless szMSGID is blank in which case, not message file is used.
 
This parameter consists of two parts (1) in the first 10 positions, the name of the message file, and (2) in the second 10 positions, the name of the library containing the message file or *LIBL. For example:
 
 *...v....1....v....2
'QCPFMSG   *LIBL     '
 

An alternative syntax is also supported for this object name. The alternate syntax allows you to specify the object name similar to that of an OS/400 CL command, that is it may be qualified using qualified name syntax, as follows:

 *...v....1....v....2
'QSYS/QCPFMSG        '
 

Return Value

This procedure does not return a value.

Remarks

     C                   callp      DspMsgWin('Licensed materials. +

     C                                  Program copyright 2004 by +

     C                                  Robert Cozzi, Jr. All rights +

     C                                  reserved.')

In this example the text is displayed in a window to the end-user with a blank title line.