Base SAS
data sets can have formats associated with each column. When reading
SAS data sets with the IOM driver, you can control whether those formats
are applied.
By default,
the formats associated with a Base SAS data set are not applied when
data is retrieved. In order to apply SAS formatting, you set the apply_formats
connection property to
true
. The code
looks like this:
properties.setProperty("apply_formats", "true");
When apply_formats
is set to
true
, all data is returned
from the server as a string with column formatting applied. To access
the data, you use the getString method on the result set. For example,
assume that a column with the format
“5.”
has a value of
15.2854
. If apply_formats
is set to
true
, then calling getString
for that value will return
“15”
.