Module RepositoryService

Macros to manage content in the repository.

Since: 2.1

Macro Summary
external

LSAF
%lsaf_checkin(lsaf_path=, lsaf_comment=, lsaf_versiontype=MINOR, lsaf_customversion=);
Checks in a repository file.
external

LSAF
%lsaf_checkout(lsaf_path=);
Checks out a repository file.
external

LSAF
%lsaf_copy(lsaf_source=, lsaf_target=);
Copies a file or folder to the specified location.
external

LSAF
%lsaf_createcontext(lsaf_path=, lsaf_typeid=);
Creates a context in the repository.
external

LSAF
%lsaf_createfile(local_path=, lsaf_path=, lsaf_enableversioning=, lsaf_version=, lsaf_comment=);
Uploads a file from the local machine to the repository.
external

LSAF
%lsaf_createfolder(lsaf_path=);
Creates a folder in the repository.
external

LSAF
%lsaf_delete(lsaf_path=);
Logically deletes an item. Deleted items are moved to the recycle bin.
external

LSAF
%lsaf_disableversioning(lsaf_path=, lsaf_comment=);
Disables versioning for a repository file.
external

LSAF
%lsaf_downloadfile(lsaf_path=, lsaf_version=, local_path=);
Downloads a file to a local computer from the repository.
external

LSAF
%lsaf_enableversioning(lsaf_path=, lsaf_version=, lsaf_comment=);
Enables versioning for a repository file.
external

LSAF
%lsaf_exists(lsaf_path=);
Indicates whether a repository item exists.
external

LSAF
%lsaf_getcheckedoutfiles(lsaf_checkedoutby=%str(_LSAF_VALUE_NOT_PROVIDED_), lsaf_name=%str(_LSAF_VALUE_NOT_PROVIDED_), lsaf_location=%str(_LSAF_VALUE_NOT_PROVIDED_), sas_dsname=work.lsafGetCheckedOutFiles, lsaf_printLimitReachedWarning=1);
Gets the checked out file information for the specified user,file, or location within the ...
external

LSAF
%lsaf_getchildren(lsaf_path=, sas_dsname=work.lsafGetChildren, lsaf_recursive=0);
Gets the metadata for the items that are within a container in the repository. The metadata ...
external

LSAF
%lsaf_getcontextstate(lsaf_path=);
Gets the state value for the specified context in the repository. The SAS macro variable ...
external

LSAF
%lsaf_getcopytoworkspacestatus(lsaf_path=);
Gets the value for the Copy to Workspace status of a file or folder in the repository. The ...
external

LSAF
%lsaf_getitemid(lsaf_path=);
Gets the identification value for a Repository item. The user can only retrieve the value for ...
external

LSAF
%lsaf_getparentmembershipcontext(lsaf_path=);
Gets the nearest parent context with the membership capability for the specified path.
external

LSAF
%lsaf_getproperties(lsaf_path=, lsaf_version=, sas_dsname=work.lsafGetProperties);
Gets the properties of an item in the repository. The properties are stored in a SAS data set.
external

LSAF
%lsaf_gettoplevelcontexts(sas_dsname=work.lsafGetTopLevelContexts);
Gets the metadata for the contexts at the top hierarchical structure in the repository to ...
external

LSAF
%lsaf_gettype(lsaf_path=);
Gets the item type for the item at the specified repository path.
external

LSAF
%lsaf_getversions(lsaf_path=, sas_dsname=work.lsafGetVersions);
Gets the metadata for all of the versions of a file. The metadata is stored in a SAS data set.
external

LSAF
%lsaf_ischeckedout(lsaf_path=);
Indicates whether a repository file is checked out.
external

LSAF
%lsaf_iscontainer(lsaf_path=);
Indicates whether a repository item is a container. Containers include folders and contexts.
external

LSAF
%lsaf_isfilelocked(lsaf_path=);
Indicates whether a file that is in the repository is locked.
external

LSAF
%lsaf_isversioned(lsaf_path=);
Indicates whether a repository file is versioned.
external

LSAF
%lsaf_lockfile(lsaf_path=);
Locks a file that is in the repository.
external

LSAF
%lsaf_move(lsaf_source=, lsaf_target=);
Moves a file or folder to the specified target location. Contexts cannot be moved.
external

LSAF
%lsaf_permanentlydelete(lsaf_path=);
Permanently deletes an item. Deleted items are not moved to the recycle bin and cannot ...
external

LSAF
%lsaf_rename(lsaf_source=, lsaf_newname=);
Renames an item in the repository. The new name must include the file extension, otherwise ...
external

LSAF
%lsaf_search(lsaf_location=, lsaf_name=, lsaf_typeid=, lsaf_owner=, lsaf_lastmodifiedby=, lsaf_createdby=, lsaf_fromcreated=, lsaf_tocreated=, lsaf_fromlastmodified=, lsaf_tolastmodified=, lsaf_content=, lsaf_copytoworkspacestatus=, sas_dsname=work.lsafSearch, lsaf_printLimitReachedWarning=1);
Searches for an item in the repository. Although all parameters are optional, at least one ...
external

LSAF
%lsaf_syncfiletoworkspace(lsaf_path=, lsaf_version=);
Copies the version of the repository file to the same location in the workspace of the current ...
external

LSAF
%lsaf_undocheckout(lsaf_path=);
Undoes the checkout of a file that is in the repository.
external

LSAF
%lsaf_unlockfile(lsaf_path=);
Unlocks a file that is in the repository.
external

LSAF
%lsaf_updatecontextstate(lsaf_path=, lsaf_state=, lsaf_comment=, lsaf_recursive=0);
Updates the state of a context in the repository. Attempting to set the state of a context to ...
external

LSAF
%lsaf_updatecopytoworkspacestatus(lsaf_path=, lsaf_status=);
Updates the value for the Copy To Workspace status of a file or folder in the repository. ...
external

LSAF
%lsaf_updatefile(local_path=, lsaf_path=, lsaf_comment=, lsaf_versiontype=MAJOR, lsaf_customversion=);
Updates the contents of a file in the repository.
external

