[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

946.0. "CAB$ATTRIBUTES loop weird with CAB DELETE_ATTR?" by SHALOT::LANPHEAR (Test the water or turn the tide?) Fri Jun 26 1992 19:06

    I'm trying to manipulate the TO's and CC's for a mail message as part
    of a 'security' measure for a customer, and it doesn't behave the way I
    would expect for ALL-IN-1 V2.4, patched through K603...
    
    For example, if we have a mail message like:
      TO:  A
      TO:  B
      TO:  C
      TO:  D
    
    the loop:
    
      FOR CAB$ATTRIBUTES:TO DO CAB DELETE_ATTRIBUTE ,"TO",.VALUE
    will delete entries A and C.  A trace of the loop shows it finding
    only A and C - it never even sees the values B and D.  So it appears
    the CAB DELETE_ATTRIBUTE is 'corrupting' the context of the CAB$ATTRIBUTES
    loop!
    
      The specific problem that I have is that I need to only remove
    selected entries from the TO's and CC's (based on their MAIDES), and it
    isn't every other one :-(  One work-around that I found is to
    CAB ADD_ATTR to BCC (this site doesn't use it), and then have a second for
    loop on CAB$ATTRIBUTES:BCC to CAB DELETE_ATTR the selected entries.
    
      I checked, and it works correctly under V3.0.  Is this a known
    problem with V2.4, and is there a patch for it?
    
    						Thanks in advance, Dan'l
T.RTitleUserPersonal
Name
DateLines
946.1Known a little since V2.0BUFFER::VICKERSRearranging the DEChairsFri Jun 26 1992 20:409
    You are right about the behavior.  CAB$ATTRIBUTES gets confused on
    deletes so one must either make multiple or recurring passes. Your
    solution is much smoother, however.   I doubt that there was any patch
    but I am often proven incorrect, of course.

    It's nice to know that this 'feature' has been eliminated in V3.

    Hang in there,
    don
946.2It's possible to delete repeating attr from NDSHALOT::LANPHEARTest the water or turn the tide?Fri Jun 26 1992 23:5614
    I did find a way to remove the repeating attributes from named data:
    
    ;;REMOVE_THEM;;                                          
    
    GET OA$STATUS=1\
    GET #VAL=CAB$ATTRIBUTES.VALUE["TO"]\
    .IF #VAL NES "" THEN CAB DELETE_ATTRIBUTE ,"TO",#VAL\\
       GET #VAL=CAB$ATTRIBUTES.VALUE["TO"]\\
       .IF #VAL EQS "" THEN GET OA$STATUS=0\\
      REPEAT
    
    It's not optimized, but it works.
    
    						Cheers, Dan'l
946.3Problem Has Existed Since V2.2!XLII::FDONOHUEMon Jun 29 1992 14:1389
    This sounded so familiar that I checked the STARS database and found 
    this article on the old archived ALL-IN-1 database.  Since it sounds
    like the problem still exists in V2.4 I will move it into the
    current production database.  Maybe this will help.  I'm glad to here
    that it is not a problem n V3.0.
    
    Happy coding,
    
    Faith Donohue
    
    
Problem With CABINET DELETE_ATTRIBUTE


********************   CAUTION:  FOR INTERNAL USE ONLY   *********************
*                                                                            *
*      THIS INFORMATION IS FOR USE BY DIGITAL EQUIPMENT CORP. AND ITS        *
*      EMPLOYEES ONLY.  PLEASE USE EXTREME CARE IF YOU MUST DISCUSS ANY      *
*      PART OF THIS INFORMATION WITH ANYONE WHO IS NOT A DIGITAL EMPLOYEE.   *
*                                                                            *
******************************************************************************


PRODUCT: ALL-IN-1 V2.2

SOURCE: Customer Support Center/Atlanta USA

\by Faith Donohue
\

PROBLEM:

The ALL-IN-1 function CABINET DELETE_ATTRIBUTE moves the attribute
pointer to the SECOND attribute following the one deleted rather than
to the next attribute as it should.  Here's the deal: 

        1. Create a mail message with addressees in the following format:
           
           user1                        ( user@a1@node )
           user2                        ( PAPER MAIL )
           user3                        ( PAPER MAIL )
           user4                        ( user@a1@node )

        2. Run a script containing the following:

           FOR CAB$ATTRIBUTES:"TO" WITH .VALUE <=> "PAPER MAIL" - 
           DO CABINET DELETE_ATTRIBUTE ,"TO",.VALUE
                                                     
        3. You would expect your mail message to have NO paper mail 
           recipients but, in reality, the addressee list is: 

           user1                        ( user@a1@node )
           user3                        ( PAPER MAIL )
           user4                        ( user@a1@node )
                                  
           If the PAPER MAIL addressees are separated by at least one 
           other type of address, this problem does not occur.
                 
SOLUTION:

The problem that you have described is not currently scheduled for
correction in the next release of ALL-IN-1, however, we are able to
supply an alternative. The problem is being considered for resolution in
a future release of ALL-IN-1 following the next release. 

The problem is caused by the deletion of an attribute not moving the
FOR loop pointer backwards resulting in some attributes not being
examined. 

There are two possible alternatives: 

        Firstly, set the attribute to a null string instead of 
        deleting it.  To do this use CAB CHANGE_ATTRIBUTE instead 
        of CAB DELETE_ATTRIBUTE. 

        Alternatively, repeat the FOR loop until no changes to 
        attributes are made.  The script below shows how to 
        achieve this:

        .label do_again   
        compute #count = 0       
        for cab$attributes:"to" with .value <=> "PAPER MAIL" - 
        do cabinet delete_attribute ,"to",.value \\ compute #count = #count+1
        .if #count gt 0 then .goto do_again                                 

\\%QX902 VER_2.2_A1_IOS
\\OAOLD OA A1_IOS