![]() Chapter Contents |
![]() Previous |
![]() Next |
| SETLATTR |
| Category: | List |
Syntax |
| rc=SETLATTR(list-id,attributes<,index>); |
| 0 | successful |
0 |
not successful |
| Attribute Values for Lists and List Items |
'DEFAULT''DELETE''FIXEDTYPE''NODELETE''NOFIXEDTYPE''NOUPDATE''UPDATE'| Attribute Values for Lists Only |
'ANYNAMES''CHARONLY''COPY''DUPNAMES''FIXEDLENGTH''HONORCASE''NOCHARONLY''NOCOPY''NODUPNAMES''NOFIXEDLENGTH''NOHONORCASE''NONUMONLY''NUMONLY''SASNAMES'| Attribute Values for List Items Only |
'ACTIVE''INACTIVE''NOWRITE''WRITE'| Details |
| Attribute Pairs |
Both list and item attributes are copied by COPYLIST. However, COPYLIST does not copy passwords.
| Using Passwords to Protect List Attributes from Modification |
The following statements show how to assign a password:
pwd='password=grombaq'; myattr='nodelete noupdate'; rc=setlattr(mylist,myattr||' '||pwd);
rc=setlattr(mylist,pwd ||'update');
rc=setlattr(mylist,'no'||pwd); rc=setlattr(mylist,'nopassword=grombaq');
You must supply the correct password in order to remove a password that was previously set.
| Example |
a=makelist(3); b=makelist(); /* Set 3rd item in A to B. */ a=setiteml(a,b,3); /* Give list B the NODELETE attribute. */ /* DELLIST(b) will be an error. */ rc=setlattr(b,'NODELETE'); /* Give the 3rd item in A the */ /* NODELETE attribute. */ /* DELITEM(a, 3) will be an error. */ rc=setlattr(a,'NODELETE',3); /* Move B to the second item in the list */ /* and set the third item with 0. */ a=setiteml(a,b,2); a=setitemn(a,0,3); /* Remove B from list A, */ /* but B still exists. */ /* DELITEM(a,2) will be an error now. */ a=delitem(a,2);
See CLEARLIST and DELLIST for more information about the DELETE and NODELETE attributes.
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.