[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

923.0. "Sorting an ACL without /SCROLL,,,ACL$:#file" by MUNLEG::KRAMER (Fritz Kramer @UFC, Munich, 865-1305) Wed Jun 24 1992 15:55

    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.RTitleUserPersonal
Name
DateLines
923.1Use ACL function instead?IOSG::PYEGraham - ALL-IN-1 Sorcerer's ApprenticeWed Jun 24 1992 16:069
    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.2WRITE COPY does the trickMUNLEG::KRAMERFritz Kramer @UFC, Munich, 865-1305Wed Jun 24 1992 17:5354
    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.3SIOG::T_REDMONDThoughts of an Idle MindWed Jun 24 1992 18:245
    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.4performance improvementMUNLEG::KRAMERFritz Kramer @UFC, Munich, 865-1305Thu Jun 25 1992 12:0821
>    
>    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