Module DictionaryService

Macros to get and export dictionary information in SAS Life Science Analytics Framework.

Since: 2.1

Macro Summary
external

LSAF
%lsaf_exportdictionary(lsaf_dictionaryid=, lsaf_status=, lsaf_dictionaryversion=, lsaf_location=, lsaf_path=, lsaf_overwrite=, lsaf_enableversioning=, lsaf_versiontype=, lsaf_customversion=, lsaf_comment=);
Exports the metadata for a controlled terminology dictionary. The metadata is stored in a SAS ...
external

LSAF
%lsaf_getdictionariesbystatus(lsaf_status=, sas_dsname=work.lsafgetdictionariesbystatus);
Gets the metadata for all of the dictionaries by the specified status. The metadata is stored in ...
external

LSAF
%lsaf_getdictionaryid(lsaf_name=, lsaf_status=);
Gets the dictionary identifer for a controlled terminology dictionary. The SAS macro variable ...

Macro Detail

%lsaf_exportdictionary(lsaf_dictionaryid=, lsaf_status=, lsaf_dictionaryversion=, lsaf_location=, lsaf_path=, lsaf_overwrite=, lsaf_enableversioning=, lsaf_versiontype=, lsaf_customversion=, lsaf_comment=);

[ Exposure: external ]
Exports the metadata for a controlled terminology dictionary. The metadata is stored in a SAS
data set based on the specified location (WORKSPACE or REPOSITORY).

Syntax:
%LSAF_EXPORTDICTIONARY(LSAF_DICTIONARYID=lsaf-dictionaryid,
LSAF_STATUS=lsaf-status,
LSAF_DICTIONARYVERSION=lsaf-dictionaryversion,
LSAF_LOCATION=lsaf-location,
LSAF_PATH=lsaf-path,
LSAF_OVERWRITE=lsaf-overwrite,
LSAF_ENABLEVERSIONING=lsaf-enableversioning,
LSAF_VERSIONTYPE=lsaf-versiontype,
LSAF_CUSTOMVERSION=lsaf-customversion,
LSAF_COMMENT=lsaf-comment);

          
History:
   2019-06-27
initial coding
Expected Macro Variables:
_lsafDictionaryPath_ - The full path of the dictionary data set, which includes the file
        extension. If the dictionary data set is not created, _lsafDictionaryPath_ is blank.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_dictionaryid - - Required - The identifier of the dictionary. The identifier can be
        retrieved by calling the lsaf_getdictionaryid macro.
lsaf_status - - Required - The status of the dictionary. Valid values: PUBLISHED,
        INPROGRESS, and CHECKEDOUT. The default value is PUBLISHED.
lsaf_dictionaryversion - - Optional - The version of a PUBLISHED dictionary to export. A
        blank value returns the latest version. This option is ignored, if the status is not PUBLISHED.
lsaf_location - - Required - The case-insensitive output location for the dictionary file.
        Valid values: WORKPSACE and REPOSITORY.
lsaf_path - - Required - The output path for the dictionary file. If the file extension is
        not specified, it is added during processing.
lsaf_overwrite - - Optional - Indicates whether to overwrite an existing unversioned data
        set. Valid values: 0 (Default): No, 1: Yes.
lsaf_enableversioning - - Optional - Indicates whether new exported file is versioned.
        Ignored, if lsaf_location=WORKSPACE. Valid values: 0 (Default): No, 1: Yes
lsaf_versiontype - - Conditional - The version type (MAJOR, MINOR, CUSTOM) to use to create
        a file, if enableversioning is True. The default is MAJOR. This option is ignored, if
        lsaf_location=WORKSPACE.
lsaf_customversion - - Conditional - The version number to use to create a customized
        versioned file. This option is ignored, if lsaf_location=WORKSPACE or if lsaf_versiontype is
        not CUSTOM.
lsaf_comment - - Optional - The check-in comment to associate with the action of adding the
        data set to the repository. This option is ignored, if lsaf_location=WORKSPACE.
File: lsaf_exportdictionary.sas
First available in version: 2.2

%lsaf_getdictionariesbystatus(lsaf_status=, sas_dsname=work.lsafgetdictionariesbystatus);

[ Exposure: external ]
Gets the metadata for all of the dictionaries by the specified status. The metadata is stored in
a SAS data set.

Syntax:
%LSAF_GETDICTIONARIESBYSTATUS(LSAF_STATUS=lsaf-status,
<SAS_DSNAME=WORK.LSAFGETDICTIOANRIESBYSTATUS>);

          
History:
   2019-06-25
initial coding
   2019-11-01
update to handle a blank SAS output file.
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_status - - Required - The status of the dictionaries to return.
        Valid values: PUBLISHED, INPROGRESS, and CHECKEDOUT. The default value is PUBLISHED.
sas_dsname - - Optional - The name of the output SAS data set to contain the metadata
        for the dictionaries, specified as libref.dataset. The default value is
        WORK.LSAFGETDICTIONARIESBYSTATUS. The data set contains a row for each dictionary,
        sorted by the dictionary ID, and columns with the following names:
        - id: The unique dictionary identifier.
        - name: The dictionary name.
        - standard: The associated data standard.
        - description: The dictionary description.
        - isCheckedOut: Indicates whether the dictionary is checked out. Valid values:
        0: no, 1: yes.
        - checkedOutBy: The identifier of the user who has the dictionary checked out, if it
        is checked out. This should always be the identifier of the current user.
        - checkedOutDate: The date on which the dictionary was checked out, if it is checked
        out.
        - checkedOutDateSASFormat: The date on which the dictionary was checked out (SAS
        Format), if it is checked out.
        - createdDate: The date on which the dictionary was created.
        - createdDateSASFormat: The date on which the dictionary was created (in SAS Format).
        - createdBy: The identifier of the user who created the dictionary.
        - state: The state of the dictionary.
        - publishedState: The published state of the dictionary.
        - currentVersion: The current published version of the dictionary.
        - associatedStudiesCount: The number of studies that are associated with the
        dictionary.
        - lastModifiedDate: The date on which the dictionary was last modified.
        - lastModifiedDateSASFormat: The date on which the dictionary was last modified (in
        SAS Format).
        - lastModifiedBy: The identifier of the user of who last modified the dictionary.
        - releaseDate: The date on which the dictionary was released.
        - dictionaryStatus: The status of the dictionary.
File: lsaf_getdictionariesbystatus.sas
First available in version: 2.2

%lsaf_getdictionaryid(lsaf_name=, lsaf_status=);

[ Exposure: external ]
Gets the dictionary identifer for a controlled terminology dictionary. The SAS macro variable
_lsafDictionaryId_ is set to the identifer.

Syntax:
%LSAF_GETDICTIONARYID(LSAF_NAME=lsaf-name, LSAF_STATUS=lsaf-status);

          
History:
   2019-07-23
Initial coding
Expected Macro Variables:
_lsafDictionaryId_ - The dictionary identifer.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_name - - Required - The case-sensitive name of the dictionary.
lsaf_status - - Optional - The status of the dictionary. The default is PUBLISHED.
        Valid values: PUBLISHED, INPROGRESS, CHECKEDOUT.
File: lsaf_getdictionaryid.sas
First available in version: 2.2