| 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 | 
    After editing drawer access to a shared drawer the added/changed
    Identifier get written back SORTED as described in APR 1 p. 8-6.
    
    Does anybody knows how I can accomplish the same (sorting an ACL)
    without using an argument form with a /SCROLLed region?
    
    I did something like
    
    get #aab_sort = "OA$TEMP:TEST.ACL,FILE,1,1,1"
    for acl$:#aab_sort do -
            write change acl$:#aab_upd_acc %key = .%key
    
    with no success.
    
    Any is appreciated
    
    Fritz
      
    
    
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 923.1 | Use ACL function instead? | IOSG::PYE | Graham - ALL-IN-1 Sorcerer's Apprentice | Wed Jun 24 1992 15:06 | 9 | 
|     Fritz,
    
    How about using the ACL function to write back the updated ACL instead
    of ACL$? I have a feeling that ACL$ is mostly intended to be used for
    reading ACLs.
    
    You'll probably need to to ACL DELETE and ACL ADD to achieve this.
    
    Graham
 | |||||
| 923.2 | WRITE COPY does the trick | MUNLEG::KRAMER | Fritz Kramer @UFC, Munich, 865-1305 | Wed Jun 24 1992 16:53 | 54 | 
|     Graham,
    
    I found it out how it works. And it's very interesting HOW it works.
    My first successfull try (with the help of Helmut Graef) was
    
    
    for acl$:"oa$temp:t.t" do -
            write add acl$:"oa$temp:x.x" -
            identifier = .identifier,-
            default = .default,-
            hidden = .hidden,-
            protected = .protected,-
            nopropagae = .nopropagate,-
            read = .read,-
            write = .write,-
            execute = .execute,-
            delete = .delete,-
            control = .control,-
            shared = .shared
    
    This gets me a sorted ACL on the secondary temp file x.x which could
    be easily copied back to my original file t.t
    
    Second try:
    
    
    for acl$:"oa$temp:t.t" do -
            write add acl$:"oa$temp:t.t" -
            identifier = .identifier,-
            default = .default,-
            hidden = .hidden,-
            protected = .protected,-
            nopropagae = .nopropagate,-
            read = .read,-
            write = .write,-
            execute = .execute,-
            delete = .delete,-
            control = .control,-
            shared = .shared
    
    This gets me the sorted ACL on the original file t.t. It's interesting
    that the ACL$ dsab doesn't give me a duplicate key error like any other
    dsab. 
    
    Third try
    
    for acl$:"oa$temp:t.t" do -
    	    write copy acl$:"oa$temp:t.t" %key = .%key, %key = .%key
    
    
    This worked too and is the most elegant (shortest) version.
    
    
    Fritz
 | |||||
| 923.3 | SIOG::T_REDMOND | Thoughts of an Idle Mind | Wed Jun 24 1992 17:24 | 5 | |
|     The ACL$ data set doesn't report a duplicate key because you don't
    create one.... the data set uses a key much like SCROLL, i.e. a number
    value starting from 1 incremented by 1 as each ACE is added.
    
    Tony
 | |||||
| 923.4 | performance improvement | MUNLEG::KRAMER | Fritz Kramer @UFC, Munich, 865-1305 | Thu Jun 25 1992 11:08 | 21 | 
| >    
>    Third try
>    
>    for acl$:"oa$temp:t.t" do -
>    	    write copy acl$:"oa$temp:t.t" %key = .%key, %key = .%key
>    
>    
>    This worked too and is the most elegant (shortest) version.
 
    ... but not the quickest version
    
    in the example above the ACL will be sorted n-times, where n is the
    number of ACE's of the ACL. One write copy is sufficient to sort
    the ACL
    
     for FIRST acl$:"oa$temp:t.t" do -
    	    write copy acl$:"oa$temp:t.t" %key = .%key, %key = .%key
      
    
    Fritz
    
 | |||||