Module StandardsService

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

Since: 2.1

Macro Summary
external

LSAF
%lsaf_exportstandard(lsaf_standardid=, lsaf_status=, lsaf_standardversion=, lsaf_path=, lsaf_prefix=, lsaf_overwrite=, lsaf_enableversioning=, lsaf_versiontypefornewfiles=, lsaf_customversfornewfiles=, lsaf_versiontypeforexistingfiles=, lsaf_customversforexistingfiles=, lsaf_comment=, sas_result_dsname=work.lsafexportstandard);
Exports the metadata for a global standard. The metadata is stored in a SAS data set in the ...
external

LSAF
%lsaf_exportstandardtows(lsaf_standardid=, lsaf_status=, lsaf_standardversion=, lsaf_path=, lsaf_prefix=, lsaf_overwrite=, sas_result_dsname=work.lsafexportstandardtows);
Exports to the workspace of the current user the metadata for a global data standard. ...
external

LSAF
%lsaf_getstandardid(lsaf_name=, lsaf_status=);
Gets the standard identifier for a standard. The SAS macro variable _lsafStandardId_ is set to ...
external

LSAF
%lsaf_getstandardsbystatus(lsaf_status=, sas_dsname=work.lsafgetstandardsbystatus);
Gets the metadata for all of the data standards by the specified status. The metadata is stored ...

Macro Detail

%lsaf_exportstandard(lsaf_standardid=, lsaf_status=, lsaf_standardversion=, lsaf_path=, lsaf_prefix=, lsaf_overwrite=, lsaf_enableversioning=, lsaf_versiontypefornewfiles=, lsaf_customversfornewfiles=, lsaf_versiontypeforexistingfiles=, lsaf_customversforexistingfiles=, lsaf_comment=, sas_result_dsname=work.lsafexportstandard);

[ Exposure: external ]
Exports the metadata for a global standard. The metadata is stored in a SAS data set in the
repository. The paths of the exported files are stored in a SAS data set.

Syntax:
%LSAF_EXPORTSTANDARD(LSAF_STANDARDID=lsaf-standardid,
LSAF_STATUS=lsaf-status,
LSAF_STANDARDVERSION=lsaf-standardversion,
LSAF_PATH=lsaf-path,
LSAF_PREFIX=lsaf-prefix,
LSAF_OVERWRITE=lsaf-overwrite,
LSAF_ENABLEVERSIONING=lsaf-enableversioning,
LSAF_VERSIONTYPEFORNEWFILES=lsaf-versiontypefornewfiles,
LSAF_CUSTOMVERSFORNEWFILES=lsaf-customversfornewfiles,
LSAF_VERSIONTYPEFOREXISTINGFILES=lsaf-versiontypeforexistingfiles,
LSAF_CUSTOMVERSFOREXISTINGFILES=lsaf-customversforexistingfiles,
LSAF_COMMENT=lsaf-comment,
SAS_RESULT_DSNAME=WORK.LSAFEXPORTSTANDARD);

          
History:
   2019-06-07
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_standardid - - Required - The identifier of the data standard. The identifier can be
        retrieved by calling the lsaf_getstandardid macro.
lsaf_status - - Required - The in-progress status of the standard. Valid values:
        PUBLISHED, INPROGRESS, CHECKEDOUT. The default value is PUBLISHED.
lsaf_standardversion - - Optional - The version of a PUBLISHED standard to export. A blank
        value returns the latest version. This option is ignored, if status is not PUBLISHED.
lsaf_path - - Required - The output path for the exported files.
lsaf_prefix - - Required - The prefix of the SAS data sets that are created for the
        exported data standards. All text is converted to lowercase.
lsaf_overwrite - - Optional - Indicated whether existing nonversioned data sets are
        overwritten. Valid values: 0 (Default): No, 1: Yes.
lsaf_enableversioning - - Optional - Enable versioning for new exported files.
        Valid values: 0 (Default): No, 1: Yes.
lsaf_versiontypefornewfiles - - Conditional - The version type (MAJOR, MINOR, CUSTOM) to
        used to create a file, if enableversioning is True. Default: MAJOR.
lsaf_customversfornewfiles - - Conditional - The version number to use to create a
        customized versioned file. This option is ignored, if versiontypefornewfiles is not CUSTOM.
lsaf_versiontypeforexistingfiles - - Conditional - The version type (MAJOR, MINOR, CUSTOM)
        for an existing file. Default: MINOR.
lsaf_customversforexistingfiles - - Conditional - The version number to use for an
        existing customized versioned file. This option is ignored, if versiontypeforexistingfiles
        is not CUSTOM.
lsaf_comment - - Optional - The check-in comment to associate with adding the data sets to
        the repository.
