Difference between revisions of "WrkMsgs"
From MidrangeWiki
Houstonking (talk | contribs) |
Houstonking (talk | contribs) |
||
Line 90: | Line 90: | ||
== DDS == | == DDS == | ||
+ | <pre> | ||
+ | A*========================================================= | ||
+ | A*/ Name...: WRKMSGSD | ||
+ | A*/ Version: n/a | ||
+ | A*/ Purpose: Work with message files | ||
+ | A*/ Summary: | ||
+ | A*/ N/A : | ||
+ | A*/ Params.: | ||
+ | A*/ N/A : | ||
+ | A*/ LDA....: | ||
+ | A*/ N/A : | ||
+ | A*/ Compile: | ||
+ | A*/ CRTDSPF FILE(WRKMSGSD) | ||
+ | A*/ SRCFILE(QDDSSRC) | ||
+ | A*/ SRCMBR(WRKMSGSD) | ||
+ | A*/ REPLACE(*YES) | ||
+ | A*/ Notes..: | ||
+ | A*/ 1) This *pgm courtesy of CLOVER | ||
+ | A*/ Log....: | ||
+ | A*/ 2014May19 - Copied from archive | ||
+ | A*/========================================================= | ||
+ | A* INDARA IS REQUIRED FOR RETKEY/RETCMDKEY | ||
+ | A*%%EC | ||
+ | A DSPSIZ(24 80 *DS3) | ||
+ | A REF(*LIBL/QADSPOBJ) | ||
+ | A MSGLOC(23) | ||
+ | A INDARA | ||
+ | A PRINT(*LIBL/QSYSPRT) | ||
+ | A OPENPRT | ||
+ | A ERRSFL | ||
+ | *------------------------------------------------------------------------- | ||
+ | * PANEL 1 - LIST OF MESSAGE FILES | ||
+ | *------------------------------------------------------------------------- | ||
+ | A R WRKMSG01 PUTOVR | ||
+ | A 1 3'WRKMSGS.01' | ||
+ | A 1 20' WORK WITH MESSAGE DESCRIPTIONS ' | ||
+ | A DSPATR(RI) | ||
+ | A 1 60SYSNAME | ||
+ | A 1 72DATE OVRATR EDTCDE(Y) | ||
+ | A 2 72TIME OVRATR | ||
+ | A 2 26' MESSAGE FILES ' | ||
+ | A DSPATR(HI) | ||
+ | A 2 2'12-WORK WITH' | ||
+ | A 4 2' FILE LIBRARY TEXT - | ||
+ | A ' | ||
+ | A DSPATR(UL) | ||
+ | A R WRKMSGS1 SFL | ||
+ | A 25 SFLNXTCHG | ||
+ | A #SEL 2 B 5 2CHECK(AB) | ||
+ | A VALUES(' ' '12') | ||
+ | A 51 DSPATR(RI PC) | ||
+ | A ODOBNM R + 1 | ||
+ | A ODLBNM R + 1 | ||
+ | A ODOBTX R + 1 | ||
+ | A R WRKMSGC1 SFLCTL(WRKMSGS1) CA03 | ||
+ | A CA12 | ||
+ | A SFLSIZ(50) SFLPAG(16) | ||
+ | A OVERLAY PUTOVR | ||
+ | A N21 22 SFLDSP | ||
+ | A N21 SFLDSPCTL | ||
+ | A 21 SFLCLR | ||
+ | A N11 ROLLUP(19) | ||
+ | A 11 SFLEND | ||
+ | A 71 SFLMSG('UNABLE TO WORK WITH FILE') | ||
+ | |||
+ | A #DSPC1 4S 0H SFLRCDNBR | ||
+ | A 21 2 ' ' | ||
+ | A 24 5'F3=EXIT' | ||
+ | A 24 17'F12 CANCEL' | ||
+ | |||
+ | *------------------------------------------------------------------------- | ||
+ | * INSERT PANEL - DETAILS OF THE SELECTION | ||
+ | *------------------------------------------------------------------------- | ||
+ | A R WRKMSGA1 CLRL(*NO) RETKEY RETCMDKEY | ||
+ | A 3 2'FILE' | ||
+ | A ODOBNM R + 1DSPATR(HI) | ||
+ | A ODLBNM R + 1DSPATR(HI) | ||
+ | A ODOBTX R + 1DSPATR(HI) | ||
+ | |||
+ | |||
+ | A*------------------------------------------------------------------------- | ||
+ | A* PANEL 2 - LIST OF MESSAGES | ||
+ | A*------------------------------------------------------------------------- | ||
+ | A R WRKMSG02 | ||
+ | A*%%TS SD 20140529 201332 JKING REL-V6R1M0 5761-WDS | ||
+ | A PUTOVR | ||
+ | A 1 3'WRKMSGS.02' | ||
+ | A 1 20' WORK WITH MESSAGE DESCRIPTIONS ' | ||
+ | A DSPATR(RI) | ||
+ | A 1 60SYSNAME | ||
+ | A 1 72OVRATR | ||
+ | A DATE | ||
+ | A EDTCDE(Y) | ||
+ | A 2 72TIME | ||
+ | A OVRATR | ||
+ | A 2 26'MESSAGE DESCRIPTIONS' | ||
+ | A DSPATR(HI) | ||
+ | A 4 2'3-COPY, 12-WORK WITH' | ||
+ | A 5 13'AND/OR' | ||
+ | A ANDOR 1A B 5 20VALUES('A' 'O') | ||
+ | A SELMID 7A B 6 5OVRDTA | ||
+ | A SELTX1 10A B 6 13DSPATR(PC) | ||
+ | A OVRATR | ||
+ | A CHECK(LC) | ||
+ | A SELTX2 10A B 6 24CHECK(LC) | ||
+ | A SELTX3 10A B 6 35CHECK(LC) | ||
+ | A SELTX4 10A B 6 46CHECK(LC) | ||
+ | A SELTX5 10A B 6 57CHECK(LC) | ||
+ | A SELTX6 10A B 6 68CHECK(LC) | ||
+ | A 7 2' MESSAGE TEXT - | ||
+ | A - | ||
+ | A ' | ||
+ | A DSPATR(UL) | ||
+ | A R WRKMSGS2 SFL | ||
+ | A 25 SFLNXTCHG | ||
+ | A #SEL 2 B 8 2DSPATR(HI) | ||
+ | A 25N50 DSPATR(PC) | ||
+ | A MESSID 7 + 1 | ||
+ | A MESSTX 65 + 1 | ||
+ | A MSTEXT 132 H | ||
+ | A MSSECL 800 H | ||
+ | |||
+ | |||
+ | A R WRKMSGC2 SFLCTL(WRKMSGS2) | ||
+ | A CA03 CF05 CA12 CF21 | ||
+ | A SFLSIZ(50) SFLPAG(14) | ||
+ | A OVERLAY PUTOVR | ||
+ | A N21 22 SFLDSP | ||
+ | A N21 SFLDSPCTL | ||
+ | A 21 SFLCLR | ||
+ | A N11 ROLLUP(19) | ||
+ | A 11 SFLEND | ||
+ | A 71 SFLMSG('UNABLE TO EDIT MESSAGE') | ||
+ | A #DSPC2 4S 0H SFLRCDNBR | ||
+ | A 22 2 ' ' | ||
+ | A 24 5'F3=EXIT F5=REFRESH - | ||
+ | A F12=PREVIOUS F21=PRINT' | ||
+ | |||
+ | |||
+ | *------------------------------------------------------------------------- | ||
+ | * MISCELLANEOUS PANELS | ||
+ | *------------------------------------------------------------------------- | ||
+ | |||
+ | A R @CONFIRM OVERLAY CLRL(*NO) CF05 CA12 | ||
+ | A 23 7'PRESS F5 TO CONFIRM.' | ||
+ | |||
+ | A R @BOX OVERLAY PROTECT CLRL(3) | ||
+ | A 22 2' - | ||
+ | A - | ||
+ | A ' DSPATR(RI) | ||
+ | A 23 2' ' DSPATR(RI) | ||
+ | A 23 80' ' DSPATR(RI) | ||
+ | A 24 2' - | ||
+ | A F12=PREVIOUS - | ||
+ | A ' DSPATR(RI) | ||
+ | |||
+ | A R @CLEAR1 OVERLAY | ||
+ | A 8 1' ' | ||
+ | |||
+ | </pre> | ||
== RPG == | == RPG == |
Revision as of 05:31, 4 June 2014
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
DDS
A*========================================================= A*/ Name...: WRKMSGSD A*/ Version: n/a A*/ Purpose: Work with message files A*/ Summary: A*/ N/A : A*/ Params.: A*/ N/A : A*/ LDA....: A*/ N/A : A*/ Compile: A*/ CRTDSPF FILE(WRKMSGSD) A*/ SRCFILE(QDDSSRC) A*/ SRCMBR(WRKMSGSD) A*/ REPLACE(*YES) A*/ Notes..: A*/ 1) This *pgm courtesy of CLOVER A*/ Log....: A*/ 2014May19 - Copied from archive A*/========================================================= A* INDARA IS REQUIRED FOR RETKEY/RETCMDKEY A*%%EC A DSPSIZ(24 80 *DS3) A REF(*LIBL/QADSPOBJ) A MSGLOC(23) A INDARA A PRINT(*LIBL/QSYSPRT) A OPENPRT A ERRSFL *------------------------------------------------------------------------- * PANEL 1 - LIST OF MESSAGE FILES *------------------------------------------------------------------------- A R WRKMSG01 PUTOVR A 1 3'WRKMSGS.01' A 1 20' WORK WITH MESSAGE DESCRIPTIONS ' A DSPATR(RI) A 1 60SYSNAME A 1 72DATE OVRATR EDTCDE(Y) A 2 72TIME OVRATR A 2 26' MESSAGE FILES ' A DSPATR(HI) A 2 2'12-WORK WITH' A 4 2' FILE LIBRARY TEXT - A ' A DSPATR(UL) A R WRKMSGS1 SFL A 25 SFLNXTCHG A #SEL 2 B 5 2CHECK(AB) A VALUES(' ' '12') A 51 DSPATR(RI PC) A ODOBNM R + 1 A ODLBNM R + 1 A ODOBTX R + 1 A R WRKMSGC1 SFLCTL(WRKMSGS1) CA03 A CA12 A SFLSIZ(50) SFLPAG(16) A OVERLAY PUTOVR A N21 22 SFLDSP A N21 SFLDSPCTL A 21 SFLCLR A N11 ROLLUP(19) A 11 SFLEND A 71 SFLMSG('UNABLE TO WORK WITH FILE') A #DSPC1 4S 0H SFLRCDNBR A 21 2 ' ' A 24 5'F3=EXIT' A 24 17'F12 CANCEL' *------------------------------------------------------------------------- * INSERT PANEL - DETAILS OF THE SELECTION *------------------------------------------------------------------------- A R WRKMSGA1 CLRL(*NO) RETKEY RETCMDKEY A 3 2'FILE' A ODOBNM R + 1DSPATR(HI) A ODLBNM R + 1DSPATR(HI) A ODOBTX R + 1DSPATR(HI) A*------------------------------------------------------------------------- A* PANEL 2 - LIST OF MESSAGES A*------------------------------------------------------------------------- A R WRKMSG02 A*%%TS SD 20140529 201332 JKING REL-V6R1M0 5761-WDS A PUTOVR A 1 3'WRKMSGS.02' A 1 20' WORK WITH MESSAGE DESCRIPTIONS ' A DSPATR(RI) A 1 60SYSNAME A 1 72OVRATR A DATE A EDTCDE(Y) A 2 72TIME A OVRATR A 2 26'MESSAGE DESCRIPTIONS' A DSPATR(HI) A 4 2'3-COPY, 12-WORK WITH' A 5 13'AND/OR' A ANDOR 1A B 5 20VALUES('A' 'O') A SELMID 7A B 6 5OVRDTA A SELTX1 10A B 6 13DSPATR(PC) A OVRATR A CHECK(LC) A SELTX2 10A B 6 24CHECK(LC) A SELTX3 10A B 6 35CHECK(LC) A SELTX4 10A B 6 46CHECK(LC) A SELTX5 10A B 6 57CHECK(LC) A SELTX6 10A B 6 68CHECK(LC) A 7 2' MESSAGE TEXT - A - A ' A DSPATR(UL) A R WRKMSGS2 SFL A 25 SFLNXTCHG A #SEL 2 B 8 2DSPATR(HI) A 25N50 DSPATR(PC) A MESSID 7 + 1 A MESSTX 65 + 1 A MSTEXT 132 H A MSSECL 800 H A R WRKMSGC2 SFLCTL(WRKMSGS2) A CA03 CF05 CA12 CF21 A SFLSIZ(50) SFLPAG(14) A OVERLAY PUTOVR A N21 22 SFLDSP A N21 SFLDSPCTL A 21 SFLCLR A N11 ROLLUP(19) A 11 SFLEND A 71 SFLMSG('UNABLE TO EDIT MESSAGE') A #DSPC2 4S 0H SFLRCDNBR A 22 2 ' ' A 24 5'F3=EXIT F5=REFRESH - A F12=PREVIOUS F21=PRINT' *------------------------------------------------------------------------- * MISCELLANEOUS PANELS *------------------------------------------------------------------------- A R @CONFIRM OVERLAY CLRL(*NO) CF05 CA12 A 23 7'PRESS F5 TO CONFIRM.' A R @BOX OVERLAY PROTECT CLRL(3) A 22 2' - A - A ' DSPATR(RI) A 23 2' ' DSPATR(RI) A 23 80' ' DSPATR(RI) A 24 2' - A F12=PREVIOUS - A ' DSPATR(RI) A R @CLEAR1 OVERLAY A 8 1' '