Display Long Text API

User interface API QUILNGTX (Display Long Text) provides an easy way to notify an interactive user from within an HLL program. The API displays a pop-up window containing a specified string of text. You supply a character string (up to 157,287,640 bytes long!), the string length, an optional message ID and message file name, and an API error parameter. The first-level text of the message identified by the message ID contains a panel title for your message display. If you leave the message ID parameter blank, the panel title will be blank. If you leave the message file name parameter blank, the message file defaults to QSYS/QCPFMSG.

For example, suppose an error condition occurs in a program, and you want to show the user some additional information about the error. You might want to describe the conditions that caused the error along with some recovery action. The following examples use message file UserMsg with message ID USR0001 for the panel heading. The first-level text for message ID USR0001 is “Invalid option selected.” Figure 9a shows a sample RPG program that uses API QUILNGTX to display an informational panel using this message ID. You can also call the API from a long command line, pressing Enter after keying the call statement. Figure 9b shows a sample command line call. For more information about API QUILNGTX, see the OS/400 User Interface APIs manual (SC41-5876).

Read the entire article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s