Chapter Contents

Previous

Next
_setsec

_setsec



Set queue security information.


Syntax
Example

Syntax

CALL SEND(queueInst, '_setsec', rc, acl);

Where... Is type... And represents...
rc N return code
acl L access control list

The _setsec method allows you to specify the permissions or privileges that are associated with a specific queue.

If an error or warning condition is encountered while setting the security information, a non-zero return code is returned in the rc parameter. Use SYSMSG() to determine the exact error message.

The acl parameter is an SCL list that contains the access control information.


Example

This example sets two user privileges for a specific queue. The first user (USER1) is defined to have full privileges. Full privileges consist of the following: deliver, fetch, browse, getprop, setprop, getsec, and setsec. These privileges can be set individually or using the 'all' parameter. The second user (USER2) is defined to have only browse, getprop, and getsec privileges.

rc = 0;
acl = makelist();

userid = 'user1';
permission = 'd+f+b+gp+sp+gs+ss'; /* or 'all' */
rc = setnitemc(acl, permission, userid);

userid = 'user2';
permission = 'b+gp+gs';
rc = setnitemc(acl, permission, userid);

call send(queueInst, '_setsec', rc, acl);
if (rc NE 0) then do;
   msg = sysmsg();
   put msg;
end;
else 'SetSec was successful';


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.