Publish Package Interface |
This CALL routine retrieves a data set entry from a package.
CALL RETRIEVE_DATASET(entryId, libname, memname,
rc
<, properties, propValue1, ...propValueN>);
properties
parameter. Valid property values are defined as follows:
application/x-comma-separated-values
. Use the CSV_SEPARATOR property
to indicate the separator to be used when creating the CSV file. The default separator is a comma. If the
CSV file was created at publish time by transforming a SAS data set into a CSV
file, the separator used to create the CSV file will always take precedence.
If the CSV file was not created at publish time, the CSV_SEPARATOR property
may be used to specify the separator value used. If the CSV file was not
created at publish time and no separator property is specified, the separator
is specified as a comma, by default.application/x-comma-separated-values
. This property is a CSV
override flag. By default when converting this binary CSV file into a SAS data
set, the first line will be processed as variable names. The second line will
be processed as variable label names. All remaining lines will be processed as
data. To override this default behavior, the CSV_FLAG value must be
NO_VARIABLES or NO_LABELS. To specify both values, specify two CSV_FLAG
properties, one with a value of NO_VARIABLES, the other with a value of
NO_LABELS.
By default, when a CSV file is converted into a data set, the variable lengths are determined by the first row of data. If subsequent rows have greater lengths, the variable data is truncated. To override this default behavior, specify the CSV_FLAG with a property of NO_TRUNCATION. When this flag value is specified, truncation will not occur, but multiple passes of the data may be necessary in order to perform the resizing.
If the MEMNAME parameter is blank, the RETRIEVE_DATASET CALL routine creates the data set using the original member name as it was defined at publish time.
The following example retrieves the data set WORK.OUTDATA entry from the package.
lib = 'work'; mem = 'outdata'; CALL RETRIEVE_DATASET(rid, lib, mem, rc);
The following example specifies two CSV_FLAG properties.
prop='CSV_SEPARATOR,CSV_FLAG,CSV_FLAG'; separator='/'; flag1 = 'NO_VARIABLES'; flag2 = 'NO_LABELS'; CALL RETRIEVE_DATASET(entryId, libname, memname, rc, prop, separator, flag1, flag2);
Publish Package Interface |