In a SAS
data set, a variable (column) can have persisted (default) formatting
information. There are two methods that you can use to determine what,
if any, default formatting information exists in a data set. Use the
method that is most appropriate for your application.
-
Along with some other column metadata
that is specific to SAS, the ISASColumnsInfo customized rowset interface
returns the names, lengths, and decimal widths of formats and informats
that are stored in the data set. In order to use the interface, the
data set must be open.
For
more information about how to use the interface, see ISASColumnsInfo Custom Interface.
Note: A format or
informat name that is returned by ISASColumnsInfo::GetColumnsInfo
might not be supported by a particular provider or server. By default,
you will receive an error if you attempt to apply format or informat
services with a format that is not supported. To change this default
behavior, set the DBPROP_SAS_FMTERR property to VARIANT_FALSE.
-
The COLUMNS schema rowset also
returns format and informat metadata. Consider using this method if
your application needs to determine metadata for columns that exist
in a table that is not open.
For more information, see COLUMNS Schema Rowset.