LSAF
%lsaf_updateproperties(lsaf_path=, sas_dsname=);
Updates the editable properties of a repository item, using a SAS data set as input.

Macro Detail

%lsaf_checkin(lsaf_path=, lsaf_comment=, lsaf_versiontype=MINOR, lsaf_customversion=);

[ Exposure: external ]
Checks in a repository file.

Syntax:
%LSAF_CHECKIN(LSAF_PATH=lsaf-path
,LSAF_COMMENT=lsaf-comment
,LSAF_VERSIONTYPE=lsaf-versiontype
<,LSAF_CUSTOMVERSION=lsaf-customversion>));

          
History:
   2016-10-05
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file in the repository.
lsaf_comment - - Optional - The comment to associate with the check in.
lsaf_versiontype - - Optional - The version type (MINOR, MAJOR, or CUSTOM) to create
        by the check-in action. Default: MINOR.
lsaf_customversion - - Conditional - The specific version to create by the check-in
        action. The parameter is required when lsaf_versiontype is set to CUSTOM.
        Otherwise, it is ignored. Custom version numbers must be in the valid format,
        which includes a decimal point, such as 1.0 or 4.2.
File: lsaf_checkin.sas
First available in version: 1.5

%lsaf_checkout(lsaf_path=);

[ Exposure: external ]
Checks out a repository file.

Syntax:
%LSAF_CHECKOUT(LSAF_PATH=lsaf-path);

          
History:
   2016-10-04
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file in the repository.
File: lsaf_checkout.sas
First available in version: 1.5

%lsaf_copy(lsaf_source=, lsaf_target=);

[ Exposure: external ]
Copies a file or folder to the specified location.

The copy of a versioned file is not versioned. The children of a copied folder are also
copied to the new location and maintain their original directory structure.

