Storage of format metadata
is supported in SAS data sets, SPD Engine data sets, SPD Server tables,
and SASHDAT files only. As a result, when they are used in Base SAS,
SAS data sets that were created with FedSQL behave the same as data
sets that were created with SAS.
You
specify formats in the CREATE TABLE statement as an attribute of the
HAVING clause. For more information, see CREATE TABLE Statement. For example, in the following statement, the column
profit is
declared with the EURO13.2 format.
create table monthly (profit double having format euro13.2);
To change or remove
a stored format, you must use Base SAS. When you want to display a
different format for a column that has a stored format value when
reading a table with FedSQL, use the PUT function.
FedSQL supports stored
formats as follows:
-
-
All formats that are supplied by
SAS can be stored. For a list of formats, see SAS Formats and Informats: Reference. FedSQL does not validate the formats. If the stored
format is invalid, an error occurs, but only when the invalid format
is used in the client application.
-
Formats can be stored only for
columns of data types CHAR and DOUBLE.
-
To access the stored formats, you
must have a Base SAS session available. The Base SAS session contains
the SAS format definitions and SAS catalog file that stores the user-defined
SAS format definitions.
-
You can store and retrieve format
names. The format name is associated with a column by storing the
format as a metadata attribute on the column. The metadata then can
be retrieved for subsequent operations.