Contents SAS IOM Data Provider Previous Next

SASFORMAT Structure

Use the SASFORMAT structure to bind columns for example, (use IAccessor::CreateAccessor() calls)  to apply SAS format and informat processing to columns during read, write, and update operations.

typedef enum
{
    SASFMT_FORMAT,
    SASFMT_INFORMAT
} SASFMTENUM;

typedef struct tagSASFORMAT
{
    SASFMTENUM          wType;
    LPOLESTR            pwszName;
    SHORT               iLength;
    SHORT               iDecimals;
} SASFORMAT;

The elements of the SASFORMAT structure are used as follows:

ElementDescription
wTypeIndicates whether a particular instance of a SASFORMAT structure applies to formatting (SASFMT_FORMAT) or informatting (SASFMT_INFORMAT) a column.
pwszNamePointer to a string that represents the name of the format or informat to use to override the associated column's default value.
iLengthSpecifies the width to apply to the format or informat.  If this is nonzero, it will override the associated column's default value.
iDecimalsSpecifies the number of significant decimal places to include in when applying numeric formats or informats.  If this is nonzero, it will override the associated column's default value.
Contents SAS IOM Data Provider Previous Next