PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Display message in color

View previous topic View next topic Go down

Display message in color

Post  maran on Mon May 13, 2013 6:58 pm

PGM PARM(&MSGID)
DCL VAR(&MSG) TYPE(*CHAR) LEN(78)
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&SEV) TYPE(*DEC) LEN(2)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(78)
DCL VAR(&BLUE) TYPE(*CHAR) LEN(1) VALUE(X'3A')
DCL VAR(&WHITE) TYPE(*CHAR) LEN(1) VALUE(X'22')
DCL VAR(&RED) TYPE(*CHAR) LEN(1) VALUE(X'28')
DCL VAR(&GREEN) TYPE(*CHAR) LEN(1) VALUE(X'40')
DCL VAR(&PINK) TYPE(*CHAR) LEN(1) VALUE(X'38')
DCL VAR(&TURQ) TYPE(*CHAR) LEN(1) VALUE(X'30')
DCL VAR(&YELL) TYPE(*CHAR) LEN(1) VALUE(X'32')
DCL VAR(&RIMG) TYPE(*CHAR) LEN(1) VALUE(X'21')
DCL VAR(&UNDER) TYPE(*CHAR) LEN(1) VALUE(X'24')
DCL VAR(&DELIM) TYPE(*CHAR) LEN(1) VALUE(X'20')
DCL VAR(&COLOR) TYPE(*CHAR) LEN(1)

RTVMSG MSGID(&MSGID) MSGF(QCPFMSG) MSG(&MSG) SEV(&SEV)

IF COND(&SEV = 00) THEN(CHGVAR VAR(&COLOR) +
VALUE(&WHITE))

IF COND(&SEV > 00) THEN(CHGVAR VAR(&COLOR) +
VALUE(&PINK))

IF COND(&SEV >= 30) THEN(CHGVAR VAR(&COLOR) +
VALUE(&YELL))

IF COND(&SEV >= 60) THEN(CHGVAR VAR(&COLOR) +
VALUE(&RED))

CHGVAR VAR(&MSGDTA) VALUE(' ' *CAT &COLOR *CAT &MSG)
CHGVAR VAR(&MSGDTA) VALUE(&MSGDTA *TCAT &DELIM)

SNDPGMMSG MSG(&MSGDTA)
ENDPGM
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum