|
Here are two program that I use to delete distributions. In order to delete someone's distributions you must be granted permission to work on behalf of that user. The third program will grant you permission for all users. PGM PARM(&USERID &ADDRESS) DCL &USERID *CHAR LEN(10) DCL &ADDRESS *CHAR LEN(10) DCLF FILE(QAOSILIN) OVRDBF FILE(QAOSILIN) TOFILE(QTEMP/QAOSILIN) QRYDST OPTION(*IN) USRID(&USERID &ADDRESS) + OUTFILE(QTEMP/QAOSILIN) LOOP: RCVF MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ENDPGM)) DLTDST DSTID(&LINDID) OPTION(*IN) USRID(&LINRUI + &LINRUA) DSTIDEXN(&LINDEX) MONMSG MSGID(CPF0000 CPA0000) GOTO LOOP ENDPGM: ENDPGM PGM PARM(&USERID &ADDRESS) DCL &USERID *CHAR LEN(10) DCL &ADDRESS *CHAR LEN(10) DCLF FILE(QAOSILOT) MONMSG CPF0000 OVRDBF FILE(QAOSILOT) TOFILE(QTEMP/QAOSILOT) QRYDST OPTION(*OUT) USRID(&USERID &ADDRESS) + OUTFILE(QTEMP/QAOSILOT) LOOP: RCVF MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ENDPGM)) DLTDST DSTID(&OUTDID) OPTION(*OUT) USRID(&OUTSUI + &OUTSUA) DSTIDEXN(&OUTDEX) GOTO LOOP ENDPGM: ENDPGM PGM PARM(&TOUSER) DCL VAR(&TOUSER) TYPE(*CHAR) LEN(10) DCLF FILE(QADSPUPB) OVRDBF FILE(QADSPUPB) TOFILE(QTEMP/QADSPUPB) DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) + OUTFILE(QTEMP/QADSPUPB) LOOP: RCVF MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(ENDPGM)) GRTUSRPMN TOUSER(&TOUSER) FORUSER(&UPUPRF) MONMSG CPF0000 GOTO LOOP ENDPGM: ENDPGM +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.