|
|
|
/* COPYRIGHT JÜRGEN REULE 2010-2023 */ |
|
|
|
|
|
|
|
|
PGM |
PARM(&FILE &FLD &MAN &COUNT) |
|
|
|
|
|
|
|
|
DCL |
VAR(&MAN) TYPE(*CHAR) LEN(1) |
|
|
|
DCL |
VAR(&MANX) TYPE(*CHAR) LEN(1) |
|
|
|
DCL |
VAR(&FLD) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&FILE) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&QRYSLT) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&COUNT) TYPE(*DEC) LEN(10) |
|
|
|
|
|
|
|
|
DCLF |
FILE(COUNTP) |
|
|
|
MONMSG |
MSGID(CPF0000) |
|
|
|
|
|
|
|
|
IF |
COND(&MAN *EQ '"') THEN(CHGVAR VAR(&MANX) + |
|
|
|
|
VALUE(&MAN)) |
|
|
|
CHGVAR |
VAR(&COUNT$) VALUE(0) |
|
|
|
CHGVAR |
VAR(&QRYSLT) VALUE(&FLD *BCAT '*EQ' *BCAT + |
|
|
|
|
'"' *TCAT &MAN *TCAT &MANX *TCAT '"') |
|
|
|
|
|
|
|
|
OVRDBF |
FILE(COUNTP) TOFILE(&FILE) SHARE(*YES) |
|
|
|
OPNQRYF |
FILE((&FILE)) FORMAT(COUNTP) QRYSLT(&QRYSLT) + |
|
|
|
|
KEYFLD((&FLD)) GRPFLD(&FLD) MAPFLD((COUNT$ + |
|
|
|
|
'%COUNT')) OPNID(&FILE) |
|
|
|
RCVMSG |
MSGTYPE(*LAST) RMV(*YES) |
|
|
|
RCVF |
|
|
|
|
CHGVAR |
VAR(&COUNT) VALUE(&COUNT$) |
|
|
|
CLOF |
OPNID(&FILE) |
|
|
|
RCVMSG |
MSGTYPE(*LAST) RMV(*YES) |
|
|
|
DLTOVR |
FILE(COUNTP) |
|
|
ENDPGM: |
ENDPGM |
|
|