I'm unable to extract the format specification; example attached.
I'm using the latest version 2.0.11.
class.zip
FileInputStream in = null;
try
{
in = new FileInputStream("C:\\opt\\sas\\class.sas7bdat");
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
SasFileReader sasFileReader = new SasFileReaderImpl(in);
List<Column> columns = sasFileReader.getColumns();
for (Column c : columns)
{
System.out.println(c.getName() + " | " + c.getFormat() + " | " + c.getFormat().getWidth() + " | " + c.getFormat().getPrecision());
}
Resut:
Name | | 0 | 0
Sex | | 0 | 0
Age | | 0 | 0
Height | | 0 | 0
Weight | | 0 | 0
Properties from SAS EG:
