Por si a alguien le interesa, adjunto una soluci�n que he encontrado en 
una web dedicada al AS/400.
Se trata de conseguir que los mensajes de interrupci�n aparezcan en la 
�ltima l�nea de la pantalla.

/* program to handle break messages */                     
 PGM        PARM(&MSGQ &MSGQLIB &MSGK)                      
                                                            
 DCL        VAR(&MSGQ) TYPE(*CHAR) LEN(10)                  
 DCL        VAR(&MSGQLIB) TYPE(*CHAR) LEN(10)               
 DCL        VAR(&MSGK) TYPE(*CHAR) LEN(4)                   
 DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(132)               
 DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7)                  
 DCL        VAR(&MSGF) TYPE(*CHAR) LEN(10)                  
 DCL        VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)               
 DCL        VAR(&MSGTXT) TYPE(*CHAR) LEN(132) 
                                                            
 /* receive the break message */                            
 RCVMSG     MSGQ(&MSGQLIB/&MSGQ) MSGKEY(&MSGK) RMV(*NO) +   
              MSGDTA(&MSGDTA) MSGID(&MSGID) MSGF(&MSGF) +   
              SNDMSGFLIB(&MSGFLIB) MSG(&MSGTXT)

IF         COND(&MSGID = ' ') THEN(DO)
/* if there's no msgid, use &msgtxt and CPF9897 */
/* to satisfy status message requirements */
CHGVAR     VAR(&MSGID) VALUE('CPF9897') 
CHGVAR     VAR(&MSGFLIB) VALUE('QSYS')  
CHGVAR     VAR(&MSGF) VALUE('QCPFMSG')  
CHGVAR     VAR(&MSGDTA) VALUE(&MSGTXT)  
ENDDO

 /* resend it as a status message */                        
 SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +            
              MSGDTA(&MSGDTA) TOPGMQ(*EXT) MSGTYPE(*STATUS) 
MONMSG     MSGID(CPF0000) 
ENDPGM                    

Give this program a meaningful name (perhaps something like MSGH, for 
message handler) and compile it using Create CL Program (CRTCLPGM) command.

Next, determine the name of your user profile's message queue. Your 
message queue is probably named the same as your user profile, because 
the default value for the MSGQ parameter of the Create User Profile 
(CRTUSRPRF) command is *USRPRF. If you're in doubt, use the Display User 
Profile (DSPUSRPRF) command to see what message queue you're using.

Every time you sign on, you have to tell the system that this program is 
going to handle break messages for your user profile's message queue. To 
do that, I added the following line to my initial program. I'm referring 
to the one specified in the INLPGM parameter of the Create User Profile 
(CRTUSRPRF) command.

CHGMSGQ    MSGQ(THOLT) DLVRY(*BREAK) PGM(MSGH)

If you don't have your own initial program, but have to share one with 
other people, maybe you could create your own initial program that 
changes the message queue and then calls the shared initial program.


_____________________________________________________
Forum.HELP400 es un servicio m�s de NEWS/400.
� Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_____________________________________________________

Para darte de baja, env�a el mensaje resultante de pulsar
mailto:[EMAIL PROTECTED]?body=LEAVE

Responder a