sas_result_dsname - - Optional - The name of the output SAS data set to contain the path,
        name, and location of the exported data standards SAS data sets, specified as
        libref.dataset. The default is WORK.LSAFEXPORTSTANDARD. The data set contains a row for
        each export data set and columns with the following names. The data set is sorted by
        path.
        - location: The location of the exported file (REPOSITORY).
        - name: The name of the exported file.
        - path: The path of the exported file.
File: lsaf_exportstandard.sas
First available in version: 2.2

%lsaf_exportstandardtows(lsaf_standardid=, lsaf_status=, lsaf_standardversion=, lsaf_path=, lsaf_prefix=, lsaf_overwrite=, sas_result_dsname=work.lsafexportstandardtows);

[ Exposure: external ]
Exports to the workspace of the current user the metadata for a global data standard.
The paths of the exported files are stored in a SAS data set.

Syntax:
%LSAF_EXPORTSTANDARDTOWS(LSAF_STANDARDID=lsaf-standardid,
LSAF_STATUS=lsaf-status,
LSAF_STANDARDVERSION=lsaf-standardversion,
LSAF_PATH=lsaf-path,
LSAF_PREFIX=lsaf-prefix,
LSAF_OVERWRITE=lsaf-overwrite,
SAS_RESULT_DSNAME=WORK.LSAFEXPORTSTANDARDTOWS);

          
History:
   2019-06-07
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_standardid - - Required - The identifier of the data standard. The identifier can be
        retrieved by calling the lsaf_getstandardid macro.
lsaf_status - - Required - The status of the data standard to export. Valid values:
        PUBLISHED, INPROGRESS, CHECKEDOUT. The default is PUBLISHED.
lsaf_standardversion - - Optional - The version of a PUBLISHED data standard to export.
        A blank value returns the latest version. This option is ignored, if status is not PUBLISHED.
lsaf_path - - Required - The output path for the export files.
lsaf_prefix - - Required - The prefix for the SAS data sets that are created for the
        exported data standards. All letters are converted to lowercase.
lsaf_overwrite - - Optional - Indicates whether existing data sets are overwritten.
        Valid values: 0 (Default): No, 1: Yes.
sas_result_dsname - - Optional - The name of the output SAS data set to contain the path,
        name, and location of the exported data standards SAS data sets, specified as
        libref.dataset. The default is WORK.LSAFEXPORTSTANDARDTOWS. The data set contains a row
        for the export data set and columns with the following names. The data set is sorted
        by path.
        - location: The location of the exported file (WORKSPACE).
        - name: The name of the exported file.
        - path: The path of the exported file.
File: lsaf_exportstandardtows.sas
First available in version: 2.2

%lsaf_getstandardid(lsaf_name=, lsaf_status=);

[ Exposure: external ]
Gets the standard identifier for a standard. The SAS macro variable _lsafStandardId_ is set to
the identifier.

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

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

%lsaf_getstandardsbystatus(lsaf_status=, sas_dsname=work.lsafgetstandardsbystatus);

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

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

          
History:
   2019-06-07
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 data standards to return.
        Valid values: PUBLISHED, INPROGRESS, and CHECKEDOUT. The default is PUBLISHED.
sas_dsname - - Optional - The name of the output SAS data set to contain the metadata
        for the data standards, specified as libref.dataset. The default value is
        WORK.LSAFGETSTANDARDSBYSTATUS. The data set contains a row for each data standard,
        sorted by the standard ID, and columns with the following names:
        - id: The unique standard identifier.
        - name: The data standard name.
        - baseStandardType: The base data standard type.
        - baseStandardName: The base data standard name.
        - baseStandardVersion: The base data standard version.
        - modelId: The model identifier.
        - description: The data standard description.
        - isCheckedOut: Indicates whether the data standard is checked out. Valid values:
        0: no, 1: yes.
        - checkedOutBy: The identifier of the user who has the data standard checked out, if
        it is checked out. This should always be the identifier of the current user.
        - checkedOutDate: The date on which the data standard was checked out, if it is
        checked out.
        - checkedOutDateSASFormat: The date on which the data standard was checked out
        (in SAS format), if it is checked out.
        - createdDate: The date on which the data standard was created.
        - createdDateSASFormat: The date on which the data standard was created (in SAS
        format).
        - createdBy: The identifier of the user who created the data standard.
        - state: The state of the data standard.
        - publishedState: The published state of the data standard.
        - currentVersion: The current published version of the data standard.
        - associatedStudiesCount: The number of studies that are associated with the data
        standard.
        - lastModifiedDate: The date on which the data standard was last modified.
        - lastModifiedDateSASFormat: The date on which the data standard was last modified
        (in SAS format).
        - lastModifiedBy: The identifier of the user who last modified the data standard.
        - standardStatus: The status of the data standard.
File: lsaf_getstandardsbystatus.sas
First available in version: 2.2