Chapter Contents |
Previous |
Next |
Data Form and Data Table: _saveAs |
Delegated to: | Data Set Model class |
Syntax | |
Details | |
Example |
Syntax |
CALL SEND (object-id, '_saveAs', name<,replace<,col-1,...,col-n>> |
Argument | Type |
Description | |
---|---|---|---|
name |
C | specifies the new name to use when saving the table | |
replace |
C | specifies whether to replace an existing table name: | |
'N' | does not replace the table (default) | ||
'Y' | replaces the table if it exists | ||
col |
C | specifies one or more column (variable) names separated by commas that specify the columns to be written to the new table. If none are specified, all are written to the new table. |
Details |
The _saveAs method will write the rows to the table in the same order they were read by the engine. For example, if a WHERE clause or _setKey method has been applied, only those rows meeting the WHERE clause or set key condition are written to the table.
The _saveAs method sets SYSRC for error, note, and warning conditions.
Example |
The following example assumes you have created a FRAME that contains a data table object called TABLE.
INIT: call send(_frame_, '_getWidget','table',tabid); |
call send(tabid,'_setDataset', 'sasuser.class'); |
call send(tabid, '_saveAs', 'work.test', 'y', 'name', 'age', 'sex'); return; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.