Skip to content

SAS API Reference

Christopher Blake edited this page Jul 25, 2020 · 2 revisions

%bafGetDatasets();

This macro deserialises all the JavaScript data objects that have been passed into SAS tables. The name of the dataset is part of the adapter JS call.

%bafHeader;

This macro prepares the output stream for data object output. Conceptually similar to %STPBEGIN

%bafOutDataset(objectName, libn, dsn, h54skeys=);

This macro serialises a SAS dataset to a JavaScript data object.

objectName is the name of the target JS object that the table will be serialised into

libn is the libname of the dataset to be serialised and transmitted to the frontend

dsn is the name of the dataset itself

h54skeys is an optional parameter that controls the output format of the data. By default, the data will be returned as a key => value object. When this option is turned on with %bafOutDataset(class, work, class, h54skeys=nokeys); then the data is returned as an array of arrays: array[0] is the metadata of the table and array[1] is the actual data.

%bafFooter;

This macro closes the output stream for data objects. Counterpart to %bafHeader. Conceptually similar to %STPEND.