Affichage de Break-Message - Break-message showing

page d'accueil
Boite à outils

Cette page a été mise à jour le 20 janvier 2009
Contact

Welcome page
Tools box

Versionning 

last version : The SaveFiles

Pour obtenir l'affichage des Break Messages sur la ligne de statut, et sans avoir à appuyer à chaque fois sur la touche entrée ... donc sans perdre la saisie anticipée il faut

  1. avoir l'affichage des Break Messages (dans le profil utilisateur) 
  2. détourner l'affichage standard des break messages au profit du programme ci-après

JPLBRKMSG  Programme d'affichage des BreakMessages

  • sur fonds rouge si c'est grave (code couleur 29)
  • sinon sur fonds vert (code couleur 21)
To get the display of the break messages on the status line, and without having to push each time on the entered key... without losing the anticipated keying it is necessary 
  1. to have the display of the break Messages (in the user profile)  
  2. to divert the standard display program for break messages to the profit of the program hereafter

JPLBRKMSG Programme for displaying Break Messages 

  • on red background if it is serious (code color 29) 
  • otherwise on green background (code color 21)

             PGM        PARM(&MSGQ &LIB &MSGKEY)
             DCL        VAR(&MSGQ) TYPE(*CHAR) LEN(10)
             DCL        VAR(&LIB) TYPE(*CHAR) LEN(10)
             DCL        VAR(&MSGKEY) TYPE(*CHAR) LEN(4)
             DCL        VAR(&MSG) TYPE(*CHAR) LEN(132)
             DCL        VAR(&SEV) TYPE(*DEC) LEN(2 0)
             DCL        VAR(&RTNTYPE) TYPE(*CHAR) LEN(2)
             DCL        VAR(&X21) TYPE(*CHAR) LEN(1) VALUE(X'21')
             DCL        VAR(&X29) TYPE(*CHAR) LEN(1) VALUE(X'29')
             RCVMSG     MSGQ(&LIB/&MSGQ) MSGKEY(&MSGKEY) RMV(*NO) +
                          MSG(&MSG) SEV(&SEV) RTNTYPE(&RTNTYPE)
             IF         COND(&RTNTYPE *GE '05') THEN(DO)
             DSPMSG
             GOTO       CMDLBL(FIN)
             ENDDO
             IF         COND(&SEV >= 40) THEN(DO)
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&X29 +
                          *CAT &MSG) TOPGMQ(*EXT) MSGTYPE(*STATUS)
             ENDDO
             ELSE       CMD(DO)
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&X21 +
                          *CAT &MSG) TOPGMQ(*EXT) MSGTYPE(*STATUS)
             ENDDO
FIN:         ENDPGM

Programme pour détourner les break messages, à ajouter dans le programme initial du profil utilisateur

CLP INLPGM

program to divert the standard display program, to add to the user initial program (in the user profile)
             PGM
CHGMSGQ MSGQ(*USRPRF) PGM(JPLBRKMSG)
MONMSG MSGID(CPF2451)
CHGMSGQ MSGQ(*WRKSTN) PGM(JPLBRKMSG)
MONMSG MSGID(CPF2451)
ENDPGM
activation activation
CHGUSRPRF ... INLPGM(*LIBL/INLPGM)

The source code is provided as an open source tool under the GNU General Public License, version 2.  In summary, this license specifies: