Chapter Contents

Previous

Next
COMPARELIST

COMPARELIST



Compares two SCL lists

Category: List


Syntax
Details
Example

Syntax

rc=COMPARELIST(list1-id,list2-id<,options>);

rc
contains the return code for the operation:
0 The lists match.
1 The lists do not match.

list1-id, list2-id
contain the identifiers for the two SCL lists to be compared.

options
specify one or more comparison options. Use a space to separate multiple options. The available options are:

NAME (Default)|NONAME
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.

NOHONORCASE (Default)|MIXEDCASE
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.

ITEM (Default)|NOITEM
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.

NODUMP (Default)|LONGDUMP|SHORTDUMP
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;


Chapter Contents

Previous

Next

Top of Page

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