WrkMsgs
From MidrangeWiki
Revision as of 05:20, 4 June 2014 by Houstonking (talk | contribs)
The following utility can be used to browse and edit iSeries message files.
CMD
/*============================================================================*/ /* Name...: WRKMSGS */ /* Version: n/a */ /* Purpose: Work with Message Descriuptions */ /* Summary: */ /* : 1) Call CL */ /* Params : */ /* : i_FILE : Message File name */ /* : i_LIB : Message File lib */ /* Useage : */ /* Compile: */ /* CRTCMD ??CMD(*LIBL/WRKMSGS) */ /* ??PGM(*LIBL/WRKMSGSC) */ /* ?*SRCFILE(*LIBL/QCMDSRC) */ /* ?*SRCMBR(WRKMSGS) */ /* ??REPLACE(*NO) */ /* Log....: */ /* 06AUG11 JK- Updated */ /* Notes..: */ /* COURTESY OF CLOVER BUSINESS ASSOCIATES LTD 1997 */ /*============================================================================*/ CMD PROMPT('Work with message descriptions') PARM KWD(FILE) TYPE(FILE) MIN(1) PROMPT('MESSAGE + FILE NAME (GEN*,*ALL)') FILE: QUAL TYPE(*GENERIC) LEN(10) SPCVAL((*ALL)) MIN(1) QUAL TYPE(*NAME) DFT(*LIBL) SPCVAL((*LIBL) + (*USRLIBL) (*ALLUSR) (*ALL)) + PROMPT('LIBRARY')
CL
/*=========================================================================== */ /* Name...: WRKMSGSC */ /* Version: n/a */ /* Purpose: Run test cases for EDP824D */ /* Summary: */ /* 1) Dump *MSGF to temp file */ /* 2) Run pgm */ /* Params.: */ /* : i_FILELIB : Message File */ /* Useage : */ /* Compile: */ /* CRTCLPGM ??PGM(R50MODS/*PGM) */ /* ?*SRCFILE(*LIBL/QCLSRC) */ /* ?*SRCMBR(WRKMSGSC) */ /* ??REPLACE(*YES) */ /* Log....: */ /* 2014May19 JK- Updated */ /* */ /*----------------------------------------------------------------------------*/ PGM (&FL) DCL &FL *CHAR 20 DCL &MSG *CHAR 80 DCL &MS *CHAR 7 DCL &SYSDTA *CHAR 750 /* /002 */ DCL &SYSVR *CHAR 6 /* /002 */ MONMSG CPF0000 EXEC(GOTO ERROR) /* Dump *MSGF to temp file */ DSPOBJD OBJ(%SST(&FL 11 10)/%SST(&FL 1 10)) + OBJTYPE(*MSGF) OUTPUT(*OUTFILE) + OUTFILE(QTEMP/QADSPOBJ) OVRDBF QADSPOBJ QTEMP/QADSPOBJ SECURE(*YES) SHARE(*NO) RTVDTAARA DTAARA(QSS1MRI) RTNVAR(&SYSDTA) /* /002 */ CHGVAR VAR(&SYSVR) VALUE(&SYSDTA) /* /002 */ /* Run pgm */ CALL WRKMSGSR (&FL &SYSVR) /* /002 */ RETURN ERROR: RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSG) MSGID(&MS) SNDPGMMSG MSGID(&MS) MSGF(QCPFMSG) MSGDTA(&MSG) + MSGTYPE(*ESCAPE) EOJ: ENDPGM