RPGIV @ Work

A unique site for RPG and System i Lovers


Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

QUILNGTX API Usage Print E-mail
User Rating: / 0
Written by Chamara Withanachchi   


I wanted to have an easy way to pop-up a message to inform users of something going on. I used the QUILNGTX API

Bellow is the API description in IBM

Required Parameter Group:

1 Text string Input Char(*)
2 Length of text string Input Binary(4)
3 Message ID Input Char(7)
4 Qualified message file name Input Char(20)
5 Error code I/O Char(*)

 Default Public Authority: *USE

 Threadsafe: No

The Display Long Text (QUILNGTX) API displays a pop-up window containing the string of text that is passed to it.

This API may not be used to display text that is bidirectional right to left.

Required Parameter Group

Text string

The text string that is to be displayed in a pop-up window.

Length of text string

The length of the text string, in bytes. The value must be greater than zero and less than or equal to 15 728 640.

Message ID

The specified message ID of the panel title text that will be retrieved. If the message ID is not found in the specified message file, the message ID will be displayed at the top of the panel as the title. If the message ID is blank, the title for the panel is blank.

Qualified message file name

The name of the message file containing the message ID. The first 10 characters contain the name of the *MSGF object, and the second 10 characters contain the name of the library in which the message file resides. If the message file and library name are left blank, the program uses the default QCPFMSG message file in *LIBL. You can use the special value *LIBL for the library name.

Error code
I/O; CHAR(*)

The structure in which to return error information.

Example Code:

 D QUILNGTX        PR                  ExtPgm('QUILNGTX')
 D   text                     65535a   const options(*varsize)
 D   length                      10i 0 const
 D   msgid                        7a   const
 D   qualmsgf                    20a   const
 D   errorCode                32783a   options(*varsize)

 D ErrorNull       ds                  qualified
 D   BytesProv                   10i 0 inz(0)
 D   BytesAvail                  10i 0 inz(0) 
      msg = 'My sample Message to user'; 
      QUILNGTX( msg
               : %len(msg)
               : ' '
               : ' '
               : ErrorNull );
     *inlr = *on; 



<Previous   Next>