Hi every body, I try to implement a command line at the bottom of a display very much like the one you can have using UIM (see PDM ?). My problem is that I can not use UIM because the programs all ready exist and that the old method that I used just doesn't work. This strange problem may be related to my misunderstanding of how message queues works with ILE actually our program are mostly written in ILE RPG. To try to retrieve the command I use a CL program to receive the message for the *EXT program queue. The CL program is : /* Extract previous command from PGMQ*/ PGM PARM(&TYPE &KEYVAR &MSGTXT &REL &PGMQ) DCL VAR(&TYPE) TYPE(*CHAR) LEN(6) DCL VAR(&KEYVAR) TYPE(*CHAR) LEN(4) DCL VAR(&MSGTXT) TYPE(*CHAR) LEN(160) DCL VAR(&REL) TYPE(*CHAR) LEN(5) DCL VAR(&PGMQ) TYPE(*CHAR) LEN(10) DCL VAR(&RTNTYP) TYPE(*CHAR) LEN(2) IF COND(&KEYVAR *EQ ' ') THEN(DO) IF COND(&REL *EQ '*EXT ') THEN(DO) RCVMSG PGMQ(&REL) MSGTYPE(*LAST) RMV(*NO) KEYVAR(&KEYVAR) MSG(&MSGTXT) RTNTYPE(&RTNTYP) ENDDO ELSE CMD(DO) RCVMSG PGMQ(&REL &PGMQ) MSGTYPE(*LAST) RMV(*NO) KEYVAR(&KEYVAR) MSG(&MSGTXT) RTNTYPE(&RTNTYP) ENDDO ENDDO RCV: IF COND(&RTNTYP *NE '08' *AND &RTNTYP *NE '10') THEN(DO) IF COND(&REL *EQ '*EXT') THEN(DO) RCVMSG PGMQ(&REL) MSGTYPE(*PRV) MSGKEY(&KEYVAR) RMV(*NO) KEYVAR(&KEYVAR) MSG(&MSGTXT) + RTNTYPE(&RTNTYP) MONMSG MSGID(CPF0000) ENDDO ELSE CMD(DO) RCVMSG PGMQ(&REL &PGMQ) MSGTYPE(*PRV) MSGKEY(&KEYVAR) RMV(*NO) KEYVAR(&KEYVAR) + MSG(&MSGTXT) RTNTYPE(&RTNTYP) MONMSG MSGID(CPF0000) ENDDO IF COND(&KEYVAR *EQ ' ') THEN(GOTO CMDLBL(EXIT)) GOTO CMDLBL(RCV) ENDDO EXIT: ENDPGM Which run just fine with a OPM program but not with my RPG ILE version. I will really appreciate any help or idea thanks. ;-)

Reply With Quote