× 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.



I've used this program to delete old *MAIL items .... The collection API is
the QRYDST command. 
You have to run this from an *ALLOBJ user in order to access other users
distributions though.

This program may contain some TAATOOL commands too ... For example: CHKDAT 

Hopefully this will help you out, even if you can't use the program as
written.

Good luck ..... Kenneth

             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)   
                          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: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Bill
Sent: Monday, September 19, 2005 3:13 PM
To: Midrange List
Subject: *Mail Objects in QDOC


Some of the objects saved during my daily SavDLO are objects belonging to
QDOC of the type *Mail and it looks like old stuff since some of the names
are people whom have not been here for quite some time.  How do I access
these, and optionally see what's in them, and delete them?

We're V5R2.

Bill


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.