Syntax:
%LSAF_COPY(LSAF_SOURCE=lsaf-source-path, LSAF_TARGET=lsaf-target-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_source - - Required - The path of the item.
lsaf_target - - Required - The path (including the name) into which to copy the file or
        folder. The required parent folders are created for the copied file, if they do
        not exist.
File: lsaf_copy.sas
First available in version: 1.1

%lsaf_createcontext(lsaf_path=, lsaf_typeid=);

[ Exposure: external ]
Creates a context in the repository.

The output data set from the lsaf_getcontexttypes macro can be used to determine the
valid context types.

Syntax:
%LSAF_CREATECONTEXT(LSAF_PATH=lsaf-path, LSAF_TYPEID=lsaf-typeid);

Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the context.
lsaf_typeid - - Required - The type ID of the context.
File: lsaf_createcontext.sas
First available in version: 2.1

%lsaf_createfile(local_path=, lsaf_path=, lsaf_enableversioning=, lsaf_version=, lsaf_comment=);

[ Exposure: external ]
Uploads a file from the local machine to the repository.

All parent folders that do not exist are created.

NOTE: This macro is supported only from a PC SAS session. Using this macro within an active
SAS Life Science Analytics Framework application session results in a failure.

Syntax:
%LSAF_CREATEFILE(LOCAL_PATH=local-path, LSAF_PATH=lsaf-path
<, LSAF_ENABLEVERSIONING=lsaf-enable-versioning, LSAF_VERSION=lsaf-version,
LSAF_COMMENT=lsaf_comment>);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-29
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
local_path - - Required - The absolute path and name of the file on the local computer.
lsaf_path - - Required - The path and name of the file to create. Files can only be
        created in SAS Life Science Analytics Framework areas that support folder and file
        creation.
lsaf_enableversioning - - Optional - Indicates whether the file to create is versioned.
        Valid values:
        - 0 (Default): Create a non-versioned file.
        - 1: Create a versioned file. The user must have the Enable Versioning privilege
        in the context in which to create the file or this operation fails.
lsaf_version - - Conditional - The version number to assign to the file. The value must
        be in the valid version label format, which includes a decimal point. This option
        is ignored when creating an unversioned file.
lsaf_comment - - Conditional - The comment for the versioned file. This option is
        ignored when creating an unversioned file.
File: lsaf_createfile.sas
First available in version: 1.1

%lsaf_createfolder(lsaf_path=);

[ Exposure: external ]
Creates a folder in the repository.

All parent folders that do not exist are created.

Syntax:
%LSAF_CREATEFOLDER(LSAF_PATH=lsaf-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the folder.
File: lsaf_createfolder.sas
First available in version: 1.1

%lsaf_delete(lsaf_path=);

[ Exposure: external ]
Logically deletes an item. Deleted items are moved to the recycle bin.

NOTE: Context items cannot be logically deleted. Attempting to delete a context
results in a failure.

Syntax:
%LSAF_DELETE(LSAF_PATH=lsaf-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-26
rebrand as LSAF
   2019-01-07
renamed from lsaf_deleteobject for 5.x behavior
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the item.
File: lsaf_delete.sas
First available in version: 1.1

%lsaf_disableversioning(lsaf_path=, lsaf_comment=);

[ Exposure: external ]
Disables versioning for a repository file.

Syntax:
%LSAF_DISABLEVERSIONING(LSAF_PATH=lsaf-path <, LSAF_COMMENT=lsaf-comment>);

          
History:
   2014-04-07
initial coding
   2016-10-03
release as external
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file.
lsaf_comment - - Optional - The comment to associate with the action.
        The comment is visible in the audit trail.
File: lsaf_disableversioning.sas
First available in version: 1.5

%lsaf_downloadfile(lsaf_path=, lsaf_version=, local_path=);

[ Exposure: external ]
Downloads a file to a local computer from the repository.

If the local folder does not exist, it is created. If the local file exists, it is overwritten.

NOTE: This macro is supported only from a PC SAS session. Using this macro within an active
SAS Life Science Analytics Framework application session results in a failure.

Syntax:
%LSAF_DOWNLOADFILE(LSAF_PATH=lsaf-path, LSAF_VERSION=lsaf-version>, LOCAL_PATH=local-path);

          
History:
   2013-10-30
initial coding
   2016-08-26
rebrand as LSAF
   2019-02-16
Update to 2.1
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file in the repository.
lsaf_version - - Conditional - The version of the file to download, if the file is
        versioned. If the file is versioned and a specific version is specified, the value
        must be in the valid format, which includes a decimal point, such as 1.0 or 4.2.
        If the file is versioned and no version is specified, the latest version is
        downloaded. If the file is unversioned and a specific version is specified, a failure
        occurs.
local_path - - Required - The full path and name of the file on the local computer.
File: lsaf_downloadfile.sas
First available in version: 1.3

%lsaf_enableversioning(lsaf_path=, lsaf_version=, lsaf_comment=);

[ Exposure: external ]
Enables versioning for a repository file.

Syntax:
%LSAF_ENABLEVERSIONING(LSAF_PATH=lsaf-path <, LSAF_VERSION=lsaf-version,
LSAF_COMMENT=lsaf-comment>);

          
History:
   2014-04-07
initial coding
   2016-10-03
release as external
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file in the repository.
lsaf_version - - Optional - The version number of the file. If not specified, the value
        defaults to 1.0. The value must be in the valid format, which includes a
        decimal point, such as 1.0 or 4.2.
lsaf_comment - - Optional - The comment to associate with the action. This value appears
        in the audit trail.
File: lsaf_enableversioning.sas
First available in version: 1.5

%lsaf_exists(lsaf_path=);

[ Exposure: external ]
Indicates whether a repository item exists.

The SAS macro variable _lsafExists_ is set to a value of 1 when the item exists, and 0
when it does not. In the event of an incorrect call to the macro that results in an
error, the return value of _lsafExists_ is set to -1.

Syntax:
%LSAF_EXISTS(LSAF_PATH=lsaf-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
   2019-01-08
renamed lsaf_objectexists to lsaf_exists
Expected Macro Variables:
_lsafExists_ - Indicates whether the item exists.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the item.
File: lsaf_exists.sas
First available in version: 1.1

%lsaf_getcheckedoutfiles(lsaf_checkedoutby=%str(_LSAF_VALUE_NOT_PROVIDED_), lsaf_name=%str(_LSAF_VALUE_NOT_PROVIDED_), lsaf_location=%str(_LSAF_VALUE_NOT_PROVIDED_), sas_dsname=work.lsafGetCheckedOutFiles, lsaf_printLimitReachedWarning=1);

[ Exposure: external ]
Gets the checked out file information for the specified user,file, or location within the
repository. The information is stored in a SAS data set. *;

This macro requires that the logged on user have the administrative privilege
PRIVILEGE_MANAGE_CHECKEDOUT_FILES. The SAS Life Science Analytics Framework limits the number
of items that can be returned from a query. The macro variable _lsafCOFSearchLimitReached_
returns a 0, if this maximum limit is not reached, and a 1, if the limit is reached. If the
limit is reached, there might be checked out files in the repository that meet the given
search criteria. A more refined search is needed to retrieve those records.

Syntax:
%LSAF_GETCHECKEDOUTFILES(<LSAF_CHECKEDOUTBY=lsaf-checkedoutby,
LSAF_NAME=lsaf-name,
LSAF_LOCATION=lsaf-location,
SAS_DSNAME=SAS-data-set,
LSAF_PRINTLIMITREACHEDWARNING = lsaf-print-limit-reached-warning>);

          
History:
   2016-12-16
initial coding.
   2019-11-01
update to handle a blank SAS output file.
Expected Macro Variables:
_lsafCOFSearchLimitReached_ - The search limit reached flag.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_checkedoutby - - Optional - The ID of the user who checked out the files. If set to *
        (such as lsaf_checkedoutby=*) or omitted, the files that are checked out by any user
        are returned. Wildcards can be used. For example, lsaf_checkedoutby=ge* returns
        the files that are checked out by users whose account name starts with ge.
lsaf_name - - Optional - The name of the file. If set to * (such as lsaf_name=*) or
        omitted, all files are returned. Wildcards can be used. For example,
        lsaf_name=*.sas returns all file names with a .sas extension.
lsaf_location - - Optional - The folder path of the files. If set to * (such as
        lsaf_location=*) or omitted, files from any location are returned. Wildcards can
        be used. For example, lsaf_location=/SAS/File* returns all information with a
        file path that starts with /SAS/File.
sas_dsname - - Optional - The name of the output SAS data set to contain the checked
        out files information for the specified checked out by user, name, and location,
        specified as libref.dataset. The default value is WORK.LSAFGETCHECKEDOUTFILES.
        The output data set contains a single row for each checked out file and contains the
        following columns:
        - name: The name of the file.
        - size: The size (in bytes) of the file.
        - formattedsize: The size of the file, expressed in units such as KB or MB.
        - checkedoutby: The user who checked out the file.
        - modifieddate: The date on which the file was last modified.
        - version: The current version of the file that is checked out.
        - status: The workspace status of the file: NOT_CHECKED_OUT, CHECKED_OUT, or
        MARKED_FOR_ADD.
lsaf_printLimitReachedWarning - - Optional - Indicates whether to print the message
        about the server query limit being reached as a WARNING or a NOTE. Valid values:
        - 0: NOTE
        - 1 (Default): WARNING.
        This option applies only when the _lsafCOFSearchLimitReached_ macro is 1.
File: lsaf_getcheckedoutfiles.sas
First available in version: 1.5

%lsaf_getchildren(lsaf_path=, sas_dsname=work.lsafGetChildren, lsaf_recursive=0);

[ Exposure: external ]
Gets the metadata for the items that are within a container in the repository. The metadata
is stored in a SAS data set. To retrieve the children of the root level, call the
lsaf_gettopcontexts macro.

Syntax:
%LSAF_GETCHILDREN(LSAF_PATH=lsaf-path <, LSAF_RECURSIVE=recursion-level,
SAS_DSNAME=SAS-data-set>);

          
History:
   2013-06-28
version 1.2 update - path length
   2013-08-30
updates for standardization and coding conventions
   2014-05-07
updated documentation and fixed data set processing.
   2016-08-29
rebrand as LSAF
   2019-08-15
documentation updated to reference lsaf_getTopLevelContexts.
   2019-11-01
update to handle a blank SAS output file.
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the container.
sas_dsname - - Optional - The name of the output SAS data set to contain the metadata
        for the items, specified as libref.dataset. The default value is
        WORK.LSAFGETCHILDREN. The data set contains a row for each item in the list and
        columns with the following names. The data set is sorted by path.
        - name: The name of the item.
        - path: The path of the item.
        - itemType: The type of the item (such as folder or data set).
        - description: The description of the item.
        - isContainer: Indicates whether the item is a container. Valid values:
        - 0: No
        - 1: Yes
        - isVersioned: Indicates whether the item is currently versioned. Valid values:
        - 0: No
        - 1: Yes
        - version: The version that is associated with this specific item.
        - isCheckedOut: Indicates whether the item is currently checked out. Valid values:
        - 0: No
        - 1: Yes
        - isLocked: Indicates whether the item is currently locked. Valid values:
        - 0: No
        - 1: Yes
        - size: The size (in bytes) of the item. This is 0 for a container.
        - createdBy: The identifier of the user who created the item.
        - created: The full date and time on which the item was created, represented as
        a String.
        - dateCreated: The date on which the item was created, represented as a SAS
        Datetime format.
        - lastModifiedBy: The identifier of the user who last modified the item.
        - lastModified: The date on which the item was last modified, represented as a
        String.
        - dateLastModified: The date on which the item was last modified, represented as
        a SAS Datetime format.
        - propertiesLastModifiedBy: The identifier of the user who last modified the
        properties of the item.
        - propertiesLastModified: The date on which the item properties were last
        modified, represented as a String.
        - datePropertiesLastModified: The date on which the item properties were last
        modified, represented as a SAS Datetime format.
        - state: The state of the item, if the item is a context. Valid values:
        ACTIVE and CLOSED.
        - signatureStatus: Indicates whether the item has electronic signatures attached.
        Valid values:
        - NONE: No signatures are associated with the file.
        - PREVIOUS: At least one previous version of the file is signed and the
        current version is not signed.
        - CURRENT: The current version of the file is signed, and no previous versions
        are signed.
        - CURRENT_AND_PREVIOUS: The current version of the file is signed and there
        is at least one previous version that is signed.
lsaf_recursive - - Optional - The level of recursion, if the item is a container.
        Valid values:
        - 0 (Default): Returns the container only.
        - 1: Returns the container and its immediate children.
        - 2: Returns the container, its immediate children, and all items within one
        level of the container subfolders.
        - 99: Returns the container and all of the sub containers and items
        (traverses the entire tree).
        For a file, the value is ignored.
File: lsaf_getchildren.sas
First available in version: 1.1

%lsaf_getcontextstate(lsaf_path=);

[ Exposure: external ]
Gets the state value for the specified context in the repository. The SAS macro variable
_lsafContextState_ is set to the state value. Values returned:
- ACTIVE: The context is in active state.
- CLOSED: The context is in closed state.

Syntax:
%LSAF_GETCONTEXTSTATE(LSAF_PATH=lsaf-path);

          
History:
   2019-01-30
initial code
Expected Macro Variables:
_lsafContextState_ - The state of the context.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path to the context.
File: lsaf_getcontextstate.sas
First available in version: 2.1

%lsaf_getcopytoworkspacestatus(lsaf_path=);

[ Exposure: external ]
Gets the value for the Copy to Workspace status of a file or folder in the repository. The
SAS macro variable _lsafCopyToWSStatus_ is set to the status value. Values returned:
- ALLOW: Allow all.
- WARN: Warn (excluding published jobs).
- DENY: Deny (excluding published jobs).
- DENY_ALL: Deny all.

Syntax:
%LSAF_GETCOPYTOWORKSPACESTATUS(LSAF_PATH=lsaf-path);

          
History:
   2016-11-22
initial code
Expected Macro Variables:
_lsafCopyToWSStatus_ - The Copy to Workspace status.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file.
File: lsaf_getcopytoworkspacestatus.sas
First available in version: 1.5

%lsaf_getitemid(lsaf_path=);

[ Exposure: external ]
Gets the identification value for a Repository item. The user can only retrieve the value for
an item if they have read access to that item. The SAS macro variable _lsafItemId_ is set to
the item ID.

Syntax:
%LSAF_GETITEMID(LSAF_PATH=lsaf-path);

          
History:
   2019-07-31
Initial coding
Expected Macro Variables:
_lsafItemId_ - The item ID.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The case-sensitive path of the item.
File: lsaf_getitemid.sas
First available in version: 2.2

%lsaf_getparentmembershipcontext(lsaf_path=);

[ Exposure: external ]
Gets the nearest parent context with the membership capability for the specified path.

The SAS macro variable _lsafParentMembershipContext_ is set to the parent membership context
value. The value is set to blank, if the parent membership context could not be found or an
error occurred.

Syntax:
%LSAF_GETPARENTMEMBERSHIPCONTEXT(LSAF_PATH=lsaf-path);

          
History:
   2019-01-10
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafParentMembershipContext_ - The parent membership context.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path to the repository item.
File: lsaf_getparentmembershipcontext.sas
First available in version: 2.1

%lsaf_getproperties(lsaf_path=, lsaf_version=, sas_dsname=work.lsafGetProperties);

[ Exposure: external ]
Gets the properties of an item in the repository. The properties are stored in a SAS data set.

Syntax:
%LSAF_GETPROPERTIES(LSAF_PATH=lsaf-path <, LSAF_VERSION=lsaf-version,
SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2014-04-18
updates to surface extended attribute metadata.
   2016-08-26
rebrand as LSAF
   2017-01-10
updates to retrieve a file by version number
   2018-12-10
documentation update for LSAF 5.x behavior
   2019-11-01
update to handle a blank SAS output file.
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the item in the repository.
lsaf_version - - Optional - The specific file version. If omitted or set to blank, the
        properties for the current file version are returned.
sas_dsname - - Optional - The name of the output SAS data set to the metadata for the
        item, specified as libref.dataset. The default value is WORK.LSAFGETPROPERTIES.
        The data set contains variables that represent each element of metadata for the
        item. The data set is sorted by the NAME variable. The following metadata is
        represented in the data set.
        - path: The path of the item
        - name: The name of the property.
        - value: The value of the property.
        - displayName: The name of the property as displayed as a label within SAS Life
        Science Analytics Framework.
        - type: The type of the property. Valid values: STRING, DATE, and BOOLEAN.
        - isReadonly: Indicates whether the property cannot be modified.
        - isExtended: Indicates whether the property is an extended attribute.
        Note: Extended attributes are included, but the names represent the system identifier. The
        recognizable label is shown in the display name variable.
File: lsaf_getproperties.sas
First available in version: 1.2

%lsaf_gettoplevelcontexts(sas_dsname=work.lsafGetTopLevelContexts);

[ Exposure: external ]
Gets the metadata for the contexts at the top hierarchical structure in the repository to
which the user has Read access. The metadata is stored in a SAS data set.

Syntax:
%LSAF_GETTOPLEVELCONTEXTS();

          
History:
   2019-08-09
original version
   2019-11-01
update to handle a blank SAS output file.
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
sas_dsname - - Optional - The name of the output SAS data set to contain the metadata
        for the contexts, specified as libref.dataset. The default value is
        WORK.LSAFGETTOPLEVELCONTEXTS. The data set contains a row for each context in the
        list and columns with the following names. The data set is sorted by path.
        - name: The name of the item.
        - path: The path of the item.
        - itemType: Type of the item (such as sas:organization or businessunit).
        - description: The description of the item.
        - createdBy: The identifier of the user who created the item.
        - created: The full date and time on which the item was created, represented as
        a String.
        - dateCreated: The date on which the item was created, represented as a SAS
        Datetime format.
        - lastModifiedBy: The identifier of the user who last modified the item.
        - lastModified: The date on which the item was last modified, represented as a
        String.
        - dateLastModified: The date on which the item was last modified, represented as
        a SAS Datetime format.
        - propertiesLastModifiedBy: The identifier of the user who last modified the
        properties of the item.
        - propertiesLastModified: The date on which the item properties were last
        modified, represented as a String.
        - datePropertiesLastModified: The date on which the item properties were last
        modified, represented as a SAS Datetime format.
        - state: The state of the item. Valid values: ACTIVE and CLOSED.
File: lsaf_gettoplevelcontexts.sas
First available in version: 2.2

%lsaf_gettype(lsaf_path=);

[ Exposure: external ]
Gets the item type for the item at the specified repository path.

The SAS macro variable _lsafType_ is set to the item type value. The value is set to blank,
if the item cannot be found or an error occurs.
Valid values:
- sas:container
- sas:file
- sas:folder
- sas:job
- sas:pdf
- sas:sasdataset
- sas:sasprogram

Any of the valid context types can also be returned as possible item type values.
Syntax:

%LSAF_GETTYPE(LSAF_PATH=lsaf-path);

          
History:
   2014-03-07
initial coding
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
   2019-01-08
renamed from lsaf_getobjecttype to lsaf_gettype
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
_lsafType_ - The item type.
Parameters:
lsaf_path - - Required - The path of the item.
File: lsaf_gettype.sas
First available in version: 1.4

%lsaf_getversions(lsaf_path=, sas_dsname=work.lsafGetVersions);

[ Exposure: external ]
Gets the metadata for all of the versions of a file. The metadata is stored in a SAS data set.

Syntax:
%LSAF_GETVERSIONS(LSAF_PATH=lsaf-path <, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2014-05-07
updated documentation and fixed data set processing.
   2016-01-23
updates for LSAF 5.1
   2016-08-26
rebrand as LSAF
   2019-11-01
update to handle a blank SAS output file.
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the item in the repository.
sas_dsname - - Optional - The name of the output SAS data set to contain the metadata
        for the versions, specified as libref.dataset. The default value is
        WORK.LSAFGETVERSIONS. The data set contains a row for each version of the item
        and columns with the following names. The most recent version is the first
        observation in the data set.
        - path: The path of the item.
        - version: The version that is associated with this specific item.
        - isLatest: Indicates whether the item is the latest version. Valid values:
        - 0: No.
        - 1: Yes.
        - isSigned: Indicates whether the item has electronic signatures attached to it.
        Valid values:
        - 0: No.
        - 1: Yes.
        - size: The size (in bytes) of the item. This is 0 for a container.
        - comment: The comment that was added when the version was created.
        - createdBy: The user ID that created the item.
        - created: The full date and time on which the item was created,
        represented as a String.
        - dateCreated: The date on which the item was created, represented as a SAS
        Datetime format.
File: lsaf_getversions.sas
First available in version: 1.2

%lsaf_ischeckedout(lsaf_path=);

[ Exposure: external ]
Indicates whether a repository file is checked out.

The SAS macro variable _lsafIsCheckedOut_ is set to a value of 1, if the file is checked out,
0 if it is not. In the event of an incorrect call to the macro that results in an error, the return
value of _lsafIsCheckedOut_ is set to -1.

Syntax:
%LSAF_ISCHECKEDOUT(LSAF_PATH=lsaf-path);

          
History:
   2016-10-04
Initial coding
   2018-01-09
updates to documentation for LSAF 5.1
   2019-02-19
update to 2.1
Expected Macro Variables:
_lsafIsCheckedOut_ - Indicates whether the file is checked out or not.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file.
File: lsaf_ischeckedout.sas
First available in version: 1.5

%lsaf_iscontainer(lsaf_path=);

[ Exposure: external ]
Indicates whether a repository item is a container. Containers include folders and contexts.

The SAS macro variable _lsafIsContainer_ is set to a value of 1, if the specified item is a
container item, 0 if it is not. In the event of an incorrect call to the macro that results in
an error, the return value of _lsafIsContainer_ is set to -1.

Syntax:
%LSAF_ISCONTAINER(LSAF_PATH=lsaf-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
Expected Macro Variables:
_lsafIsContainer_ - Indicates whether the item is a container.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the item in the repository.
File: lsaf_iscontainer.sas
First available in version: 1.2

%lsaf_isfilelocked(lsaf_path=);

[ Exposure: external ]
Indicates whether a file that is in the repository is locked.

The SAS macro variable _lsafIsFileLocked_ is set to a value of 1, if the file is locked, and 0, if it
is not locked. In the event of an incorrect call to the macro that results in an error, the return
value of _lsafIsFileLocked_ is set to -1.

Syntax:
%LSAF_ISFILELOCKED(LSAF_PATH=lsaf-path);

          
History:
   2020-01-22
Initial coding
Expected Macro Variables:
_lsafIsFileLocked_ - Indicates whether the file is locked or not.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file.
File: lsaf_isfilelocked.sas
First available in version: 2.3

%lsaf_isversioned(lsaf_path=);

[ Exposure: external ]
Indicates whether a repository file is versioned.

The SAS macro variable _lsafIsVersioned_ is set to a value of 1, if the file is versioned,
0 if it is not. In the event of an incorrect call to the macro that results in an error, the
the return value of _lsafIsVersioned_ will be set to -1.

Syntax:
%LSAF_ISVERSIONED(LSAF_PATH=lsaf-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-26
rebrand as LSAF
   2018-01-09
updates to documentation for LSAF 5.1
Expected Macro Variables:
_lsafIsVersioned_ - Indicates whether the file is versioned.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path to the file.
File: lsaf_isversioned.sas
First available in version: 1.1

%lsaf_lockfile(lsaf_path=);

[ Exposure: external ]
Locks a file that is in the repository.

The person who runs the macro must have the Manage Locking role privilege.

Syntax:
%LSAF_LOCKFILE(LSAF_PATH=lsaf-path);

          
History:
   2020-01-22
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file.
File: lsaf_lockfile.sas
First available in version: 2.3

%lsaf_move(lsaf_source=, lsaf_target=);

[ Exposure: external ]
Moves a file or folder to the specified target location. Contexts cannot be moved.

The item to move must not exist in the target location. The children of a moved folder are
also moved to the target location, keeping their directory structure and version history
(if any) intact.

Syntax:
%LSAF_MOVE(LSAF_SOURCE=lsaf-source-path, LSAF_TARGET=lsaf-target-path);

Example Code:

%lsaf_move(lsaf_source=%str(/contextName/srcFolder/scrFile.txt),
lsaf_target=%str(/contextName/destFolder/scrFile.txt));

          
History:
   2014-03-03
initial coding
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_source - - Required - The path of the file or folder.
lsaf_target - - Required - The full path to which to move the file or folder.
        The target location must exist. The path cannot end with a slash (/).
File: lsaf_move.sas
First available in version: 1.4

%lsaf_permanentlydelete(lsaf_path=);

[ Exposure: external ]
Permanently deletes an item. Deleted items are not moved to the recycle bin and cannot
be restored. To move an item to the recycle bin, use the macro %lsaf_delete().

NOTE: Context items cannot be permanently deleted. Attempting to delete a context
results in a failure.

Syntax:
%LSAF_PERMANENTLYDELETE(LSAF_PATH=lsaf-path);

          
History:
   2019-03-04
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the item.
File: lsaf_permanentlydelete.sas
First available in version: 2.1

%lsaf_rename(lsaf_source=, lsaf_newname=);

[ Exposure: external ]
Renames an item in the repository. The new name must include the file extension, otherwise
the renaming occurs without the file having any extension.

An item with the new name must not exist in the current location.

Syntax:
%LSAF_RENAME(LSAF_SOURCE=lsaf-source-path, LSAF_NEWNAME=lsaf-new-name);

          
History:
   2014-03-03
initial coding
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
   2019-01-08
rename lsaf_renameobject to lsaf_rename
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_source - - Required - The path, which includes the name.
lsaf_newname - - Required - The new name.
        Sample calls
        %lsaf_rename(lsaf_source=/SAS/File/saspgm.sas,lsaf_newname=saspgm2.sas)
        Renames the file saspgm.sas in /SAS/File to saspgm2.sas
        %lsaf_rename(lsaf_source=/SAS/File/Progect1,lsaf_newname=Project2)
        Renames the container Project1 in /SAS/File to Project2
File: lsaf_rename.sas
First available in version: 1.4

%lsaf_search(lsaf_location=, lsaf_name=, lsaf_typeid=, lsaf_owner=, lsaf_lastmodifiedby=, lsaf_createdby=, lsaf_fromcreated=, lsaf_tocreated=, lsaf_fromlastmodified=, lsaf_tolastmodified=, lsaf_content=, lsaf_copytoworkspacestatus=, sas_dsname=work.lsafSearch, lsaf_printLimitReachedWarning=1);

[ Exposure: external ]
Searches for an item in the repository. Although all parameters are optional, at least one
parameter value must be specified to start a search.

The SAS Life Science Analytics Framework limits the number of items that are returned from
from a search. The macro variable _lsafSearchLimitReached_ returns a 0 if the limit is
is not reached and a 1 if the limit is reached. If the limit is reached, there might be
items in the repository that meet the search criteria. A more refined search is needed to
retrieve those records.

With the exception of the location and datetime parameters, wildcards can be used in the
seach values. For example:

lsaf_name=user* searches for any occurrence that starts with 'user'.
lsaf_name=*use* searches for any occurrence that contains 'use'.
lsaf_name=us?r searches for any occurence that starts with 'us', then any 1 character, and
then ending in 'r'.

All datetime search parameters must be in one of the formats that are described below. Date
values in formats other than the two described below result in an execution failure.
- SAS datetime18. format (such as 02NOV2013:09:33:22) - an offset of zero hours
from GMT is used.
- SAS E8601DZ25. format (such as 2013-11-02T09:33:22-04:00).

Syntax:
%LSAF_SEARCH(<LSAF_LOCATION=lsaf-location, LSAF_NAME=lsaf-name, LSAF_TYPEID=lsaf-typeid,
LSAF_OWNER=lsaf-owner, LSAF_LASTMODIFIEDBY=lsaf-lastmodifiedby,
LSAF_CREATEDBY=lsaf-createdby, LSAF_FROMCREATED=lsaf-fromcreated,
LSAF_TOCREATED=lsaf-tocreated, LSAF_FROMLASTMODIFIED=lsaf-fromlastmodified,
LSAF_TOLASTMODIFIED=lsaf-tolastmodified, LSAF_CONTENT=lsaf-content=,
LSAF_COPYTOWSSTATUS=lsaf-copy-to-workspace-status, SAS_DSNAME=work.lsafSearch,
LSAF_PRINTLIMITREACHEDWARNING = lsaf-print-limit-reached-warning>);

          
History:
   2019-05-10
Initial development
   2019-11-01
update to handle a blank SAS output file.
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
_lsafSearchLimitReached_ - The search limit reached flag.
Parameters:
lsaf_location - - Optional - The location to search.
lsaf_name - - Optional - The name of the item.
lsaf_typeid - - Optional - The type of the item. Type ids can be retrieved using the
        macro lsaf_getsearchabletypes.
lsaf_owner - - Optional - The owner of the item.
lsaf_lastmodifiedby - - Optional - The user account that last modified the item.
lsaf_createdby - - Optional - The user account that created the item.
lsaf_fromcreated - - Optional - The earliest date on which the item was created. Must be
        in the Datetime format that is listed above.
lsaf_tocreated - - Optional - The latest date on which the item was created. Must be in
        the Datetime format that is listed above.
lsaf_fromlastmodified - - Optional - The earliest date on which the item was last
        modified. Must be in the Datetime format that is listed above.
lsaf_tolastmodified - - Optional - The latest date on which the item was last modified.
        Must be in the Datetime format that is listed above.
lsaf_content - - Optional - The content value of the file.
lsaf_copytoworkspacestatus - - Optional - The status of the Copy to Workspace property.
        Valid values:
        - ALLOW: Allow all.
        - WARN: Warn (excluding published jobs).
        - DENY: Deny (excluding published jobs).
        - DENY_ALL: Deny all.
sas_dsname - - Optional - The name of the output SAS data set to contain the metadata
        for the items, specified as libref.dataset. The default value is
        WORK.LSAFSEARCH. The data set contains a row for each item in the list and
        columns with the following names. The data set is be sorted by the path.
        - name: The name of the item.
        - path: The path of the item.
        - itemType: The type of the item (such as folder or data set).
        - description: The description of the item.
        - isContainer: Indicates whether the item is a container. Valid values:
        0=no, 1=yes.
        - isVersioned: Indicates whether the item is currently versioned. Valid values:
        0=no, 1=yes.
        - version: The version that is associated with the item.
        - isCheckedOut: Indicates whether the item is currently checked out. Valid values:
        0=no, 1=yes.
        - isLocked: Indicates whether the item is currently locked. Valid values:
        0=no, 1=yes.
        - size: The size (in bytes) of the item. Thsi value is 0 for a container.
        - createdBy: The ID of the user account that created the item.
        - created: The full date and time on which the item was created, represented
        as a String.
        - dateCreated: The date on which the item was created, represented as a SAS
        Datetime format.
        - lastModifiedBy: The ID of the user account that last modified the item.
        - lastModified: The date on which the item was last modified, represented as a
        String.
        - dateLastModified: The date on which the item was last modified, represnted as
        a SAS Datetime format.
        - propertiesLastModifiedBy: The ID of the user account that last modified the
        properties for the item.
        - propertiesLastModified: The date on which the item properties were last
        modified, represented as a String.
        - datePropertiesLastModified: The date on which the item properties were last
        modified, represented as a SAS Datetime format.
        - state: This variable is for context items only. It indicates the state of the
        context: ACTIVE or CLOSED.
        - signatureStatus: Indicates whether the item has electronic signatures attached
        to it. Valild values:
        - NONE: There are no signatures associated with the file.
        - PREVIOUS: There is at least one previous version of the file that is
        signed and the current version is not signed.
        - CURRENT: The current version of the file is signed, and no previous version
        is signed.
        - CURRENT_AND_PREVIOUS: The current version of the file is signed, and there
        is at least one previous version of the file that is signed.
lsaf_printLimitReachedWarning - - Optional - Indicates whether to write to the SAS log
        file the message about the server query limit being reached as a WARNING or a
        NOTE. Valid values:
        - 0: Print the message as a NOTE.
        - 1 (Default): Print the message as a WARNING.
        This option applies only when the _lsafSearchLimitReached_ macro is 1.
File: lsaf_search.sas
First available in version: 2.2

%lsaf_syncfiletoworkspace(lsaf_path=, lsaf_version=);

[ Exposure: external ]
Copies the version of the repository file to the same location in the workspace of the current
user.

Syntax:
%LSAF_SYNCFILETOWORKSPACE(LSAF_PATH=lsaf-path, LSAF_VERSION=lsaf-version>);

          
History:
   2014-04-07
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file in the repository.
lsaf_version - - Conditional - The version of the file to synchronize, if the file is
        versioned. If the file is versioned and a version is specified, the value must
        be in the valid format, which includes a decimal point, such such as 1.0 or 4.2.
        If the file is versioned and no version is specified, the latest version is
        synchronized. If the file is unversioned and a version is specified, the value is
        ignored.
File: lsaf_syncfiletoworkspace.sas
First available in version: 1.4

%lsaf_undocheckout(lsaf_path=);

[ Exposure: external ]
Undoes the checkout of a file that is in the repository.

Syntax:
%LSAF_UNDOCHECKOUT(LSAF_PATH=lsaf-path);

          
History:
   2020-02-10
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file.
File: lsaf_undocheckout.sas
First available in version: 2.3

%lsaf_unlockfile(lsaf_path=);

[ Exposure: external ]
Unlocks a file that is in the repository.

The person who runs the macro must have the Manage Locking role privilege.

Syntax:
%LSAF_UNLOCKFILE(LSAF_PATH=lsaf-path);

          
History:
   2020-01-22
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the file.
File: lsaf_unlockfile.sas
First available in version: 2.3

%lsaf_updatecontextstate(lsaf_path=, lsaf_state=, lsaf_comment=, lsaf_recursive=0);

[ Exposure: external ]
Updates the state of a context in the repository. Attempting to set the state of a context to
the state that the context is currently in results in the request being ignored, with no error
generated. The lsaf_recursive parameter applies only when reactivating a context. The behavior
for closing a context is to automatically close all children.

To determine whether the state of a context can change, the capabilities column from the output
data set generated by %lsaf_getcontexttypes contains the value STATE.

Syntax:
%LSAF_UPDATECONTEXTSTATE(LSAF_PATH=lsaf-path, LSAF_STATE=lsaf-state,
< LSAF_COMMENT=lsaf-comment, LSAF_RECURSIVE=lsaf-recursive>);

          
History:
   2019-01-29
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the context.
lsaf_state - - Required - The state to set.
        Values: ACTIVE | CLOSED
lsaf_comment - - Optional - The reason for the state change.
lsaf_recursive - - Optional - Indicates whether the state of the children of the context,
        if any exist, are updated. This parameter applies only when reactivating a context.
        The behavior for closing a context is to automatically close all children.
        Valid values:
        - 0 (Default)
        - 1
File: lsaf_updatecontextstate.sas
First available in version: 2.1

%lsaf_updatecopytoworkspacestatus(lsaf_path=, lsaf_status=);

[ Exposure: external ]
Updates the value for the Copy To Workspace status of a file or folder in the repository.
Valid values:
- ALLOW: Allow all.
- WARN: Warn (excluding published jobs).
- DENY: Deny (excluding published jobs).
- DENY_ALL: Deny all.

Syntax:
%LSAF_UPDATECOPYTOWORKSPACESTATUS(LSAF_PATH=lsaf-path, LSAF_STATUS=lsaf-status);

          
History:
   2016-11-22
initial code
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path to the file.
lsaf_status - - Required - The Copy To Workspace status.
File: lsaf_updatecopytoworkspacestatus.sas
First available in version: 2.1

%lsaf_updatefile(local_path=, lsaf_path=, lsaf_comment=, lsaf_versiontype=MAJOR, lsaf_customversion=);

[ Exposure: external ]
Updates the contents of a file in the repository.

If the file is versioned, a new version is created. If the file is not versioned, the current
contents are overwritten.

NOTE: This macro is supported only from a PC SAS session. Using this macro within an active
SAS Life Science Analytics Framework application session results in a failure.

Syntax:
%LSAF_UPDATEFILE(LOCAL_PATH=local-path, LSAF_PATH=lsaf-path <, LSAF_COMMENT=lsaf-comment>,
LSAF_VERSIONTYPE=lsaf-version-type, LSAF_CUSTOMVERSION=lsaf-customversion>);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2016-08-26
rebrand as LSAF
   2018-01-09
updates to documentation for LSAF 5.1
   2019-02-19
update to 2.1
   2019-10-30
update to allow custom version
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
local_path - - Required - The absolute path to the file on the local computer.
lsaf_path - - Required - The path of the file in the repository to update. The file must
        exist and must not be a container.
lsaf_comment - - Conditional - The comment for a versioned file. This value is ignored for an
        unversioned file.
lsaf_versiontype - - Conditional - The type of version to create, if the file to update is
        versioned. Valid values: MAJOR (Default), MINOR, and CUSTOM.
        This value is ignored for an unversioned file.
lsaf_customversion - - Conditional - The specific version to create. If lsaf_versiontype is
        CUSTOM, the parameter is required. Otherwise, it is ignored.
        Custom version numbers must be in the valid format, which includes a decimal point,
        such as 1.0 or 4.2.
File: lsaf_updatefile.sas
First available in version: 1.1

%lsaf_updateproperties(lsaf_path=, sas_dsname=);

[ Exposure: external ]
Updates the editable properties of a repository item, using a SAS data set as input.

The output data set from the lsaf_getproperties macro contains the necessary variables
and data needed as the input data set for the lsaf_updateproperties macro. The column
isReadonly indicates whether the field can be updated: 0 allows updates, 1 does not.
Modify the data set with any changes prior to calling lsaf_updateproperties.
- Data in the input data set that do not correspond to a property of the item being
updated are ignored.
- Values that are specified for properties that are not editable are ignored.
- An input data value that is the same as the current property value is ignored and
will not update the property. No audit record is created for the property.

Not all properties can be updated using the lsaf_updateproperties macro.
- Use the lsaf_updatecontextstate macro to update a context state.
- Use the lsaf_updatecopytoworkspacestatus macro to update the "Copy to Workspace"
property.

Syntax:
%LSAF_UPDATEPROPERTIES(LSAF_PATH=lsaf-path, SAS_DSNAME=SAS-data-set);

          
History:
   2014-04-24
initial coding
   2016-08-26
rebrand as LSAF
   2018-12-10
documentation update for LSAF 5.x behavior
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the item in the repository.
sas_dsname - - Required - The name of a SAS data set that contains the property
        values to set on the repository item, specified as libref.dataset.
        The data set must contain at least the variables listed below. Additional
        variables are ignored.
        - name: The name of the property.
        - value: The value.
File: lsaf_updateproperties.sas
First available in version: 1.4