SAS Component Language Dictionary |
Initializes the Table Data Vector (TDV) for a SAS table to missing
values
-
rc
-
contains the return code for the operation:
0 |
successful |
0 |
not successful |
Type:
Numeric
-
table-id
-
is the identifier that was assigned when
the SAS table was opened.
Type: Numeric
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.
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 © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.