SAS formats and informats are documented in the book SAS 9.4 Formats and Informats Reference. A format can be a built-in format provided by SAS or it can be a user-defined format created using PROC FORMAT. Likewise, an informat can be a built-in informat provided by SAS or it can be a user-defined informat created using PROC FORMAT. PROC FORMAT is documented in the book Base SAS 9.4 Procedures Guide.
The following table summarizes the support in IML Studio for formats and informats:
| IML Studio Component | SAS Format Support | SAS Informat Support | User-Defined Format Support | User-Defined Informat Support |
|---|---|---|---|---|
| IMLPlus language | Y | Y | Y | Y |
| DataObject class | Y | Y | Y | Y |
| Interactive data views | Y | Y | Y | N |
Note that the interactive data views do not support every single SAS format that exists. They support SAS formats that make sense in the IML Studio context and they do not support SAS formats that do not make sense in the IML Studio context. For example, the IB format used for writing fixed-point binary values is supported by the IMLPlus language but not by the interactive data views.
The interactive data views can display values that are formatted by a user-defined format. For a data view to display a user-defined format, the SAS Workspace Server to which the data view's workspace is attached must be configured as follows:
The FMTSEARCH option is documented in the book SAS 9.4 System Options Reference.
The following example demonstrates the process of creating a new user-defined format, using it in a data set, and viewing the data set using the IML Studio data table.
submit;
proc format;
value GENDER 0='Male'
1='Female'
other='Bad coding';
run;
data TEST;
format X GENDER.;
input X @@;
datalines;
0 1 0 1 0 1
;
endsubmit;
declare DataObject dobj;
dobj = DataObject.CreateFromServerDataSet( "TEST" );
DataTable.Create( dobj ).SetWindowPosition( 50, 0, 50, 50 );