SAS Component Language Dictionary |
Category: | SAS Table |
Syntax | |
Details | |
Example |
Syntax |
rc=INITROW(table-id); |
contains the return code for the operation:
0 | |
0 |
is the identifier that was assigned when the SAS table was opened.
Details |
INITROW initializes the TDV to missing values. This prevents bad data from being written to a table row when you do not explicitly assign values to columns with the PUTVARC or PUTVARN function and you use the APPEND function with the NOINIT option.
Example |
Open the table whose name is saved in the variable TABLE, initialize a new row to missing, and then write a value for the NAME column. When the new row is appended to the data table, the column NAME is initialized to the value JOHN while values in all other columns are set to missing.
tableid=open(table); rc=initrow(tableid); call putvarc(tableid,varnum(tableid,'name'),'JOHN'); rc=append(tableid,'noinit'); rc=close(tableid);
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.