Chapter Contents

Previous

Next
INITROW

INITROW



Initializes the Table Data Vector (TDV) for a SAS table to missing values

Category: SAS Table


Syntax
Details
Example

Syntax

rc=INITROW(table-id);

rc
contains the return code for the operation:
0 successful
[ne]0 not successful

Type: Numeric

table-id
is the identifier that was assigned when the SAS table was opened.

Type: Numeric


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);


Chapter Contents

Previous

Next

Top of Page

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