SAS Component Language Dictionary |
Category: | List |
Syntax | |
Details | |
Example |
Syntax |
rc=COMPARELIST(list1-id,list2-id<,options>); |
contains the return code for the operation:
0 | |
1 |
contain the identifiers for the two SCL lists to be compared.
specify one or more comparison options. Use a space to separate multiple options. The available options are:
determine whether the comparison is performed on the names of list items that are in the same position in both lists. NONAME does not compare item names.
determine whether the comparison is performed on the uppercase or mixed case values of all item values and names. NOHONORCASE compares the uppercase values of item names and values. MIXEDCASE compares mixed case names and values.
determine whether the comparison is performed on the values of list items that are in the same position in both lists. NOITEM does not compare list values.
determine the extent to which differences are reported. NODUMP produces no messages. LONGDUMP displays all differences in the LOG window. SHORTDUMP displays the first five differences.
Details |
COMPARELIST enables you to compare the information in two SCL lists. This comparison can include item names, values, or both. Names and items can be compared in mixed case.
Example |
Compare the item names and values in OLDLIST and NEWLIST. If the lists are not the same, write all the error messages to the SAS log. If the lists are the same, delete OLDLIST.
rc=comparelist(oldlist,newlist,'name item nohonorcase
longdump'); if rc=0 then rc=dellist(oldlist); else do; ...SCL statements to run when the lists do not match... end;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.