Hsdstclear.clle: Unterschied zwischen den Versionen
Aus informatikvs
(Die Seite wurde neu angelegt: „<pre> →****************************************************************************: /*…“) |
|||
Zeile 28: | Zeile 28: | ||
CALLSUBR SUBR(DLTDSTOUT) | CALLSUBR SUBR(DLTDSTOUT) | ||
DSPJOBLOG OUTPUT(*PRINT) | DSPJOBLOG OUTPUT(*PRINT) | ||
− | SNDM FROM(' | + | SNDM FROM('qsysopr@xyz.de') + |
− | TO((' | + | TO(('qsysopr@xyz.de')) + |
FILE(&MYLIB/QCLSRC) + | FILE(&MYLIB/QCLSRC) + | ||
MBR(HSDSTCLEA#) + | MBR(HSDSTCLEA#) + |
Aktuelle Version vom 27. Juni 2017, 10:37 Uhr
/******************************************************************************/ /* */ /* Programm bereinigt alle SNADS-Verteilungen eines USERS (Parameter/Aufrufer)*/ /* Wenn Limit von 9999 erreicht wurde schlug Fehler CPD90B1 auf */ /* */ /* Wegen Berechtigung muss Job mit Benutzernamen als SBMJOB gestartet werden */ /* */ /******************************************************************************/ DCL VAR(&PUSER) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&MYLIB) TYPE(*CHAR) LEN(10) DCL VAR(&MYTYPE) TYPE(*CHAR) LEN(1) DCL VAR(&MYDATE) TYPE(*CHAR) LEN(8) VALUE('20621231') DCL VAR(&SDDATE) TYPE(*CHAR) LEN(8) DCLF FILE(QSYS/QAOSILIN) RCDFMT(OSLIN) OPNID(MYINP) DCLF FILE(QSYS/QAOSILOT) RCDFMT(OSLOUT) OPNID(MYOUT) CHGVAR VAR(&USER) VALUE(&PUSER) MONMSG MSGID(MCH3601) EXEC(RTVJOBA USER(&USER)) RTVJOBA TYPE(&MYTYPE) IF COND(&MYTYPE *EQ '0') THEN(DO) CHGVAR VAR(&MYLIB) VALUE(QTEMP) CHGVAR VAR(&MYLIB) VALUE(SPONA) CALLSUBR SUBR(DLTDSTIN) CALLSUBR SUBR(DLTDSTOUT) DSPJOBLOG OUTPUT(*PRINT) SNDM FROM('qsysopr@xyz.de') + TO(('qsysopr@xyz.de')) + FILE(&MYLIB/QCLSRC) + MBR(HSDSTCLEA#) + SUBJECT('HSDstClear') ENDDO ELSE DO SBMJOB CMD(CALL PGM(SPONA/HSDSTCLEAR) + PARM(&USER)) + JOB(HSDSTCLEAR) + JOBQ(*LIBL/QBATCH) + USER(&USER) + SYSLIBL(*SYSVAL) + CURLIB(*CRTDFT) + INLLIBL(*SYSVAL) + LOG(4 99) + LOGCLPGM(*YES) + HOLD(*NO) ENDDO /******************************************************************************/ /*** END **********************************************************************/ END9999: DLTOVR FILE(*ALL) RCLRSC /******************************************************************************/ /**subroutine *****************************************************************/ SUBR SUBR(DLTDSTIN) QRYDST OPTION(*IN) USRID(*CURRENT) OUTFILE(&MYLIB/MYDSTIN) OVRDBF FILE(QAOSILIN) TOFILE(&MYLIB/MYDSTIN) DOWHILE cond(1 = 1) RCVF RCDFMT(OSLIN) OPNID(MYINP) MONMSG MSGID(CPF0864) EXEC(LEAVE) CHGVAR VAR(&SDDATE) VALUE(%SST(&MYINP_LINSDT 1 8)) IF COND(&SDDATE *GT &MYDATE) THEN(ITERATE) DLTDST DSTID(&MYINP_LINDID) OPTION(*IN) USRID(*CURRENT) + DSTIDEXN(&MYINP_LINDEX) OBJ(*ALL) MONMSG MSGID(CPF0000) ENDDO ENDSUBR /******************************************************************************/ /**subroutine *****************************************************************/ SUBR SUBR(DLTDSTOUT) QRYDST OPTION(*OUT) USRID(*CURRENT) OUTFILE(&MYLIB/MYDSTOUT) OVRDBF FILE(QAOSILOT) TOFILE(&MYLIB/MYDSTOUT) DOWHILE cond(1 = 1) RCVF RCDFMT(OSLOUT) OPNID(MYOUT) MONMSG MSGID(CPF0864) EXEC(LEAVE) CHGVAR VAR(&SDDATE) VALUE(%SST(&MYOUT_OUTSDT 1 8)) IF COND(&SDDATE *GT &MYDATE) THEN(ITERATE) DLTDST DSTID(&MYOUT_OUTDID) OPTION(*OUT) USRID(*CURRENT) + DSTIDEXN(&MYOUT_OUTDEX) OBJ(*ALL) MONMSG MSGID(CPF0000) DLTDST DSTID(&MYOUT_OUTDID) OPTION(*ERR) USRID(*CURRENT) + DSTIDEXN(&MYOUT_OUTDEX) OBJ(*ALL) MONMSG MSGID(CPF0000) ENDDO ENDSUBR /******************************************************************************/ /******************************************************************************/ ENDPGM