The ISASDataSetInfo90 interface provides a way to return data set metadata that does not directly map to OLE DB constructs. This extension to the ISASDataSetInfo interface supports four methods:
Method | Description |
---|---|
GetDataSetInfo | Returns file metadata that is specific to SAS. |
GetRecordCounts | Returns information about the number of records that are associated with a file. |
GetDataSetInfo_2 | Returns file metadata that is specific to SAS. This is a revised version of GetDataSetInfo, which permits larger record counts. |
GetRecordCounts_2 | Returns information about the number of records that are associated with a file. This is a revised version of GetRecordCounts, which permits larger record counts. |
As part of the ISASDataSetInfo90 custom interface, the GetDataSetInfo_2 method returns SAS file metadata that is not supported by predefined OLE DB constructs.
HRESULT GetDataSetInfo_2( SASDATASETINFO90 ** ppDataSetInfo, OLECHAR ** ppStringsBuffer );
This method makes no logical change to the state of the object.
Under some circumstances, the actual values for the llLogicalRecordCount and llPhysicalRecordCount members of the SASDATASETINFO90 structure will not be immediately available. This is the case when the underlying data set is something other than a physical SAS data file (for example, a SAS data view, a WHERE clause, or a SAS/ACCESS file). In those cases, the members return a -1. To determine the actual values, call ISASDataSetInfo90::GetRecordCounts_2.
The GetDataSetInfo_2 method returns file metadata in a SASDATASETINFO90 structure.
typedef struct tagSASDATASETINFO90 { LONGLONG llLogicalRecordCount; LONGLONG llPhysicalRecordCount; LONG lRecordLength; DATE dDateCreated; DATE dDateModified; LPOLESTR pwszLabel; LPOLESTR pwszCompressionRoutine; BOOL fIsIndexed; } SASDATASETINFO90;
The elements (members) of the SASDATASETINFO90 structure are described in the following table:
Element | Description |
---|---|
llLogicalRecordCount | The number of logical records in the data set. This is the number of records that are returned if the caller sequentially reads through the entire data set. If this value is not immediately available, a value of -1 is returned in this field. This is the case when the data set is not a physical file (for example, a SAS data view or a WHERE clause). In such cases, you can use the GetRecordCounts_2 method to computationally determine this value. |
llPhysicalRecordCount | The number of physical records in the data set. This number can be greater than the number of logical records and can indicate the magnitude of the physical file size. If this value is not immediately available, a value of -1 is returned in this field; this is the case when the data set is not a physical SAS file (for example, a SAS data view or a SAS/ACCESS table). In such cases, you can use the GetRecordCounts_2 method to computationally determine this value. |
lRecordLength | The physical record length in bytes. |
dDateCreated | The date that the data set was created. |
dDateModified | The date that the data set was last modified. |
pwszLabel | The data set label. NULL if none is set. |
pwszCompressionRoutine | The name of the compression algorithm used. NO if none is set. |
fIsIndexed | TRUE if an index exists on the data set. |
As part of the ISASDataSetInfo90 custom interface, the GetRecordCounts_2 method forces a count of the number of logical and physical records in a data set. Call this method only when GetDataSetInfo_2 returns -1 in the SASDATASETINFO90 llLogicalRecordCount and llPhysicalRecordCount fields.
HRESULT GetRecordCounts_2( LONGLONG * pllLogicalRecordCount, LONGLONG * pllPhysicalRecordCount );
This method determines record counts by forcing a sequential read of the data set. If the underlying data set is large, the read can take a significant amount of time.
CAUTION:
Some data sets contain millions of records. Executing this method on a very large data set may incur a significant performance cost.
About Custom Interfaces
ISASDataSetInfo Custom Interface
ISASColumnsInfo Custom Interface