Module WorkspaceService

Macros to manage content in the current user's workspace.

Since: 2.1

Macro Summary
external

LSAF
%lsaf_createworkspacefolder(lsaf_path=);
Creates a folder in the workspace of the current user.
external

LSAF
%lsaf_deleteworkspaceitem(lsaf_path=);
Deletes a workspace item. Deleted items are permanently deleted and not moved to the ...
external

LSAF
%lsaf_existsinworkspace(lsaf_path=);
Indicates whether an item exists in the workspace of the current user.
external

LSAF
%lsaf_getworkspacechildren(lsaf_path=, sas_dsname=work.lsafGetWorkspaceChildren, lsaf_recursive=0);
Gets the metadata for items in a folder in the workspace of the current user. The metadata is ...
external

LSAF
%lsaf_markworkspaceitemforadd(lsaf_path=);
Marks a workspace item to be marked for addition to the repository.

Macro Detail

%lsaf_createworkspacefolder(lsaf_path=);

[ Exposure: external ]
Creates a folder in the workspace of the current user.

All parent folders that do not exist are created.

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

          
History:
   2016-09-29
initial coding
   2019-03-04
update to 2.1
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path to the folder.
File: lsaf_createworkspacefolder.sas
First available in version: 1.5

%lsaf_deleteworkspaceitem(lsaf_path=);

[ Exposure: external ]
Deletes a workspace item. Deleted items are permanently deleted and not moved to the
recycle bin.


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

          
History:
   2019-01-21
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path to the item.
File: lsaf_deleteworkspaceitem.sas
First available in version: 2.1

%lsaf_existsinworkspace(lsaf_path=);

[ Exposure: external ]
Indicates whether an item exists in the workspace of the current user.

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

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

          
History:
   2016-09-23
original coding
   2019-01-09
renamed lsaf_workspaceobjectexists to lsaf_existsinworkspace
Expected Macro Variables:
_lsafExistsInWorkspace_ - Indicates whether the item exists.
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path to the item.
File: lsaf_existsinworkspace.sas
First available in version: 1.5

%lsaf_getworkspacechildren(lsaf_path=, sas_dsname=work.lsafGetWorkspaceChildren, lsaf_recursive=0);

[ Exposure: external ]
Gets the metadata for items in a folder in the workspace of the current user. The metadata is
stored in a SAS data set.

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

          
History:
   2016-11-09
initial coding
   2018-01-09
updates LSAF 5.1 functionality
   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 workspace.
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.LSAFGETWORKSPACECHILDREN. The data set contains a row for each item in the
        list and columns with the following names. The data set is sorted by the path.
        - name: The name of the item.
        - path: The path of the item.
        - itemType: The type of the item.
        - isFolder: Indicates whether the item is a folder. Valid values: 0=no, 1=yes.
        - lastModified: The date on which the item was last modified, reprented as a
        String.
        - dateLastModified: The date on which the item was last modified, represented as a
        SAS Datetime format.
lsaf_recursive - - Optional - The level of recursion. Valid values:
        - 0 (Default): Returns the folder only.
        - 1: Returns the folder and its immediate children.
        - 2: Returns the folder, its immediate children, and all items within one
        level of the subfolders of the folder.
        - 99: Returns the folder and all of the subfolders and items
        (traverses the entire tree).
File: lsaf_getworkspacechildren.sas
First available in version: 1.5

%lsaf_markworkspaceitemforadd(lsaf_path=);

[ Exposure: external ]
Marks a workspace item to be marked for addition to the repository.

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

          
History:
   2019-01-09
Initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_path - - Required - The path of the workspace item.
File: lsaf_markworkspaceitemforadd.sas
First available in version: 2.1