Introduction to DATA Step Functions for Metadata |
Several of the DATA step functions use two-dimensional arrays for input or output. The arrays enable applications to move information in and out of the metadata server with fewer calls. However, the DATA step is not two-dimensional, so the following conventions enable you to handle these multiple-row arrays:
For functions that return arrays, the function asks the metadata s erver to return only one row (or a specific row) of an output array. The output array is generally kept in an object cache that lasts only as long as the DATA step. The key to the cache is the uri argument, and the key to the row is the n argument. When you submit the function, it checks whether information from the output array already exists in the cache and, if so, returns the information from the cache. If the information does not exist in the cache, the function calls the metadata server to fill the cache. You can use the n argument to iterate through the rows of the array; see how n is used in Examples: DATA Step Functions for Metadata Security Administration.
The functions that input arrays are similar to the functions that return arrays, but the array is not kept in an object cache. Rather than iterating with an n argument, you specify the multiple values in a comma-delimited list. In some functions, you submit two values that must be in parallel. In other words, for a name, value pair, if you specify three name arguments, then you must specify three value arguments.
For more information about DO loops and array processing in a DATA step, see SAS Language Reference: Concepts.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.