× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Barry - 

I wrote the following CLP which may do what you want... 

Note: I do use the TAATOOL CHKDAT command in this program.... There 
seems to be a Y2K problem which won't select item older than 1/1/00
if a date in the year 2000 is specified. (Minor inconvenience...)

If you want to delete mail older than 12/31/99 use a date of 12/31/99.

Kenneth

 SOURCE FILE . . . . . . .  KENNETH/QPGMSRC
  MEMBER  . . . . . . . . .  CLRMAIL

  
/* ************************************************************** */

/* PROGRAM DESCRIPTION : CLEAR ALL INCOMING MAIL, BY USERID       */

/*                                                                */

/*                                                                */

/* SPECIAL COMPILE OPTIONS:                                       */

/*                                                                */

/*           WRITTEN BY: KEN GRAAP 01/30/98                       */

/*           UPDATED BY:                                          */

/*                                                                */

/* ************************************************************** */

             PGM        PARM(&DATE)

/* ************************************************************** */

/*                                                                */

/* DECLARE PROGRAM VARIABLES                                      */

/*                                                                */

/* ************************************************************** */

             DCL        VAR(&DATE) TYPE(*CHAR) LEN(6)

             DCL        VAR(&MM) TYPE(*CHAR) LEN(2)

             DCL        VAR(&DD) TYPE(*CHAR) LEN(2)

             DCL        VAR(&YY) TYPE(*CHAR) LEN(2)

             DCL        VAR(&DLTDATE) TYPE(*CHAR) LEN(6)

             DCL        VAR(&MAILDATE) TYPE(*CHAR) LEN(6)

             DCLF       FILE(QSYS/QAOSILIN) RCDFMT(OSLIN)

             DCL        &ERRORSW *LGL                     /* Std err */
             DCL        &MSGID *CHAR LEN(7)               /* Std err */
             DCL        &MSGDTA *CHAR LEN(100)            /* Std err */
             DCL        &MSGF *CHAR LEN(10)               /* Std err */
             DCL        &MSGFLIB *CHAR LEN(10)            /* Std err */
/* ************************************************************** */

/*                                                                */

/* GLOBAL MESSAGE MONITOR                                         */

/*                                                                */

/* ************************************************************** */

             MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(STDERR1))

/* ************************************************************** */

/*                                                                */

/* CHECK FOR INCOMING MAIL. DELETE IF OLDER THAN DATE SPECIFIED.  */

/*                                                                */

/* ************************************************************** */

 

             IF         COND(&DATE *EQ TODAY) THEN(CVTDAYN +

                         DATE(*TODAY) CVTDAT(&DATE))

 

             CHKDAT     DATE(&DATE) DAYHIRNG(0)

 

             SNDPGMMSG  MSG('All IN distributions equal to or older +

                         than' *BCAT &DATE *BCAT 'Will be deleted.')

 

             QRYDST     USRID(*ALLAUT) OUTFILE(QTEMP/IN)

             OVRDBF     FILE(QAOSILIN) TOFILE(QTEMP/IN) MBR(*FIRST)

 LOOP:       RCVF       RCDFMT(OSLIN)

             MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(END))

             CHGVAR     VAR(&MM) VALUE(%SST(&DATE 1 2))

             CHGVAR     VAR(&DD) VALUE(%SST(&DATE 3 2))

             CHGVAR     VAR(&YY) VALUE(%SST(&DATE 5 2))

             CHGVAR     VAR(&DLTDATE) VALUE(&YY *CAT &MM *CAT &DD)

             CHGVAR     VAR(&MAILDATE) VALUE(%SST(&LINSDT 3 6))

 

             IF         COND(&MAILDATE *LE &DLTDATE) THEN(DO)

             DLTDST     DSTID(&LINDID) OPTION(*IN) USRID(*CURRENT) +

                          DSTIDEXN(&LINDEX)

             MONMSG     MSGID(CPF0000)

             ENDDO

             GOTO       CMDLBL(LOOP)

 

/* ************************************************************** */

/*                                                                */

/* NORMAL END OF PROGRAM                                          */

/*                                                                */

/* ************************************************************** */

 END:        RETURN

/* ************************************************************** */

/*                                                                */

/* STANDARD ERROR PROCESSING                                      */

/*                                                                */

/* ************************************************************** */

 STDERR1:               /* Standard error handling routine */
             IF         &ERRORSW SNDPGMMSG MSGID(CPF9999) +
                          MSGF(QCPFMSG) MSGTYPE(*ESCAPE) /* Func chk */
             CHGVAR     &ERRORSW '1' /* Set to fail ir error occurs */
 STDERR2:    RCVMSG     MSGTYPE(*DIAG) MSGDTA(&MSGDTA) MSGID(&MSGID) +
                          MSGF(&MSGF) MSGFLIB(&MSGFLIB)
             IF         (&MSGID *EQ '       ') GOTO STDERR3
             SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
                          MSGDTA(&MSGDTA) MSGTYPE(*DIAG)
             GOTO       STDERR2 /* Loop back for addl diagnostics */
 STDERR3:    RCVMSG     MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) +
                          MSGF(&MSGF) MSGFLIB(&MSGFLIB)
             SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
                          MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE)
             ENDPGM

-----Original Message-----
From: Barry Kolochuk [mailto:barryk@arnoldbr.com]
Sent: Friday, February 04, 2000 7:11 AM
To: MIDRANGE
Subject: Deleting Office Vision Incoming Mail Items.


Does anyone know if there is a way to purge all incoming mail items in
Office Vision without having to call up each individual users mail and
delete it manually. I know you can delete all mail for a user by
removing the user from the system but I have been trying to find a way
to purge all incoming mail items based on a cutoff date.

Tks Barry

+---
| 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
+---
+---
| 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.