Message box

Use UIM API QUILNGTX to display a message in a window. Create a command "wrapper" to make it easier to use in CL programs.


Here's a sample CL call:

CALL PGM(QUILNGTX) PARM(
'Hello, world!' 
X'0000000D' 
'       ' 
'                    ' 
X'00000000')


Here's the command source:

/* CRTCMD CMD(MSGBOX) PGM(QUILNGTX) */ 
CMD        PROMPT('Message box')                       
PARM       KWD(MSG) TYPE(*CHAR) LEN(1024) MIN(1) +     
             PROMPT('Message')                         
PARM       KWD(MSGLEN) TYPE(*INT4) CONSTANT(1024)      
PARM       KWD(MSGID) TYPE(*CHAR) LEN(7) CONSTANT(' ') 
PARM       KWD(MSGF) TYPE(*CHAR) LEN(20) CONSTANT(' ') 
PARM       KWD(APIERR) TYPE(*INT4) CONSTANT(0)         

And an example of running the command:

MSGBOX MSG('Hello, world!')

This was first published in February 2001

Dig deeper on RPG iSeries programming

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close