Chapter Contents |
Previous |
Next |
SAS Component Language: Reference |
Because it is easy to change the type of any item in a list simply by replacing the value with a new value, it would be quite easy for one application to accidentally change a list in a way that you did not intend. To prevent this possibility, you may want to specify that a list or items in a list have a fixed type. When you assign the proper attributes to the lists and items that you create, you do not need to worry about other parts of the application corrupting your data, and you can avoid adding data validation statements to your programs.
Assigning list and item attributes is not required. However, doing so can facilitate application development, because an attempt to violate an attribute, which indicates a bug in the application, causes the application to stop with a fatal error.
To set the attributes of a list or item, use the SETLATTR function. The GETLATTR function returns a string that describes the current attributes. The HASATTR function returns 1 if the list or item has the specified attribute and 0 if it does not.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.