Chapter Contents

Previous

Next
SAS Component Language: Reference

Inserting and Replacing Items in Lists

To insert and replace items in a list, use the SETITEMN, SETNITEMN, SETITEMC, SETNITEMC, SETITEML, SETNITEML, SETITEMO, or SETNITEMO function. These functions can assign values to existing items or they can add new items.

With arrays, you use

A{i}=x;
but with SCL lists, you use
rc=setitemn(listid,x,i);

To add a new item to a list without replacing the existing items, use the INSERTC, INSERTL, INSERTN, or INSERTO function.

See also Assigning Names to List Items.


Chapter Contents

Previous

Next

Top of Page

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