SAS Component Language Dictionary |
Category: | SAS Table |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
sysrc=ICDESCRIBE(table-id, list-id); |
contains the return code for the operation:
0 |
successful |
>0 |
not successful |
<0 |
the operation was completed with a warning |
Type: Numeric
is the identifier that was assigned when the table was opened. If table-id is invalid, the function returns a nonzero value.
Type: Numeric
is the identifier of the list where you want to store the attributes.
Details |
This function returns all of the same information that the CONTENTS procedure displays about the constraints.
For more information about integrity constraints, see Preserving the Integrity of Table Data in SCL Programs.
Example |
The following example creates a SAS table, defines a primary integrity constraint named PK, and calls ICDESCRIBE to obtain the attributes of PK.
init: submit continue; data one; a=1; b=2; c=3; output; run; endsubmit; tableid=open('one','V'); /* utility mode */ rc=iccreate(tableid,'pk','Primary','a'); iclist=makelist(); rc=icdescribe(tableid,iclist); call putlist(iclist, '', 1); rc = dellist(iclist, 'Y'); rc=close(tableid); return;
ICDESCRIBE returns the following information for integrity constraint PK.
( ( NUMVARS=1 NAME='pk' TYPE='Primary Key' RECREATE='rc = iccreate( tableid, 'pk', 'primary', 'a', '', '', '', '', '');' MESSAGE='' ONDELETE='' ONUPDATE='' REF='' WHERE='' MSGTYPE='' VAR1='a' )[9] )[5]
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.