Previous Page | Next Page

SAS Component Language Dictionary

DELOBS



Deletes a row from a SAS table
Category: SAS Table

Syntax
Details
Example
See Also

Syntax

sysrc=DELOBS(table-id);

sysrc

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. If table-id is invalid, the program halts.

Type: Numeric


Details

You must fetch a row before it can be deleted. Some functions that fetch a row include FETCH, FETCHOBS, LOCATEC, LOCATEN, APPEND, DATALISTC, and DATALISTN.


Example

Delete the current row from an open SAS table. (The example assumes that the table identifier returned by the OPEN function was stored in the SCL variable MYDATAID.) If the function is unable to delete the row, a message is displayed on the message line.

if (delobs(mydataid)) then _msg_=sysmsg();


See Also

APPEND

DATALISTC and DATALISTN

FETCH

FETCHOBS

LOCATEC and LOCATEN

Previous Page | Next Page | Top of Page