|
|
|
/* COPYRIGHT JÜRGEN REULE 2010-2024 */ |
|
|
|
|
|
|
|
|
PGM |
PARM(&FROM &FROMNAME + |
|
|
|
|
&TO &TONAME + |
|
|
|
|
&SUBJECT + |
|
|
|
|
&LONGMSG + |
|
|
|
|
&SUBMIT) |
|
|
|
|
|
|
|
|
DCL |
VAR(&FROM) TYPE(*CHAR) LEN(64) |
|
|
|
DCL |
VAR(&FROMNAME) TYPE(*CHAR) LEN(64) |
|
|
|
DCL |
VAR(&TO) TYPE(*CHAR) LEN(64) |
|
|
|
DCL |
VAR(&TONAME) TYPE(*CHAR) LEN(64) |
|
|
|
DCL |
VAR(&DSTD) TYPE(*CHAR) LEN(44) |
|
|
|
DCL |
VAR(&SUBJECT) TYPE(*CHAR) LEN(60) |
|
|
|
DCL |
VAR(&LONGMSG) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&SUBMIT) TYPE(*CHAR) LEN(1) |
|
|
|
DCL |
VAR(&USER) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&FILE) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&LIB) TYPE(*CHAR) LEN(10) |
|
|
|
|
|
|
|
|
MONMSG |
MSGID(CPF0000) |
|
|
|
|
|
|
|
|
IF |
COND(&SUBMIT *EQ '0') THEN(DO) |
|
|
|
RTVJOBA |
USER(&USER) |
|
|
|
|
|
|
|
|
IF |
COND(&LONGMSG *EQ ' ') THEN(CHGVAR + |
|
|
|
|
VAR(&LONGMSG) VALUE(' ...')) |
|
|
|
|
|
|
|
|
CHGVAR |
VAR(&FILE) VALUE(MAILS) |
|
|
|
CHGVAR |
VAR(&LIB) VALUE(QTEMP) |
|
|
|
|
|
|
|
|
DLTF |
FILE(&LIB/&FILE) |
|
|
|
RCVMSG |
MSGTYPE(*LAST) RMV(*YES) |
|
|
|
|
|
|
|
|
CPYF |
FROMFILE(*CURLIB/&FILE) MBROPT(*ADD) + |
|
|
|
|
TOFILE(&LIB/&FILE) CRTFILE(*YES) |
|
|
|
|
|
|
|
|
CLRPFM |
FILE(&LIB/&FILE) |
|
|
|
RCVMSG |
MSGTYPE(*LAST) RMV(*YES) |
|
|
|
|
|
|
|
|
OVRDBF |
FILE(&FILE) TOFILE(&LIB/&FILE) |
|
|
|
CALL |
PGM(MAILS) PARM(&LONGMSG) |
|
|
|
DLTOVR |
FILE(&FILE) |
|
|
|
|
|
|
|
|
SNDM |
FROM(&FROM &FROMNAME) + |
|
|
|
|
TO((&TO &TONAME)) + |
|
|
|
|
FILE(&LIB/&FILE) + |
|
|
|
|
SUBJECT(&SUBJECT) |
|
|
|
|
|
|
|
|
MONMSG |
MSGID(CPF0000) EXEC(DO) |
|
|
|
SNDPGMMSG |
MSGID(CPF9897) MSGF(QCPFMSG) + |
|
|
|
|
MSGDTA(&TO) TOUSR(&USER) |
|
|
|
|
|
|
|
|
CHGVAR |
VAR(&DSTD) VALUE(&SUBJECT) |
|
|
|
|
|
|
|
|
SNDDST |
TYPE(*LMSG) TOINTNET((&TO)) + |
|
|
|
|
DSTD(&DSTD) + |
|
|
|
|
LONGMSG(&LONGMSG) + |
|
|
|
|
SUBJECT(&SUBJECT) |
|
|
|
|
|
|
|
|
MONMSG |
MSGID(CPF0000) EXEC(DO) |
|
|
|
SNDPGMMSG |
MSGID(CPF9897) MSGF(QCPFMSG) + |
|
|
|
|
MSGDTA(&TO) TOUSR(&USER) |
|
|
|
ENDDO |
|
|
|
|
ENDDO |
|
|
|
|
|
|
|
|
|
CLRPFM |
FILE(&LIB/&FILE) |
|
|
|
RCVMSG |
MSGTYPE(*LAST) RMV(*YES) |
|
|
|
|
|
|
|
|
DLTF |
FILE(&LIB/&FILE) |
|
|
|
RCVMSG |
MSGTYPE(*LAST) RMV(*YES) |
|
|
|
|
|
|
|
|
ENDDO |
|
|
|
|
|
|
|
|
|
IF |
COND(&SUBMIT *EQ '1') THEN(DO) |
|
|
|
SBMJOB |
CMD(MAIL FROM(&FROM) + |
|
|
|
|
FROMNAME(&FROMNAME) + |
|
|
|
|
TO(&TO) + |
|
|
|
|
TONAME(&TONAME) + |
|
|
|
|
SUBJECT(&SUBJECT) + |
|
|
|
|
LONGMSG(&LONGMSG) + |
|
|
|
|
SUBMIT(*NO)) + |
|
|
|
|
JOB(MAIL) + |
|
|
|
|
LOG(4 0 *NOLIST) + |
|
|
|
|
LOGCLPGM(*NO) + |
|
|
|
|
MSGQ(*NONE) |
|
|
|
ENDDO |
|
|
|
ENDPGM: |
ENDPGM |
|
|