Module sdd_macro_api

The SAS Drug Development Macro API release 1.4 is available for use with SAS Drug Development Java API release 1.7.1.

Since: 1.4

Macro Summary
external

SDD
%sasdrugdev_addgroupmember(sdd_path=, sdd_group=, sdd_type=USER, sdd_member=, sdd_group_context=);
Adds a user or group as a member of a group in the specified organization, project, or ...
external

SDD
%sasdrugdev_addmember(sdd_path=, sdd_member=, sdd_type=USER, sdd_group_context=);
Adds a user or a group as a member of the specified organization, project, or analysis.
external

SDD
%sasdrugdev_addrolemember(sdd_path=, sdd_role=, sdd_role_context=, sdd_member=, sdd_type=USER, sdd_group_context=);
Adds a user or group as a member of a role in the specified organization, project, or ...
external

SDD
%sasdrugdev_addroleprivilege(sdd_path=, sdd_role=, sdd_privilege=);
Adds a privilege to a role in the specified organization, project, or analysis.
external

SDD
%sasdrugdev_adduserprivilege(sdd_userid=, sdd_privilege=);
Assign a global privilege to a user in the system.
external

SDD
%sasdrugdev_assignedroleexists(sdd_path=, sdd_role=, sdd_role_context=);
Determine if a role exists (as defined or inherited) in an organization, project, or analysis.
external

SDD
%sasdrugdev_assignrole(sdd_path=, sdd_role=, sdd_role_context=);
Assigns a role to the specified organization, project, or analysis as an inherited role.
external

SDD
%sasdrugdev_copy(sdd_source=, sdd_target=);
Copies a file or folder to the specified target location.
external

SDD
%sasdrugdev_createanalysis(sdd_path=);
Creates an analysis in the SAS Drug Development repository.
external

SDD
%sasdrugdev_createfile(local_path=, sdd_path=, sdd_versioning=, sdd_version=, sdd_comment=);
Uploads a file from the local machine to the SAS Drug Development repository.
external

SDD
%sasdrugdev_createfolder(sdd_path=);
Creates a folder in the SAS Drug Development repository.
external

SDD
%sasdrugdev_creategroup(sdd_path=, sdd_group=, sdd_description=);
Creates a group in the specified organization, project, or analysis.
external

SDD
%sasdrugdev_createproject(sdd_path=);
Creates a project in the SAS Drug Development repository.
external

SDD
%sasdrugdev_createrole(sdd_path=, sdd_role=, sdd_description=);
Creates a role in the specified organization, project, or analysis.
external

SDD
%sasdrugdev_createuser(sdd_userid=, sdd_displayname=, sdd_email=, sdd_accounttype=, sdd_password=, sdd_firstname=, sdd_lastname=, sdd_department=, sdd_phone=);
Creates a user account within the system.
external

SDD
%sasdrugdev_deleteanalysis(sdd_path=);
Deletes an analysis from the SAS Drug Development repository.
external

SDD
%sasdrugdev_deletegroup(sdd_path=, sdd_group=);
Deletes a group from the specified organization, project, or analysis.
external

SDD
%sasdrugdev_deleteobject(sdd_path=);
Deletes an object from the SAS Drug Development repository.
external

SDD
%sasdrugdev_deleteproject(sdd_path=);
Deletes a project from the SAS Drug Development repository.
external

SDD
%sasdrugdev_deleterbitems(sas_dsname=, sas_result_dsname=work.sddDeleteRBItems);
Permanently deletes items from the SAS Drug Development recycle bin using a data set as ...
external

SDD
%sasdrugdev_deleterole(sdd_path=, sdd_role=);
Deletes a role from the specified organization, project, or analysis.
external

SDD
%sasdrugdev_deleteuser(sdd_userid=);
Deletes a user account from the system.
external

SDD
%sasdrugdev_downloadaszip(sdd_path=, local_path=, sdd_overwrite=0);
Downloads SAS Drug Development files or a folder along with its content to your local machine ...
external

SDD
%sasdrugdev_downloadfile(sdd_path=, sdd_version=, local_path=);
Downloads a file to your local machine from the SAS Drug Development repository.
external

SDD
%sasdrugdev_getacls(sdd_path=, sas_dsname=work.sddGetACLs, sdd_recursive=0);
Returns a SAS data set that contains the access control list for objects in the SAS Drug ...
external

SDD
%sasdrugdev_getallusers(sas_dsname=work.sddGetAllUsers);
Returns a SAS data set that contains the metadata for all of the users defined within the ...
external

SDD
%sasdrugdev_getassignedmembers(sdd_path=, sas_dsname=work.sddGetAssignedMembers);
Returns a SAS data set that contains the metadata for all of the members assigned to the ...
external

SDD
%sasdrugdev_getchildren(sdd_path=, sas_dsname=work.sddGetChildren, sdd_recursive=0);
Returns a SAS data set that contains the metadata for objects within a container in the SAS ...
external

SDD
%sasdrugdev_getconfiguration(sas_dsname=work.sddGetConfiguration, sas_suppressLogList=0);
Reports the current configuration settings.
external

SDD
%sasdrugdev_getcontextprivileges(sdd_path=, sas_dsname=work.sddGetContextPrivileges);
Returns a SAS data set that contains the metadata for all of the privileges available in the ...
external

SDD
%sasdrugdev_getglobalprivileges(sas_dsname=work.sddGetGlobalPrivileges);
Returns a SAS data set that contains the metadata for all of the global privileges available ...
external

SDD
%sasdrugdev_getgroupmembers(sdd_path=, sdd_group=, sas_dsname=work.sddGetGroupMembers);
Returns a SAS data set that contains the metadata for all of the members assigned to a group ...
external

SDD
%sasdrugdev_getgroups(sdd_path=, sas_dsname=work.sddGetGroups);
Returns a SAS data set that contains the metadata for all of the groups defined within a ...
external

SDD
%sasdrugdev_getjobinfo(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobInfo);
Returns a SAS data set that contains the information for a job in the SAS Drug Development ...
external

SDD
%sasdrugdev_getjobinputs(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobInputs);
Returns a SAS data set containing metadata for the inputs for the specified job in the SAS ...
external

SDD
%sasdrugdev_getjoboutputs(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobOutputs);
Returns a SAS data set containing metadata for the outputs for the specified job in the SAS ...
external

SDD
%sasdrugdev_getjobparameters(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobParameters);
Returns a SAS data set containing job parameter metadata for the specified job.
external

SDD
%sasdrugdev_getjobtasks(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobTasks);
Returns a SAS data set containing metadata for the tasks for the specified job in the SAS ...
external

SDD
%sasdrugdev_getobjecttype(sdd_path=);
Reports the SAS Drug Development object type for the specified ...
external

SDD
%sasdrugdev_getowner(sdd_path=, sdd_aclType=);
Returns the current owner of an object within the organization in the SAS Drug Development ...
external

SDD
%sasdrugdev_getproperties(sdd_path=, sas_dsname=work.sddGetProperties);
Returns a SAS data set that contains the properties of an object in the SAS Drug Development ...
external

SDD
%sasdrugdev_getrbitems(sas_dsname=work.sddGetRBItems);
Returns a SAS data set that contains the metadata for the items in the SAS Drug Development ...
external

SDD
%sasdrugdev_getrolemembers(sdd_path=, sdd_role=, sdd_role_context=, sas_dsname=work.sddGetRoleMembers);
Returns a SAS data set that contains the metadata for all of the members assigned to a role ...
external

SDD
%sasdrugdev_getroleprivileges(sdd_path=, sdd_role=, sas_dsname=work.sddGetRolePrivileges);
Returns a SAS data set that contains the metadata for all of the privileges assigned to a ...
external

SDD
%sasdrugdev_getroles(sdd_path=, sas_dsname=work.sddGetRoles, sdd_getInherited=1);
Returns a SAS data set that contains the metadata for all of the roles defined and, if ...
external

SDD
%sasdrugdev_getsddapiversion;
Reports the version and build number for the current SAS Drug Development client API.

Deprecated. Replaced by sasdrugdev_getconfiguration, effective with the SAS Drug Development 1.4.
external

SDD
%sasdrugdev_getsignatures(sdd_path=, sdd_version=, sas_dsname=work.sddGetSignatures);
Returns a SAS data set that contains the metadata for all of the signatures of a file or a ...
external

SDD
%sasdrugdev_getsubmissionstatus(sdd_jobsubmission_id=);
Determines the status of a SAS Drug Development repository job submission.
external

SDD
%sasdrugdev_getsubscriptions(sas_dsname=work.sddGetSubscriptions);
Returns a SAS data set containing metadata for all subscriptions for the current user.
external

SDD
%sasdrugdev_getsyncstatus(sdd_path=);
Determines if a file in the SAS Drug Development repository is synchronized, out of ...
external

SDD
%sasdrugdev_getusergroups(sdd_userid=, sas_dsname=work.sddGetUserGroups);
Returns a SAS data set containing metadata for each of the groups in which the specified ...
external

SDD
%sasdrugdev_getuserprivileges(sdd_userid=, sas_dsname=work.sddGetUserPrivileges);
Returns a SAS data set that contains the metadata for all of the global privileges assigned ...
external

SDD
%sasdrugdev_getversions(sdd_path=, sas_dsname=work.sddGetVersions);
Returns a SAS data set that contains the metadata for all of the versions of a file.
external

SDD
%sasdrugdev_groupexists(sdd_path=, sdd_group=);
Determines whether a group is defined for the specified context.
external

SDD
%sasdrugdev_iscontainer(sdd_path=);
Determines whether a SAS Drug Development repository object is of type container.
external

SDD
%sasdrugdev_isgroupmember(sdd_path=, sdd_group=, sdd_member=, sdd_type=USER, sdd_group_context=);
Determines whether a user or group is a member of the group in the specified organization, ...
external

SDD
%sasdrugdev_ismember(sdd_path=, sdd_member=, sdd_type=USER, sdd_group_context=);
Determines whether a user or group is a member in the specified organization, project, ...
external

SDD
%sasdrugdev_isrolemember(sdd_path=, sdd_role=, sdd_role_context=, sdd_member=, sdd_type=USER, sdd_group_context=);
Determines whether a user or group is a member of a role in the specified organization, ...
external

SDD
%sasdrugdev_isroleprivilege(sdd_path=, sdd_role=, sdd_privilege=);
Determines whether a privilege is assigned to a role in the specified organization, ...
external

SDD
%sasdrugdev_isuserprivilege(sdd_userid=, sdd_privilege=);
Determines whether a global privilege is assigned to a user.
external

SDD
%sasdrugdev_isversioned(sdd_path=);
Determines whether a SAS Drug Development repository object has versioning enabled.
external

SDD
%sasdrugdev_lockuser(sdd_userid=);
Locks a user account.
external

SDD
%sasdrugdev_login(sdd_url=, sdd_userid=, sdd_password=, proxy_host=, proxy_port=, proxy_userid=, proxy_password=);
Creates a connection to the SAS Drug Development instance.
external

SDD
%sasdrugdev_logout;
Closes an open connection to SAS Drug Development.
external

SDD
%sasdrugdev_move(sdd_source=, sdd_target=);
Moves a file or folder to the specified target location.
external

SDD
%sasdrugdev_objectexists(sdd_path=);
Determines whether a SAS Drug Development repository object exists.
external

SDD
%sasdrugdev_removegroupmember(sdd_path=, sdd_group=, sdd_member=, sdd_type=USER, sdd_group_context=);
Removes a user or a group as a member of a group in the specified organization, project, or ...
external

SDD
%sasdrugdev_removemember(sdd_path=, sdd_member=, sdd_type=USER, sdd_group_context=);
Removes a user or a group as a member of the specified organization, project, or analysis.
external

SDD
%sasdrugdev_removerolemember(sdd_path=, sdd_role=, sdd_role_context=, sdd_member=, sdd_type=USER, sdd_group_context=);
Removes a user or a group as a member of a role in the specified organization, project, or ...
external

SDD
%sasdrugdev_removeroleprivilege(sdd_path=, sdd_role=, sdd_privilege=);
Removes a privilege from a role in the specified organization, project, or analysis.
external

SDD
%sasdrugdev_removeuserprivilege(sdd_userid=, sdd_privilege=);
Remove a global privilege from a user in the system.
external

SDD
%sasdrugdev_renameanalysis(sdd_source=, sdd_newname=);
Renames an analysis.
external

SDD
%sasdrugdev_renameobject(sdd_source=, sdd_newname=);
Renames a file or folder.
external

SDD
%sasdrugdev_renameproject(sdd_source=, sdd_newname=);
Renames a project.
external

SDD
%sasdrugdev_resetpassword(sdd_userid=, sdd_newpassword=);
Reset the password for a user in the system. This action requires the logged on user to have ...
external

SDD
%sasdrugdev_roleexists(sdd_path=, sdd_role=);
Determines whether a a role is defined in the specified organization, project, or analysis.
external

SDD
%sasdrugdev_submitjob(sdd_path=, sdd_version=, sas_dsname=);
Submits a SAS Drug Development repository job for immediate execution and sets the SAS macro ...
external

SDD
%sasdrugdev_syncfiletoworkspace(sdd_path=, sdd_version=);
Gets the version of the SAS Drug Development from the repository file to the workspace.
external

SDD
%sasdrugdev_unassignrole(sdd_path=, sdd_role=, sdd_role_context=);
Unassigns a role from the specified organization, project, or analysis.
external

SDD
%sasdrugdev_unlockuser(sdd_userid=);
Unlocks a user account.
external

SDD
%sasdrugdev_updateacls(sas_dsname=);
Sets permissions on SAS Drug Development objects using a data set as input.
external

SDD
%sasdrugdev_updateanalysislead(sdd_path=, sdd_userid=);
Updates the current lead of an analysis in the SAS Drug Development repository.
external

SDD
%sasdrugdev_updateanalysisstate(sdd_path=, sdd_state=, sdd_comment=);
Update the state of an analysis in the SAS Drug Development repository
external

SDD
%sasdrugdev_updatefile(local_path=, sdd_path=, sdd_comment=, sdd_version=);
Updates the contents of an existing file in the SAS Drug Development repository.
external

SDD
%sasdrugdev_updateorglead(sdd_path=, sdd_userid=);
Updates the current lead of an organization in the SAS Drug Development repository.
external

SDD
%sasdrugdev_updateowner(sdd_path=, sdd_aclType=, sdd_userid=);
Updates the current owner of an object within the organization in the SAS Drug Development ...
external

SDD
%sasdrugdev_updateprojectlead(sdd_path=, sdd_userid=);
Updates the current lead of a project in the SAS Drug Development repository.
external

SDD
%sasdrugdev_updateprojectstate(sdd_path=, sdd_state=, sdd_comment=, sdd_include_analyses=1);
Update the state of a project in the SAS Drug Development repository
external

SDD
%sasdrugdev_updateproperties(sdd_path=, sas_dsname=);
Updates the editable properties of SAS Drug Development repository object using a SAS data ...
external

SDD
%sasdrugdev_updateuserinfo(sdd_userid=, sdd_displayname=_sdd_updateuser_donotupdate_, sdd_email=_sdd_updateuser_donotupdate_, sdd_accounttype=_sdd_updateuser_donotupdate_, sdd_firstname=_sdd_updateuser_donotupdate_, sdd_lastname=_sdd_updateuser_donotupdate_, sdd_department=_sdd_updateuser_donotupdate_, sdd_phone=_sdd_updateuser_donotupdate_);
Update general user account information
external

SDD
%sasdrugdev_uploadandexpand(local_path=, sdd_path=, sdd_versioning=, sdd_version=, sdd_comment=);
Uploads and expands the contents of a zip file into the specified folder location in the SAS ...
external

SDD
%sasdrugdev_userexists(sdd_userid=);
Determines whether a user exists within the system.

Macro Detail

%sasdrugdev_addgroupmember(sdd_path=, sdd_group=, sdd_type=USER, sdd_member=, sdd_group_context=);

[ Exposure: external ]
Adds a user or group as a member of a group in the specified organization, project, or
analysis.

Syntax:
%SASDRUGDEV_ADDGROUPMEMBER(SDD_PATH=sdd-path, SDD_GROUP=sdd-group-name,
SDD_MEMBER=sdd-member-identifier <, SDD_TYPE=sdd-member-type,
SDD_GROUP_CONTEXT=sdd-group-context>);

Example Code
Context paths used in examples:
- Organization: /SAS
- Project: /SAS/Project1
- Analysis: /SAS/Project1/Analysis1

1. Add User as a Group member at the Project level:
%sasdrugdev_addgroupmember(sdd_path=%str(/SAS/Project1), sdd_group=%str(PrjGrp1),
sdd_member=%str(User1), sdd_type=%str(USER));

2. Add Group as a Group member at the Project level:
%sasdrugdev_addgroupmember(sdd_path=%str(/SAS/Project1), sdd_group=%str(PrjGrp1),
sdd_member=%str(OrgGrp1), sdd_type=%str(GROUP), sdd_group_context=%str(/SAS));

3. Add User as a Group member at the Analysis level:
%sasdrugdev_addgroupmember(sdd_path=%str(/SAS/Project1/Analysis1),
sdd_group=%str(AnaGrp1), sdd_member=%str(User1), sdd_type=%str(USER));

4. Add Project Group as a Group member at the Analysis level:
%sasdrugdev_addgroupmember(sdd_path=%str(/SAS/Project1/Analysis1),
sdd_group=%str(AnaGrp1), sdd_member=%str(PrjGrp1), sdd_type=%str(GROUP),
sdd_group_context=%str(/SAS/Project1));

5. Add Organization Group as a Group member at the Analysis level:
%sasdrugdev_addgroupmember(sdd_path=%str(/SAS/Project1/Analysis1),
sdd_group=%str(AnaGrp1), sdd_member=%str(OrgGrp1), sdd_type=%str(GROUP),
sdd_group_context=%str(/SAS));

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the group is defined.
sdd_group - - required - the name of the group to add the member.
sdd_type - - conditional - the type of member being added.
        Values: USER | GROUP (case-insensitive)
        Default: USER
sdd_member - - required - the user ID of the user or the name of the group being added.
sdd_group_context - - conditional - specifies the context in which the group is defined
        as a path (e.g., /SAS). This parameter is required if SDD_TYPE=GROUP. Otherwise,
        it will be ignored.
File: sasdrugdev_addgroupmember.sas
First available in version: 1.2

%sasdrugdev_addmember(sdd_path=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Adds a user or a group as a member of the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_ADDMEMBER(SDD_PATH=sdd-path, SDD_MEMBER=sdd-member-identifier,
<SDD_TYPE=sdd-member-type, SDD_GROUP_CONTEXT=sdd-group-context>);

Example Code
Context paths used in examples:
- Organization: /SAS
- Project: /SAS/Project1
- Analysis: /SAS/Project1/Analysis1

1. Add User as a Member at the Project level:
%sasdrugdev_addmember(SDD_PATH=%str(/SAS/Project1), SDD_MEMBER=%str(User1));

2. Add Group as a Member at the Project level:
%sasdrugdev_addmember(sdd_path=%str(/SAS/Project1), sdd_member=%str(OrgGrp1),
sdd_type=%str(GROUP), sdd_group_context=%str(/SAS));

3. Add User as a Member at the Analysis level:
%sasdrugdev_addmember(SDD_PATH=%str(/SAS/Project1/Analysis1), SDD_MEMBER=%str(User1));

4. Add Group defined at Organization level as a Member at the Analysis level:
%sasdrugdev_addmember(sdd_path=%str(/SAS/Project1/Analysis1), sdd_member=%str(OrgGrp1),
sdd_type=%str(GROUP), sdd_group_context=%str(/SAS));

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - required - the path of the context object (organization, project, or
        analysis) where the member is being added.
sdd_member - required - the user ID of the user or the name of the group being added.
sdd_type - conditional - the type of member being added.
        Values: USER | GROUP (case-insensitive)
        Default: USER
sdd_group_context - - conditional - specifies the context in which the group is defined
        as a path (e.g., /SAS). This parameter is required if SDD_TYPE=GROUP. Otherwise,
        it will be ignored.
File: sasdrugdev_addmember.sas
First available in version: 1.2

%sasdrugdev_addrolemember(sdd_path=, sdd_role=, sdd_role_context=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Adds a user or group as a member of a role in the specified organization, project, or
analysis.

Syntax:
%SASDRUGDEV_ADDROLEMEMBER(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_ROLE_CONTEXT=sdd-role-context, SDD_MEMBER=sdd-member-identifier
<, SDD_TYPE=sdd-member-type, SDD_GROUP_CONTEXT=sdd-group-context>);

Example Code
Context paths used in examples:
- Organization: /SAS
- Project: /SAS/Project1
- Analysis: /SAS/Project1/Analysis1

1. Add User to Role defined at Project:
%sasdrugdev_addrolemember(sdd_path=%str(/SAS/Project1), sdd_role=%str(PrjRole1),
sdd_role_context=%str(/SAS/Project1),sdd_member=%str(User1), sdd_type=%str(USER));

2. Add Group defined at Organization to Role defined at Project:
%sasdrugdev_addrolemember(sdd_path=%str(/SAS/Project1), sdd_role=%str(PrjRole1),
sdd_role_context=%str(/SAS/Project1),sdd_member=%str(OrgGrp1), sdd_type=%str(GROUP),
sdd_group_context=%str(/SAS));

3. Add User to Role assigned at Project:
%sasdrugdev_addrolemember(sdd_path=%str(/SAS/Project1), sdd_role=%str(OrgRole1),
sdd_role_context=%str(/SAS),sdd_member=%str(User1), sdd_type=%str(USER));

4. Add Group defined at Organization to Role assigned at Project:
%sasdrugdev_addrolemember(sdd_path=%str(/SAS/Project1), sdd_role=%str(OrgRole1),
sdd_role_context=%str(/SAS),sdd_member=%str(OrgGrp1), sdd_type=%str(GROUP),
sdd_group_context=%str(/SAS));

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is assigned.
sdd_role - - required - the name of the role to add the member.
sdd_role_context - - required - specifies the context in which the role is defined as a
        path (e.g., /SAS).
sdd_member - required - the user ID of the user or the name of the group being added.
sdd_type - conditional - the type of member being added.
        Values: USER | GROUP (case-insensitive)
        Default: USER
sdd_group_context - - conditional - specifies the context in which the group is defined
        as a path (e.g., /SAS). This parameter is required if SDD_TYPE=GROUP. Otherwise,
        it will be ignored.
File: sasdrugdev_addrolemember.sas
First available in version: 1.2

%sasdrugdev_addroleprivilege(sdd_path=, sdd_role=, sdd_privilege=);

[ Exposure: external ]
Adds a privilege to a role in the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_ADDROLEPRIVILEGE(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_PRIVILEGE=sdd-privilege-id);

Example Code:
Use %sasdrugdev_getcontextprivileges to fetch the list of available privileges at a specified
context. The macro returns a SAS data set containing the list of privileges (the default
name of the data set is work.sddgetcontextprivileges). Use one of the privilegeId values to
add that privilege to a Role.

1. Retrieve the available privileges at a Project:
%sasdrugdev_getcontextprivileges(sdd_path=%str(/SAS/Project1));

2. Add a privilege to a Role:
%sasdrugdev_addroleprivilege(sdd_path=%str(/SAS/Project1), sdd_role=%str(PrjRole1),
sdd_privilege=%str(PRIVILEGE_SIGN_FILE));

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is defined.
sdd_role - - required - the name of the role to add the privilege.
sdd_privilege - - required - the identifier of the privilege being added.
File: sasdrugdev_addroleprivilege.sas
First available in version: 1.2

%sasdrugdev_adduserprivilege(sdd_userid=, sdd_privilege=);

[ Exposure: external ]
Assign a global privilege to a user in the system.

Syntax:
%SASDRUGDEV_ADDUSERPRIVILEGE(SDD_USERID=sdd-user-id, SDD_PRIVILEGE=sdd-privilege-id);

Example Code:
Use %sasdrugdev_getglobalprivileges to fetch the list of available global privileges. The
macro returns a SAS data set containing the list of privileges (the default name of the
data set is work.sddgetglobalprivileges). Use one of the privilegeId values to assign that
global privilege to a User.

1. Retrieve the available global privileges:
%sasdrugdev_getglobalprivileges();

2. Assign a privilege to a User:
%sasdrugdev_adduserprivilege(sdd_userid=%str(User1),
sdd_privilege=%str(PRIVILEGE_AUDIT_REPORTING));

          
History:
   2013-11-01
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user to assign the global privilege.
sdd_privilege - - required - the identifier of the global privilege to assign.
File: sasdrugdev_adduserprivilege.sas
First available in version: 1.3

%sasdrugdev_assignedroleexists(sdd_path=, sdd_role=, sdd_role_context=);

[ Exposure: external ]
Determine if a role exists (as defined or inherited) in an organization, project, or analysis.

The SAS macro variable _sddAssignedRoleExists_ is set to a value of 1 if the role exists, 0
if it does not.

Syntax:
%SASDRUGDEV_ASSIGNEDROLEEXISTS (SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_ROLE_CONTEXT=sdd-role-context);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddAssignedRoleExists_ - indicates the existence of the assigned role in the context.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis).
sdd_role - - required - the name of the role to check for existence.
sdd_role_context - - required - specifies the context in which the role is defined as a
        path (e.g., /SAS).
File: sasdrugdev_assignedroleexists.sas
First available in version: 1.2

%sasdrugdev_assignrole(sdd_path=, sdd_role=, sdd_role_context=);

[ Exposure: external ]
Assigns a role to the specified organization, project, or analysis as an inherited role.

Syntax:
%SASDRUGDEV_ASSIGNROLE(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_ROLE_CONTEXT=sdd-role-context);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) to assign the role to.
sdd_role - - required - the name of the role being assigned.
sdd_role_context - - required - specifies the context in which the role is defined as a
        path (e.g., /SAS).
File: sasdrugdev_assignrole.sas
First available in version: 1.2

%sasdrugdev_copy(sdd_source=, sdd_target=);

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

The copy of a versioned file will not be versioned. The children of a copied folder will
also be copied to the new location in their original directory structure.

Syntax:
%SASDRUGDEV_COPY(SDD_SOURCE=sdd-source-path, SDD_TARGET=sdd-target-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_source - - required - the path of the object to be copied.
sdd_target - - required - the path (including the new name) where the object is to be
        copied. The target folder must already exist.
File: sasdrugdev_copy.sas
First available in version: 1.1

%sasdrugdev_createanalysis(sdd_path=);

[ Exposure: external ]
Creates an analysis in the SAS Drug Development repository.

The parent project must already exist.

Syntax:
%SASDRUGDEV_CREATEANALYSIS(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the analysis being created.
File: sasdrugdev_createanalysis.sas
First available in version: 1.2

%sasdrugdev_createfile(local_path=, sdd_path=, sdd_versioning=, sdd_version=, sdd_comment=);

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

All parent folders that do not already exist will be created as well.

NOTE: This macro is only supported from a PC SAS session. Using this macro within an active
SAS Drug Development application session will result in a failure.

Syntax:
%SASDRUGDEV_CREATEFILE(LOCAL_PATH=local-path, SDD_PATH=sdd-path
<, SDD_VERSIONING=sdd-versioning, SDD_VERSION=sdd-version, SDD_COMMENT=sdd_comment>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
local_path - - required - the absolute path and name of the file on the local computer.
sdd_path - - required - the path of the file to be created.
sdd_versioning - - optional - indicates whether the file being created should be
        versioned. The default value is 0, which will create a non-versioned file. A
        value of 1 will create a versioned file.
        Values: 0 | 1
        Default: 0
sdd_version - - conditional - indicates the version number to assign to the file being
        point. This option is ignored when creating non-versioned file.
sdd_comment - - conditional - the comment for the versioned file being created. This
        option is ignored when creating a non-versioned file.
File: sasdrugdev_createfile.sas
First available in version: 1.1

%sasdrugdev_createfolder(sdd_path=);

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

All parent folders that do not already exist will be created as well.

Syntax:
%SASDRUGDEV_CREATEFOLDER(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the folder to be created.
File: sasdrugdev_createfolder.sas
First available in version: 1.1

%sasdrugdev_creategroup(sdd_path=, sdd_group=, sdd_description=);

[ Exposure: external ]
Creates a group in the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_CREATEGROUP(SDD_PATH=sdd-path, SDD_GROUP=sdd-group-name
<, SDD_DESCRIPTION=sdd-description>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the group is to be created.
sdd_group - - required - the name of the group to create.
sdd_description - - optional- the description for the group being created.
File: sasdrugdev_creategroup.sas
First available in version: 1.2

%sasdrugdev_createproject(sdd_path=);

[ Exposure: external ]
Creates a project in the SAS Drug Development repository.

Syntax:
%SASDRUGDEV_CREATEPROJECT(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the project being created.
File: sasdrugdev_createproject.sas
First available in version: 1.2

%sasdrugdev_createrole(sdd_path=, sdd_role=, sdd_description=);

[ Exposure: external ]
Creates a role in the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_CREATEROLE(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name
<, SDD_DESCRIPTION=sdd-description>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role will be defined.
sdd_role - - required - the name of the role being created.
sdd_description - - optional - the description for the role being created.
File: sasdrugdev_createrole.sas
First available in version: 1.2

%sasdrugdev_createuser(sdd_userid=, sdd_displayname=, sdd_email=, sdd_accounttype=, sdd_password=, sdd_firstname=, sdd_lastname=, sdd_department=, sdd_phone=);

[ Exposure: external ]
Creates a user account within the system.

Syntax:
%SASDRUGDEV_CREATEUSER(SDD_USERID=sdd-userid, SDD_DISPLAYNAME=sdd-displayname,
SDD_EMAIL=sdd-email, SDD_ACCOUNTTYPE=sdd-accounttype, SDD_PASSWORD=sdd-password,
<, SDD_FIRSTNAME=sdd-firstname, SDD_LASTNAME=sdd-lastname, SDD_DEPARTMENT=sdd-department,
SDD_PHONE=sdd-phone>);

          
History:
   2013-10-30
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID of the account to create.
sdd_displayname - - required - the display name of the account to create.
sdd_email - - required - the email address of the account to create.
sdd_accounttype - - required - the account type of the account to create.
        Values: INTERACTIVE | SYSTEM
        Default: None
sdd_password - - required - the password for the account to create.
sdd_firstname - - optional - the first name of the user associated with this account.
sdd_lastname - - optional - the last name of the user associated with this account.
sdd_department - - optional - the business unit of the user associated with this account.
sdd_phone - - optional - the phone number of the user associated with this account.
File: sasdrugdev_createuser.sas
First available in version: 1.3

%sasdrugdev_deleteanalysis(sdd_path=);

[ Exposure: external ]
Deletes an analysis from the SAS Drug Development repository.

Syntax:
%SASDRUGDEV_DELETEANALYSIS(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the analysis to be deleted.
File: sasdrugdev_deleteanalysis.sas
First available in version: 1.2

%sasdrugdev_deletegroup(sdd_path=, sdd_group=);

[ Exposure: external ]
Deletes a group from the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_DELETEGROUP(SDD_PATH=sdd-path, SDD_GROUP=sdd-group-name);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the group is defined.
sdd_group - - required - the name of the group to be deleted.
File: sasdrugdev_deletegroup.sas
First available in version: 1.2

%sasdrugdev_deleteobject(sdd_path=);

[ Exposure: external ]
Deletes an object from the SAS Drug Development repository.

Syntax:
%SASDRUGDEV_DELETEOBJECT(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the content object to be deleted.
File: sasdrugdev_deleteobject.sas
First available in version: 1.1

%sasdrugdev_deleteproject(sdd_path=);

[ Exposure: external ]
Deletes a project from the SAS Drug Development repository.

Syntax:
%SASDRUGDEV_DELETEPROJECT(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the project to be deleted.
File: sasdrugdev_deleteproject.sas
First available in version: 1.2

%sasdrugdev_deleterbitems(sas_dsname=, sas_result_dsname=work.sddDeleteRBItems);

[ Exposure: external ]
Permanently deletes items from the SAS Drug Development recycle bin using a data set as
input. Returns a SAS data set that contains the paths for the items that were permanently
deleted from the SAS Drug Development recycle bin.

The items listed in the input data set will be permanently removed from the recycle bin
provided that the user has the Permanent Delete Items role privilege at the organizational
context. No error message will be provided for objects that could not be permanently deleted.

A path created and deleted multiple times from the SAS Drug Development repository will appear
multiple times in the recycle bin. Therefore, the items must be referenced by their unique
identifier. The identifier can be retrieved using the sasdrugdev_getrbitems macro.

The output data set will contain one row for each path that was permanently deleted from the
recycle bin. If multiple items with the same path were deleted, the path will only be listed
once. The paths for each object deleted from a container (e.g. project, folder) will be listed
separately in the output data set.

Syntax:
%SASDRUGDEV_deleterbitems(SAS_DSNAME=SAS-data-set, SAS_RESULT_DSNAME=SAS-data-set);

Example Code:
Delete everything a specific user deleted.

* start code example;
%sasdrugdev_getrbitems(sas_dsname=sddGetRBItems);

data deleterbitems;
set sddGetRBItems;
if (deletedBy="myuserid");
run;

%sasdrugdev_deleterbitems(sas_dsname=deleterbitems, sas_result_dsname=deletedpaths);
* end code example;

          
History:
   2013-03-27
initial code
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sas_dsname - - required - the name of a SAS data set containing the identifiers for the
        items to be deleted from the recycle bin. The data set must contain, at minimum,
        the variables listed below. Any additional variables will be ignored.
        - identifier: The unique SAS Drug Development object identifier for the item to be
        permanently deleted.
sas_result_dsname - - optional - the name of the output SAS data set that will contain the
        deleted paths as libref.dataset. The default value is WORK.SDDDELETEDRBITEMS. The
        data set contains a row for each deleted path and columns with the following names.
        The data set will be sorted by path.
        - name: The name of the item.
        - path: The path of the item.
File: sasdrugdev_deleterbitems.sas
First available in version: 1.4

%sasdrugdev_deleterole(sdd_path=, sdd_role=);

[ Exposure: external ]
Deletes a role from the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_DELETEROLE(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is defined.
sdd_role - - required - the name of the role to be deleted.
File: sasdrugdev_deleterole.sas
First available in version: 1.2

%sasdrugdev_deleteuser(sdd_userid=);

[ Exposure: external ]
Deletes a user account from the system.

Users that have logged in are not eligible for deletion and can only be deactivated.

Syntax:
%SASDRUGDEV_DELETEUSER(SDD_USERID=sdd-userid);

          
History:
   2013-10-30
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID of the account being deleted.
File: sasdrugdev_deleteuser.sas
First available in version: 1.3

%sasdrugdev_downloadaszip(sdd_path=, local_path=, sdd_overwrite=0);

[ Exposure: external ]
Downloads SAS Drug Development files or a folder along with its content to your local machine
as a zip file.

If the local directory does not exist it will be created. If the local file does not exist
it will be created. If the object being downloaded is a folder, the contents of the folder
will be downloaded with its hierarchy maintained. If the object being downloaded is a project
or an analysis, only the containers (depots, folders) with files will be downloaded.

NOTE: This macro is only supported from a PC SAS session. Using this macro within an active
SAS Drug Development application session will result in a failure.

Syntax:
%SASDRUGDEV_DOWNLOADASZIP(SDD_PATH=sdd-path, LOCAL_PATH=local-zipfile-path
<,SDD_OVERWRITE=sdd-overwrite> );

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the object (file or container) to be downloaded.
local_path - - required - the full path and name of the file to create (or overwrite,
        if applicable) on the local computer.
sdd_overwrite - - optional - indicates whether or not to overwrite the existing zip
        file on the local machine. The valid values are 0 and 1 to maintain or overwrite
        the file respectively. The default is 0.
File: sasdrugdev_downloadaszip.sas
First available in version: 1.4

%sasdrugdev_downloadfile(sdd_path=, sdd_version=, local_path=);

[ Exposure: external ]
Downloads a file to your local machine from the SAS Drug Development repository.

If the local directory does not exist it will be created. If the local file does not exist
it will be created. If the local file does exist, it will be overwritten with new content.

NOTE: This macro is only supported from a PC SAS session. Using this macro within an active
SAS Drug Development application session will result in a failure.

Syntax:
%SASDRUGDEV_DOWNLOADFILE(SDD_PATH=sdd-path, SDD_VERSION=sdd- version>, LOCAL_PATH=local-path);

          
History:
   2013-10-30
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the file within the SAS Drug Development repository
        to download.
sdd_version - - conditional - specifies 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 including 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 that
        will result in a failure.
local_path - - required - the full path and name of the file to create (or overwrite,
        if it exists) on the local computer.
File: sasdrugdev_downloadfile.sas
First available in version: 1.3

%sasdrugdev_getacls(sdd_path=, sas_dsname=work.sddGetACLs, sdd_recursive=0);

[ Exposure: external ]
Returns a SAS data set that contains the access control list for objects in the SAS Drug
Development repository.

For container objects, both the DEFAULT and CURRENT access control lists are returned with
the exception of analyses. For non-container objects and Analyses, only the CURRENT access
control lists is returned.

Syntax:
%SASDRUGDEV_GETACLS(SDD_PATH=sdd-path, <SAS_DSNAME=SAS-data-set,
SDD_RECURSIVE=recursion-level>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the content object in the SAS Drug Development
        repository. This can be either a file or a container.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the access control lists specified as libref.dataset. The default
        value is WORK.SDDGETACL. The data set contains a row for each access control
        entry, sorted by path and aclType, and columns with the following names:
        - name: The name of the object.
        - path: The path to the object.
        - objectType: Describes the type of the object (e.g. folder, data set, etc.)
        - isContainer: A numeric flag that indicates whether the object is a container
        object (0=no, 1=yes).
        - owner: The user ID of the user who owns the object.
        - aclType: Will be either DEFAULT or CURRENT. Analyses and files only have
        CURRENT acls. All other containers have both DEFAULT and CURRENT acls.
        - aclPrincipalName: If the aclPrincipalType is ACLOWNER this will be Owner. If
        the aclPrincipalType is ACLMEMBERS this will be Members. If the
        aclPrincipalType is USER this will be the user ID of the user. If the
        aclPrincipalType is GROUP this will be the name of the group.
        - aclPrincipalType: Specifies if the principal is a ACLOWNER, ACLMEMBERS, USER or
        GROUP.
        - grpSrcCtxt: For group principals, specifies the context path where the group
        was defined.
        - adminPermission: Permission to administer the object.
        - readPermission: Permission to read the object.
        - writePropPerm: Permission to update the object properties.
        - writeContentPerm: Permission to update the object content.
        - deletePermission: Permission to delete the object.
        Permission values are specified as follows.
        1 = Allowed
        -1 = Denied
        0 = Not specified (Inherited)
sdd_recursive - - conditional - the level of recursion when the path is a container.
        Valid values are 0, 1, 2, or 99 as described below. The default value is 0. For
        files, the value will be ignored.
        0 - Returns acls for the input container only.
        1 - Returns acls for the container and all objects within the container, but not
        sub containers.
        2 - Returns acls for the container, all objects within the container, and one
        level of sub containers.
        99 - Returns acls for the container and all of the sub containers and objects
        (traverses the entire tree).
File: sasdrugdev_getacls.sas
First available in version: 1.2

%sasdrugdev_getallusers(sas_dsname=work.sddGetAllUsers);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the users defined within the
system.

Syntax:
%SASDRUGDEV_GETALLUSERS(<,SAS_DSNAME=SAS-data-set>);

          
History:
   2013-10-30
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for the users specified as libref.dataset. The default value is
        WORK.SDDGETALLUSERS. The data set contains a row for each user, sorted by user
        ID, and columns with the following names:
        - userId: The unique login identifier for this account.
        - displayName: The display name for the account.
        - firstName: The first name of the user.
        - lastName: The last name of the user.
        - email: The email address for this user.
        - department: The business unit this user is a part of.
        - phone: The phone number for this user.
        - isAccountActive: A numeric flag indicating whether the account is active (0=no,
        1=yes).
        - isAccountLocked: A numeric flag indicating whether the account is locked (0=no,
        1=yes).
        - accountActivationDate: The date this account becomes active, this value is
        represented in character format.
        - accountDeactivationDate: The date this account becomes inactive, this value is
        represented in character format.
        - accountLockedBy: The user ID who locked this account.
        - accountLockedDate: The date this account was locked, this value is represented
        in character format.
        - accountStatusBy: The user ID who changed the status of this account.
        - accountStatusDate: The date the account status was last modified, this value is
        represented in character format.
        - accountType: The type of account, valid values are INTERACTIVE and SYSTEM.
        - lastLogin: The date of the last time this account was logged onto, this value is
        represented in character format.
        - loginAttempts: The current number of failed login attempts associated with this
        account. If the number exceeds the configured threshold, this account will
        be locked. This counter gets reset when a successful login occurs.
        - loginCount: The total number of successful logins for this account.
        - passwordCreated: The date the current password was created, this value is
        represented in character format.
        - passwordExpiration: The date the current password expires, this value is
        represented in character format.
        - isPasswordExpired: A numeric flag indicating whether the password has expired
        (0=no, 1=yes).
        - dateAccountActivation: The date this account becomes active, this value is
        represented in SAS DateTime format.
        - dateAccountDeactivation: The date this account becomes inactive, this value is
        represented in SAS DateTime format.
        - dateAccountLocked: The date this account was locked, this value is represented
        in SAS DateTime format.
        - dateAccountStatus: The date the account status was last modified, this value is
        represented in SAS DateTime format.
        - dateLastLogin: The date of the last time this account was logged onto, this
        value is represented in SAS DateTime format.
        - datePasswordCreated: The date the current password was created, this value is
        represented in SAS DateTime format.
        - datePasswordExpiration: The date the current password expires, this value is
        represented in SAS DateTime format.
File: sasdrugdev_getallusers.sas
First available in version: 1.3

%sasdrugdev_getassignedmembers(sdd_path=, sas_dsname=work.sddGetAssignedMembers);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the members assigned to the
specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_GETASSIGNEDMEMBERS(SDD_PATH=sdd-path <, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) containing the members.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the members specified as libref.dataset. The default value is
        WORK.SDDGETASSIGNEDMEMBERS. The data set contains a row for each member and
        columns with the following names. The data set will be sorted by member type
        and principalId.
        - contextPath: The path of the context object in the repository.
        - type: The member type. Valid values are USER and GROUP.
        - principalId: The name of the member. The returned values will be either a group
        name or a user ID.
        - description: The description of the member. The returned values will be either a
        group name or a user display name.
        - grpSrcCtxt: The context path in which the group member was defined if the member
        is a group.
File: sasdrugdev_getassignedmembers.sas
First available in version: 1.2

%sasdrugdev_getchildren(sdd_path=, sas_dsname=work.sddGetChildren, sdd_recursive=0);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for objects within a container in the SAS
Drug Development repository.

Syntax:
%SASDRUGDEV_GETCHILDREN(SDD_PATH=sdd-path <, SDD_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.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the container object in the SAS Drug Development
        repository.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the objects specified as libref.dataset. The default value is
        WORK.SDDGETACL. The data set contains a row for each object in the list and
        columns with the following names. The data set will be sorted by path.
        - name: The name of the object.
        - path: The path of the object.
        - objectType: Describes the type of the object (e.g. folder, data set, etc.)
        - description: The description of the object.
        - isContainer: A numeric flag that indicates whether the object is a container
        object (0=no, 1=yes).
        - isVersioned: A numeric flag that indicates whether the object is currently
        versioned (0=no, 1=yes).
        - versionLabel: The label associated with this specific version.
        - isCheckedOut: A numeric flag that indicates whether the object is currently
        checked out (0=no, 1=yes).
        - isLocked: A numeric flag that indicates whether the object is currently locked
        (0=no, 1=yes).
        - size: The size of the object in bytes (will be 0 for containers).
        - contentType: The content or MIME type of object.
        - createdBy: The user ID that created the object.
        - created: The full date and time when the object was created. This value is
        represented as a String.
        - dateCreated: The date when the object was created as a SAS Datetime format.
        - lastModifiedBy: The user ID that last modified the object.
        - lastModified: The date when the object was last modified. This value is
        represented as a String.
        - dateLastModified: The date when the object was last modified as a SAS Datetime
        format.
        - propertiesLastModifiedBy: The user ID that last modified the properties for the
        object.
        - propertiesLastModified: The date when the object properties were last modified.
        This value is represented as a String.
        - datePropertiesLastModified: The date when the object properties were last
        modified as a SAS Datetime format.
        - state: This variable is for an Analysis or Project object only. It indicates
        if the state is DEV, PROD, or CLOSED.
        - stateComment: This variable is for Analysis or Project only and provides any
        comments attached by a user when changing the state of the project or
        analysis.
        - isSigned: Indicates if the object has electronic signatures attached to it.
sdd_recursive - - optional - the level of recursion when the path is a container.
        Valid values are 0, 1, 2, or 99 as described below. The default value is 0. For
        files, the value will be ignored.
        0 - Returns acls for the input container only.
        1 - Returns acls for the container and all objects within the container, but not
        sub containers.
        2 - Returns acls for the container, all objects within the container, and one
        level of sub containers.
        99 - Returns acls for the container and all of the sub containers and objects
        (traverses the entire tree).
File: sasdrugdev_getchildren.sas
First available in version: 1.1

%sasdrugdev_getconfiguration(sas_dsname=work.sddGetConfiguration, sas_suppressLogList=0);

[ Exposure: external ]
Reports the current configuration settings.

The values can be printed in the SAS log as well as being included in the data set.

Syntax:
%SASDRUGDEV_GETCONFIGURATION(<SAS_DSNAME=SAS-data-set, SAS_SUPPRESSLOGLIST=suppressloglist>);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2014-04-04
changed exposure to external
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sas_dsname - - optional - the name of the output SAS data set that contains the
        configuration information as libref.dataset. The default value is
        WORK.SDDGETCONFIGURATION. The data set contains a row for each setting and columns
        with the following names. The data set will be sorted by name.
        - name: The name of the configuration item.
        - value: The value of the configuration item.
sas_suppressLogList - - optional - flag to suppress the print of the configuration
        information to the log. The default value is 0. If the parameter is included
        and the value is anything other than 0, the configuration values are not printed
        to the log.
File: sasdrugdev_getconfiguration.sas
First available in version: 1.3

%sasdrugdev_getcontextprivileges(sdd_path=, sas_dsname=work.sddGetContextPrivileges);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the privileges available in the
specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_GETCONTEXTPRIVILEGES(SDD_PATH=sdd-path <, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis).
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for the objects specified as libref.dataset. The default value is
        WORK.SDDGETCONTEXTPRIVILEGES. The data set contains a row for each privilege
        defined at the context and columns with the following names. The data set will be
        sorted by privilegeId.
        - contextPath: The path of the context object in the repository.
        - privilegeId: The identifier of the privilege.
        - privilegeName: The name of the privilege.
File: sasdrugdev_getcontextprivileges.sas
First available in version: 1.2

%sasdrugdev_getglobalprivileges(sas_dsname=work.sddGetGlobalPrivileges);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the global privileges available
in the system.

Syntax:
%SASDRUGDEV_GETGLOBALPRIVILEGES(<SAS_DSNAME=SAS-data-set>);

          
History:
   2013-11-01
initial coding
   2014-04-21
updated documentation
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for all of the global privileges specified as libref.dataset. The default value is
        WORK.SDDGETGLOBALPRIVILEGES. The data set contains a row for each global privilege
        and columns with the following names. The data set will be sorted by privilegeId.
        - privilegeId: The identifier of the privilege.
        - privilegeName: The name of the privilege.
File: sasdrugdev_getglobalprivileges.sas
First available in version: 1.3

%sasdrugdev_getgroupmembers(sdd_path=, sdd_group=, sas_dsname=work.sddGetGroupMembers);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the members assigned to a group
within the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_GETGROUPMEMBERS(SDD_PATH=sdd-path, SDD_GROUP=sdd-group
<, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the group is defined.
sdd_group - - required - the name of the group
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for the members specified as libref.data set. The default value is
        WORK.SDDGETGROUPMEMBERS. The data set contains a row for each member and columns
        with the following names. The data set will be sorted by member type and
        principalId.
        - contextPath: The full path of the context object in the repository.
        - type: The member type. Valid values are USER and GROUP.
        - principalId: The name of the member. Valid values are group name or user ID.
        - description: The description of the member. Valid values are group name or user
        display name.
        - grpSrcCtxt: The context in which the of group member was defined.
File: sasdrugdev_getgroupmembers.sas
First available in version: 1.2

%sasdrugdev_getgroups(sdd_path=, sas_dsname=work.sddGetGroups);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the groups defined within a
context object within the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_GETGROUPS(SDD_PATH=sdd-path <, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the groups are defined.
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for the groups specified as libref.dataset. The default value is WORK.SDDGETGROUPS.
        The data set contains a row for each member and columns with the following names.
        The data set will be sorted by group name.
        - contextPath: The path of the context object in the repository.
        - name: The name of the group.
        - description: The group description.
File: sasdrugdev_getgroups.sas
First available in version: 1.2

%sasdrugdev_getjobinfo(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobInfo);

[ Exposure: external ]
Returns a SAS data set that contains the information for a job in the SAS Drug Development
repository. This is the information displayed on the General tab of the job editor, as well as
the information concerning the versioning of new outputs.

Syntax:
%SASDRUGDEV_GETJOBINFO(SDD_PATH=sdd-path <, SDD_VERSION=sdd-version, SAS_DSNAME=SAS-data-set>);

          
History:
   2014-04-08
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the job in the SAS Drug Development repository.
sdd_version - - optional - a specific version number of the job. If not specified,
        the information for the latest version will be returned. Specifying a version for
        a non-versioned job will cause an error.
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for the job specified as libref.dataset. The default value is
        WORK.SDDGETJOBINFO. The data set will contain variables representing each
        element of metadata for the object. The data set will be sorted by the NAME
        variable. The following metadata will be represented in the data set.
        - path: The path of the job.
        - versionLabel: The label associated with the specified version of the job.
        - name: The name of the property or attribute.
        - value: The value of the property or attribute.
File: sasdrugdev_getjobinfo.sas
First available in version: 1.4

%sasdrugdev_getjobinputs(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobInputs);

[ Exposure: external ]
Returns a SAS data set containing metadata for the inputs for the specified job in the SAS
Drug Development repository. The list does not include the input tasks.

Syntax:
%SASDRUGDEV_GETJOBINPUTS(SDD_PATH=sdd-path <SDD_VERSION=sdd-version,
SAS_DSNAME=SAS-data-set>);

          
History:
   2014-04-22
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the job.
sdd_version - - optional - the version of the job. If not specified, the latest version
        will be used.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the inputs specified as libref.dataset. The default value is
        WORK.SDDGETJOBINPUTS. The data set contains a row for each job input and columns
        with the following names. The data set will retain the order of the inputs.
        - jobPath: The path of the job.
        - jobVersion: The job version.
        - inputPath: The path of the input file.
        - inputType: The object type for the input. Valid values are CONTAINER and FILE.
        - inputVersion: The version of the input file. An asterisk indicates the latest
        version of the input file will be used by the job.
        - inputIncludesSubFolders: A flag indicating whether or not the subfolders of a
        container input are to be included during job execution.
File: sasdrugdev_getjobinputs.sas
First available in version: 1.4

%sasdrugdev_getjoboutputs(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobOutputs);

[ Exposure: external ]
Returns a SAS data set containing metadata for the outputs for the specified job in the SAS
Drug Development repository.

Syntax:
%SASDRUGDEV_GETJOBOUTPUTS(SDD_PATH=sdd-path <SDD_VERSION=sdd-version,
SAS_DSNAME=SAS-data-set>);

          
History:
   2014-04-22
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the job.
sdd_version - - optional - the version of the job. If not specified, the latest version
        will be used.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the outputs specified as libref.dataset. The default value is
        WORK.SDDGETJOBOUTPUTS. The data set contains a row for each job output and columns
        with the following names. The data set will retain the order of the outputs.
        - jobPath: The path of the job.
        - jobVersion: The job version.
        - outputPath: The path of the output location.
        - outputIncludesSubFolders: A flag indicating whether or not the subfolders of an
        output container are to be included during job execution.
File: sasdrugdev_getjoboutputs.sas
First available in version: 1.4

%sasdrugdev_getjobparameters(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobParameters);

[ Exposure: external ]
Returns a SAS data set containing job parameter metadata for the specified job.

Syntax:
%SASDRUGDEV_GETJOBPARAMETERS(SDD_PATH=sdd-path <SDD_VERSION=sdd-version,
SAS_DSNAME=SAS-data-set>);

          
History:
   2014-04-11
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the job.
sdd_version - - optional - the version of the job. If not specified, the latest version
        will be used.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the parameters specified as libref.dataset. The default value is
        WORK.SDDGETJOBPARAMETERS. The data set contains a row for each job parameter
        and columns with the following names. The data set will retain the job parameter
        order.
        - jobPath: The path of the job.
        - jobVersion: The job version.
        - name: The name of the parameter.
        - label: The parameter label.
        - type: The parameter type. Values are CHARACTER, CHARACTER_MASKED, NUMERIC,
        DATE, FILE, or FOLDER.
        - defaultValue: the default value for the parameter. Dates are returned in SAS
        datetime format.
        - fileVersion: the file version to be used if the parameter is of type FILE.
        A blank value means that either the file is not versioned or the file is
        versioned but no version was selected.
File: sasdrugdev_getjobparameters.sas
First available in version: 1.4

%sasdrugdev_getjobtasks(sdd_path=, sdd_version=, sas_dsname=work.sddGetJobTasks);

[ Exposure: external ]
Returns a SAS data set containing metadata for the tasks for the specified job in the SAS
Drug Development repository.

Syntax:
%SASDRUGDEV_GETJOBTASKS(SDD_PATH=sdd-path <SDD_VERSION=sdd-version,
SAS_DSNAME=SAS-data-set>);

          
History:
   2014-04-22
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the job.
sdd_version - - optional - the version of the job. If not specified, the latest version
        will be used.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the tasks specified as libref.dataset. The default value is
        WORK.SDDGETJOBTASKS. The data set contains a row for each job task and columns
        with the following names. The data set will retain the order of the tasks.
        - jobPath: The path of the job.
        - jobVersion: The job version.
        - taskPath: The path of the task file.
        - taskVersion: The version of the task file. An asterisk indicates the latest
        version of the task file will be used by the job.
File: sasdrugdev_getjobtasks.sas
First available in version: 1.4

%sasdrugdev_getobjecttype(sdd_path=);

[ Exposure: external ]
Reports the SAS Drug Development object type for the specified
repository object path

The SAS macro variable _sddObjectType_ is set to the object type value.
The value is set to blank if the object could not be found or an error occurred.
Possible object type values are:
sas:analysis
sas:container
sas:file
sas:folder
sas:job
sas:organization
sas:pdf
sas:project
sas:sasdataset
sas:sasprogram

Syntax:
%SASDRUGDEV_GETOBJECTTYPE(SDD_PATH=sdd-path);

          
History:
   2014-03-07
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddObjectType_ - the object type.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the object for which the object type
        will be retrieved.
File: sasdrugdev_getobjecttype.sas
First available in version: 1.4

%sasdrugdev_getowner(sdd_path=, sdd_aclType=);

[ Exposure: external ]
Returns the current owner of an object within the organization in the SAS Drug Development
repository.

The macro variable _sddOwner_ will be set with the owner user ID. The value of _sddOwner_
will be <creator> for the DEFAULT permissions on a container with no specific user designated
as the owner.

Syntax for files:
%SASDRUGDEV_GETOWNER(SDD_PATH =sdd-path);

Syntax For containers:
%SASDRUGDEV_GETOWNER(SDD_PATH =sdd-path, SDD_ACLTYPE =sdd-acl-type);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddOwner_ - the current owner of the object.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the content object in the SAS Drug Development
        repository.
sdd_aclType - - conditional - the type of permissions being returned. The valid values
        are DEFAULT and CURRENT (case-insensitive). Files only have CURRENT permissions,
        therefore, the value is not required when sdd_path is a file. For container
        objects the value must be specified. The operation will fail if DEFAULT is
        requested for a file path.
File: sasdrugdev_getowner.sas
First available in version: 1.2

%sasdrugdev_getproperties(sdd_path=, sas_dsname=work.sddGetProperties);

[ Exposure: external ]
Returns a SAS data set that contains the properties of an object in the SAS Drug Development
repository.

Syntax:
%SASDRUGDEV_GETPROPERTIES(SDD_PATH=sdd-path <, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
   2014-04-18
updates to surface extended attribute metadata.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the object in the SAS Drug Development repository.
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for the object specified as libref.dataset. The default value is
        WORK.SDDGETPROPERTIES. The data set will contain variables representing each
        element of metadata for the object. The data set will be sorted by the NAME
        variable. The following metadata will be represented in the data set.
        - path: The path of the object
        - 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 Drug
        Development. Derived properties (e.g. name, path, type) will not have a value
        for displayName.
        - type: The type of the property. Values include STRING, DATE, and BOOLEAN.
        Derived properties (e.g. name, path, type) will not have a value for type.
        - isReadonly: Flag indicating that the property cannot be modified.
        - isExtended: Flag indicating 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: sasdrugdev_getproperties.sas
First available in version: 1.2

%sasdrugdev_getrbitems(sas_dsname=work.sddGetRBItems);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for the items in the SAS Drug Development
recycle bin.

Users must have the Permanent Delete Items or Restore Items Deleted by Others role privilege
at the organization context.

Syntax:
%SASDRUGDEV_GETRBITEMS(<SAS_DSNAME=SAS-data-set>);

          
History:
   2013-03-24
original coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the items specified as libref.dataset. The default value is
        WORK.SDDGETRBITEMS. The data set contains a row for each item in the list and
        columns with the following names. The data set will be sorted by path.
        - name: The name of the item.
        - path: The path of the item.
        - objectType: Describes the type of the item (e.g. folder, data set, etc.)
        - identifier: The unique identifier of the Repository object.
        - size: The size of the object in bytes (will be 0 for containers).
        - deletedBy: The user ID that deleted the object from the Repository.
        - deletedOn: The full date and time when the object was deleted from the Repository
        represented as a String.
        - dateDeleted: The date when the object was deleted as a SAS Datetime format.
        - lastModifiedBy: The user ID that last modified the object.
        - lastModifiedOn: The date when the object was last modified. This value is
        represented as a String.
        - dateLastModified: The date when the object was last modified as a SAS Datetime
        format.
File: sasdrugdev_getrbitems.sas
First available in version: 1.4

%sasdrugdev_getrolemembers(sdd_path=, sdd_role=, sdd_role_context=, sas_dsname=work.sddGetRoleMembers);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the members assigned to a role
within the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_GETROLEMEMBERS(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_ROLE_CONTEXT=sdd-role-context, <, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is assigned.
sdd_role - - required - the name of the role.
sdd_role_context - - required - specifies the context in which the role is defined as a
        path (e.g., /SAS).
sas_dsname - - optional - the name of the output SAS data set that contains the metadata
        for the members specified as libref.dataset. The default value is
        WORK.SDDGETROLEMEMBERS. The data set contains a row for each member in the role and
        columns with the following names. The data set will be sorted by member type and
        principalId.
        - contextPath: The path of the context object.
        - type: The member type. Valid values are user or group.
        - principalId: The name of the member. Valid values are group name or user ID.
        - descriptor: The description of the member. Valid values are group name or user
        display name.
        - grpSrcCtxt: The context in which the group member was defined, if the member is
        a group.
File: sasdrugdev_getrolemembers.sas
First available in version: 1.2

%sasdrugdev_getroleprivileges(sdd_path=, sdd_role=, sas_dsname=work.sddGetRolePrivileges);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the privileges assigned to a
role within the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_GETROLEPRIVILEGES(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name
<, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is defined.
sdd_role - - required - the name of the role.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the privileges specified as libref.dataset. The default value is
        WORK.SDDGETROLEPRIVILEGES. The data set contains a row for each privilege in the
        role and columns with the following names. The data set will be sorted by
        privilegeId.
        - contextPath: The path of the context object.
        - roleName: The name of the role.
        - privilegeId: The identifier of the privilege.
        - privilegeName: The name of the privilege.
File: sasdrugdev_getroleprivileges.sas
First available in version: 1.2

%sasdrugdev_getroles(sdd_path=, sas_dsname=work.sddGetRoles, sdd_getInherited=1);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the roles defined and, if
specified, inherited within the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_GETROLES(SDD_PATH=sdd-path <,SAS_DSNAME=SAS-data-set,
SDD_GETINHERITED=inheritance-flag>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the roles exist.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the roles specified as libref.dataset. The default value is
        WORK.SDDGETROLES. The data set contains a row for each role in the context object
        as well as columns with the following names. The data set will be sorted by role
        name.
        - path: The path of the context object.
        - name: The name of the role.
        - description: The role description.
        - roleSrcCtxt: The context in which the of role was defined.
        - isInherited: A flag indicating whether or not the role is inherited. The valid
        values are 0 and 1. This variable is not included if SDD_GETINHERITED is
        not valid or set to 0.
sdd_getInherited - - optional - indicates whether or not to include inherited roles.
        The valid values are 0 and 1 to exclude or include inherited roles respectively.
        The default is 1.
File: sasdrugdev_getroles.sas
First available in version: 1.2

%sasdrugdev_getsddapiversion;

[ Exposure: external ]

Deprecated. Replaced by sasdrugdev_getconfiguration, effective with the SAS Drug Development 1.4.

Reports the version and build number for the current SAS Drug Development client API.

The value is printed in the SAS log.

Syntax:
%SASDRUGDEV_GETSDDAPIVERSION();

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
File: sasdrugdev_getsddapiversion.sas
First available in version: 1.1

%sasdrugdev_getsignatures(sdd_path=, sdd_version=, sas_dsname=work.sddGetSignatures);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the signatures of a file or a
specific version of the file.

Syntax:
%SASDRUGDEV_GETSIGNATURES(SDD_PATH=sdd-path <, SDD_VERSION=sdd-version,
SAS_DSNAME=SAS-data-set>);

          
History:
   2014-02-25
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required -the path of the file in the SAS Drug Development repository.
sdd_version - - optional - a specific version number of the file. If not specified,
        the signatures of all versions of the file will be returned. Specifying a version
        for a non-versioned job will cause an error.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the signatures specified as libref.dataset. The default value is
        WORK.SDDGETSIGNATURES. The data set contains a row for each signature for file
        and/or version specified and columns with the following names. The data set is
        sorted by descending date of signature.
        - name: The name of the file.
        - path: The path of the file.
        - objectType: The type of file (i.e., data set, program, etc.).
        - versionLabel: The label associated with this specific version.
        - userId: The unique login identifier for the signer of the file.
        - dateTimeStamp: The date and time of the signature represented as a string.
        - dateSigned: The date and time of the signature as a SAS Datetime format.
        - reason: The reason specified when the file was signed.
        - role: The role specified when the file was signed.
        - comment: The comment that was entered when the file was signed.
File: sasdrugdev_getsignatures.sas
First available in version: 1.4

%sasdrugdev_getsubmissionstatus(sdd_jobsubmission_id=);

[ Exposure: external ]
Determines the status of a SAS Drug Development repository job submission.

The SAS macro variable _sddJobSubmissionStatus_ is set to the status value. The values are
NOT_DETERMINED, NOT_STARTED, STARTED, COMPLETED.

Syntax:
%SASDRUGDEV_GETSUBMISSIONSTATUS(SDD_JOBSUBMISSION_ID=job-submission-id);
<, SDD_VERSION=sdd-version> );

          
History:
   2014-04-07
initial code
Expected Macro Variables:
_sddJobSubmissionStatus_ - indicates the job submission status.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_jobsubmission_id - - required - the submission identifier returned from the
        sasdrugdev_submitjob macro.
File: sasdrugdev_getsubmissionstatus.sas
First available in version: 1.4

%sasdrugdev_getsubscriptions(sas_dsname=work.sddGetSubscriptions);

[ Exposure: external ]
Returns a SAS data set containing metadata for all subscriptions for the current user.

Syntax:
%SASDRUGDEV_GETSUBSCRIPTIONS(<SAS_DSNAME=SAS-data-set>);

          
History:
   2014-03-11
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the subscriptions specified as libref.dataset. The default value is
        WORK.SDDGETSUBSCRIPTIONS. The data set contains a row for each subscription
        with the following names. The data set will be sorted by event, location, and
        principalId.
        - event: The name of the event subscription.
        - location: The path of the object to which a subscription applies.
        - type: The subscriber type. Values are USER and GROUP.
        - cascade: Indicates if the subscription is cascaded to child items. Values are
        0 and 1.
        - principalId: The id of the subscriber. The returned values will be either a
        group name or the user ID of the current user.
        - grpSrcCtxt: The context path in which the group was defined if the subscription
        is a for group.
File: sasdrugdev_getsubscriptions.sas
First available in version: 1.4

%sasdrugdev_getsyncstatus(sdd_path=);

[ Exposure: external ]
Determines if a file in the SAS Drug Development repository is synchronized, out of
synchronization, or has never been synchronized with the workspace.

The SAS macro variable _sddSyncStatus_ is set to the status value. The values are NOT_SYNCED,
IN_SYNC, and OUT_OF_SYNC. If the file does not exist in either the workspace or the
repository, the status is reported as NOT_SYNCED. If the object is a container, an error will
be reported.

Syntax:
%SASDRUGDEV_GETSYNCSTATUS(SDD_PATH=sdd-path);

          
History:
   2014-04-07
initial code
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
_sddSyncStatus_ - indicates the syncronization status.
Parameters:
sdd_path - - required - the path of the file.
File: sasdrugdev_getsyncstatus.sas
First available in version: 1.4

%sasdrugdev_getusergroups(sdd_userid=, sas_dsname=work.sddGetUserGroups);

[ Exposure: external ]
Returns a SAS data set containing metadata for each of the groups in which the specified
user is a member.

Syntax:
%SASDRUGDEV_GETUSERGROUPS(SDD_USERID=sdd-userid <, SAS_DSNAME=SAS-data-set>);

          
History:
   2014-03-20
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID of the user for which groups will be retrieved.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the groups specified as libref.dataset. The default value is
        WORK.SDDGETUSERGROUPS. The data set contains a row for each group and columns
        with the following names. The data set will be sorted by group name and
        group context path.
        - userId: The user ID of the user.
        - name: The name of the group.
        - description: The description of the group.
        - grpSrcCtxt: The context path where the group was defined.
File: sasdrugdev_getusergroups.sas
First available in version: 1.4

%sasdrugdev_getuserprivileges(sdd_userid=, sas_dsname=work.sddGetUserPrivileges);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the global privileges assigned
to a user within the system.

Syntax:
%SASDRUGDEV_GETUSERPRIVILEGES(SDD_USERID=sdd-userid <, SAS_DSNAME=SAS-data-set>);

          
History:
   2013-11-01
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user to retrieve the global privileges for.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the global privileges specified as libref.dataset. The default value
        is WORK.SDDGETUSERPRIVILEGES. The data set contains a row for each global privilege
        assigned to the user and the columns with the following names. The data set will
        be sorted by privilegeId.
        - userId: The user ID of the user.
        - privilegeId: The identifier of the privilege.
        - privilegeName: The name of the privilege.
File: sasdrugdev_getuserprivileges.sas
First available in version: 1.3

%sasdrugdev_getversions(sdd_path=, sas_dsname=work.sddGetVersions);

[ Exposure: external ]
Returns a SAS data set that contains the metadata for all of the versions of a file.

Syntax:
%SASDRUGDEV_GETVERSIONS(SDD_PATH=sdd-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.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required -the path of the object in the SAS Drug Development repository.
sas_dsname - - optional - the name of the output SAS data set that will contain the
        metadata for the versions specified as libref.dataset. The default value is
        WORK.SDDGETVERSIONS. The data set contains a row for each version of the object
        and columns with the following names. The most recent version will be the first
        observation in the data set.
        - name: The name of the object.
        - path: The path of the object.
        - objectType: The type of file (i.e., data set, program, etc.).
        - description: The description of the object.
        - versionLabel: The label associated with this specific version.
        - isCheckedOut: A numeric flag that indicates whether the object is currently
        checked out (0=no, 1=yes).
        - isLocked: A numeric flag that indicates whether the object is currently locked
        (0=no, 1=yes).
        - size: The size of the object in bytes (will be 0 for containers).
        - contentType: The content or MIME type of object.
        - createdBy: The user ID that created the object.
        - created: The full date and time the object was created represented as a string.
        - dateCreated: The date the object was created as a SAS Datetime format.
        - lastModifiedBy: The user ID that last modified the object.
        - lastModified: The date the object was last modified represented as a string.
        - dateLastModified: The date the object was last modified as a SAS Datetime format.
        - propertiesLastModifiedBy: The user ID that last modified the properties for the
        object.
        - propertiesLastModified: The date when the object properties were last modified.
        This value is represented as a String.
        - datePropertiesLastModified: The date when the object properties were last
        modified as a SAS Datetime format.
        - isSigned: Indicates if the object has electronic signatures attached to it.
File: sasdrugdev_getversions.sas
First available in version: 1.2

%sasdrugdev_groupexists(sdd_path=, sdd_group=);

[ Exposure: external ]
Determines whether a group is defined for the specified context.

The macro variable _sddGroupExists_ will be set to 1 if the group exists, 0 if it does not.

Syntax:
%SASDRUGDEV_GROUPEXISTS (SDD_PATH=sdd-path, SDD_GROUP=sdd- name);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddGroupExists_ - indicates if the group exists in the context.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object.
sdd_group - - required - the name of the group.
File: sasdrugdev_groupexists.sas
First available in version: 1.2

%sasdrugdev_iscontainer(sdd_path=);

[ Exposure: external ]
Determines whether a SAS Drug Development repository object is of type container.

The SAS macro variable _sddIsContainer_ is set to a value of 1 if the specified object is a
container object, 0 if it is not. Containers objects include folders, projects, analyses,
and the organization.

Syntax:
%SASDRUGDEV_ISCONTAINER(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddIsContainer_ - indicates if the object is a container.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the object in the SAS Drug Development repository.
File: sasdrugdev_iscontainer.sas
First available in version: 1.2

%sasdrugdev_isgroupmember(sdd_path=, sdd_group=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Determines whether a user or group is a member of the group in the specified organization,
project, or analysis.

The SAS macro variable _sddIsGroupMember_ is set to a value of 1 when the specified user or
group is a member of the group, 0 if it is not.

Syntax:
%SASDRUGDEV_ISGROUPMEMBER(SDD_PATH=sdd-path, SDD_GROUP=sdd-group-name,
SDD_MEMBER=sdd-member-identifier, <, SDD_TYPE=sdd-type, SDD_GROUP_CONTEXT=sdd-group-context>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddIsGroupMember_ - indicates if the user or group is a member of the specified group.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the group is assigned.
sdd_group - - required - the name of the group.
sdd_member - - required - the user ID or group name of the member.
sdd_type - - conditional - indicates the type of member. Valid values are USER and GROUP
        (case-insensitive). The default value is USER.
sdd_group_context - - conditional - specifies the context in which the member group is
        defined as a path (e.g., /SAS). The parameter is required if SDD_TYPE=GROUP.
        Otherwise, it will be ignored.
File: sasdrugdev_isgroupmember.sas
First available in version: 1.2

%sasdrugdev_ismember(sdd_path=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Determines whether a user or group is a member in the specified organization, project,
or analysis.

The SAS macro variable _sddIsMember_ is set to a value of 1 when the specified user or group
is a member of the context, 0 if it is not. Groups defined at the context level will not be
considered as members of that context.

Syntax:
%SASDRUGDEV_ISMEMBER(SDD_PATH=sdd-path, SDD_MEMBER=sdd-member-identifier <, SDD_TYPE=sdd-type,
SDD_GROUP_CONTEXT=sdd-group-context>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddIsMember_ - indicates if the user or group is a member of the specified
        organization, project, or analysis.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path (starting at the root) context object (organization,
        project, or analysis).
sdd_member - - required - the user ID or group name of the member.
sdd_type - - conditional - indicates the type of member. Valid values are USER and GROUP
        (case-insensitive). The default value is USER.
sdd_group_context - - conditional - specifies the context in which the member group is
        defined as a path (e.g., /SAS). The parameter is required if SDD_TYPE=GROUP.
        Otherwise, it will be ignored.
File: sasdrugdev_ismember.sas
First available in version: 1.2

%sasdrugdev_isrolemember(sdd_path=, sdd_role=, sdd_role_context=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Determines whether a user or group is a member of a role in the specified organization,
project, or analysis.

The SAS macro variable _sddIsRoleMember_ is set to a value of 1 when the specified user or
group is a member of the role, 0 if it is not.

Syntax:
%SASDRUGDEV_ISROLEMEMBER(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_ROLE_CONTEXT=sdd-role-context, SDD_MEMBER=sdd-member-identifier <, SDD_TYPE=sdd-type,
SDD_GROUP_CONTEXT=sdd-group-context>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddIsRoleMember_ - indicates if the user or group is a member of the role in the
        specified organization, project, or analysis.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is assigned.
sdd_role - - required - the name of the role.
sdd_role_context - - required - the context in which the role is defined as a path
        (e.g., /SAS).
sdd_member - - required - the user ID or group name of the member.
sdd_type - - conditional - indicates the type of member. Valid values are USER and GROUP
        (caes-insensitive). The default value is USER.
sdd_group_context - - conditional - specifies the context in which the member group is
        defined as a path (e.g., /SAS). The parameter is required if SDD_TYPE=GROUP.
        Otherwise, it will be ignored.
File: sasdrugdev_isrolemember.sas
First available in version: 1.2

%sasdrugdev_isroleprivilege(sdd_path=, sdd_role=, sdd_privilege=);

[ Exposure: external ]
Determines whether a privilege is assigned to a role in the specified organization,
project, or analysis.

The SAS macro variable _sddIsRolePrivilege_ is set to a value of 1 when the privilege is
assigned, 0 if it is not.

Syntax:
%SASDRUGDEV_ISROLEPRIVILEGE(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_PRIVILEGE=sdd-privilege-id);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddIsRolePrivilege_ - indicates if the privilege is assigned to the role in the
        specified organization, project, or analysis.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is assigned.
sdd_role - - required - the name of the role.
sdd_privilege - - required - the identifier of the privilege to check.
File: sasdrugdev_isroleprivilege.sas
First available in version: 1.2

%sasdrugdev_isuserprivilege(sdd_userid=, sdd_privilege=);

[ Exposure: external ]
Determines whether a global privilege is assigned to a user.

The SAS macro variable _sddIsUserPrivilege_ is set to a value of 1 when the privilege is
assigned, 0 if it is not.

Syntax:
%SASDRUGDEV_ISUSERPRIVILEGE(SDD_USERID=sdd-userid, SDD_PRIVILEGE=sdd-privilege-id);

          
History:
   2013-11-01
initial coding
Expected Macro Variables:
_sddIsUserPrivilege_ - indicates if the privilege is assigned to the user.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID to check.
sdd_privilege - - required - the identifier of the global privilege to check.
File: sasdrugdev_isuserprivilege.sas
First available in version: 1.3

%sasdrugdev_isversioned(sdd_path=);

[ Exposure: external ]
Determines whether a SAS Drug Development repository object has versioning enabled.

The SAS macro variable _sddIsVersioned_ is set to a value of 1 when the object is versioned,
0 if it is not.

Syntax:
%SASDRUGDEV_ISVERSIONED(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddIsVersioned_ - indicates if the object is versioned or not.
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the file.
File: sasdrugdev_isversioned.sas
First available in version: 1.1

%sasdrugdev_lockuser(sdd_userid=);

[ Exposure: external ]
Locks a user account.

The person running the macro must have the user privilege to manage user accounts.

Syntax:
%SASDRUGDEV_LOCKUSER(SDD_USERID=sdd-userid);

          
History:
   2014-3-19
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID of the user account to lock.
File: sasdrugdev_lockuser.sas
First available in version: 1.4

%sasdrugdev_login(sdd_url=, sdd_userid=, sdd_password=, proxy_host=, proxy_port=, proxy_userid=, proxy_password=);

[ Exposure: external ]
Creates a connection to the SAS Drug Development instance.

This macro is only required when running the macros from a PC SAS session. It must be called
before any other SAS Drug Development macro in order to establish your session.

NOTE: This macro is only supported from a PC SAS session. Using this macro within an active
SAS Drug Development application session will result in a failure.

Syntax:
%SASDRUGDEV_LOGIN(SDD_URL=url, SDD_USERID=user-id , SDD_PASSWORD=password,
<, PROXY_HOST=proxy-host, PROXY_USERID=proxy-userid, PROXY_PASSWORD=proxy-pw );

Example Code:

1. The parameters passed to the login macro are often strings containing special characters
which may cause problems when resolved by SAS. You will probably want to wrap each of the
parameters in a SAS function call to prevent any issues:
%sasdrugdev_login(sdd_url=%str(https://sddinstance), sdd_userid=%str(sdd-user-id),
sdd_password=%str (sddpassword ));

2. Certain special characters common in passwords (e.g. ampersands, percent signs) may
may require quoting.
%sasdrugdev_login(sdd_url=%str(https://sddinstance), sdd_userid=%str(sdd-user-id),
sdd_password=%nrbquote(sddpassword ));

          
History:
   2013-06-26
version 1.2 update - trusted session
   2013-08-30
updates for standardization and coding conventions
   2014-03-04
updates for proxy
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_url - - required - the URL of the SAS Drug Development instance to use in the form
        https://sddname.sas.com or http://sddname.sas.com.
sdd_userid - - required - the SAS Drug Development ID for the user account.
sdd_password - - required - the SAS Drug Development password for the user account.
proxy_host - - conditional - the name of the host machine when the SAS Drug Development
        system is accessed through a proxy server.
proxy_port - - conditional - the port number required for the proxy host machine.
        Required when a proxy_host is designated.
proxy_userid - - conditional - the userid when the proxy machine requires authentication.
proxy_password - - conditional - the password when the proxy machine required
        authentication.
File: sasdrugdev_login.sas
First available in version: 1.1

%sasdrugdev_logout;

[ Exposure: external ]
Closes an open connection to SAS Drug Development.

This macro is only used when running the macros from a PC SAS session. This should be the
last macro you call in any program.

NOTE: This macro is only supported from a PC SAS session. Using this macro within an active
SAS Drug Development application session will result in a failure.

Syntax:
%SASDRUGDEV_LOGOUT();

          
History:
   2013-06-26
version 1.2 update - trusted session
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
File: sasdrugdev_logout.sas
First available in version: 1.1

%sasdrugdev_move(sdd_source=, sdd_target=);

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

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

Syntax:
%SASDRUGDEV_MOVE(SDD_SOURCE=sdd-source-path, SDD_TARGET=sdd-target-path);

          
History:
   2014-03-03
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_source - - required - the path of the object to be moved.
sdd_target - - required - the path of the folder into which the object is to be
        moved. The target folder must already exist. Path cannot end with a slash (/).
File: sasdrugdev_move.sas
First available in version: 1.4

%sasdrugdev_objectexists(sdd_path=);

[ Exposure: external ]
Determines whether a SAS Drug Development repository object exists.

The SAS macro variable _sddObjectExists_ is set to a value of 1 when the object exits, 0 if
it is not.

Syntax:
%SASDRUGDEV_OBJECTEXISTS(SDD_PATH=sdd-path);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddObjectExists_ - indicates if the object exists.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the object.
File: sasdrugdev_objectexists.sas
First available in version: 1.1

%sasdrugdev_removegroupmember(sdd_path=, sdd_group=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Removes a user or a group as a member of a group in the specified organization, project, or
analysis.

Syntax:
%SASDRUGDEV_REMOVEGROUPMEMBER(SDD_PATH=sdd-path, SDD_GROUP=sdd-group-name,
SDD_MEMBER=sdd-member-identifier <, SDD_TYPE=sdd-type, SDD_GROUP_CONTEXT=sdd-group-context>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the group is defined.
sdd_group - - required - the name of the group that the member is to be removed from.
sdd_member - - required - the id of the user or the name of the group being removed.
sdd_type - - conditional - indicates the type of member. Valid values are USER and GROUP
        (case-insensitive). The default value is USER.
sdd_group_context - - conditional - specifies the context in which the group being
        removed is defined as a path (e.g., /SAS). This parameter is required if
        SDD_TYPE=GROUP. Otherwise, it will be ignored.
File: sasdrugdev_removegroupmember.sas
First available in version: 1.2

%sasdrugdev_removemember(sdd_path=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Removes a user or a group as a member of the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_REMOVEMEMBER(SDD_PATH=sdd-path, SDD_MEMBER=sdd-member-identifier
<, SDD_TYPE=sdd-type, SDD_GROUP_CONTEXT=sdd-group-context>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) to remove the member from.
sdd_member - - required - the id of the user or the name of the group being removed.
sdd_type - - conditional - indicates the type of member. Valid values are USER and GROUP
        (case-insensitive). The default value is USER.
sdd_group_context - - conditional - specifies the context in which the group being
        removed is defined as a path (e.g., /SAS). This parameter is required if
        SDD_TYPE=GROUP. Otherwise, it will be ignored.
File: sasdrugdev_removemember.sas
First available in version: 1.2

%sasdrugdev_removerolemember(sdd_path=, sdd_role=, sdd_role_context=, sdd_member=, sdd_type=USER, sdd_group_context=);

[ Exposure: external ]
Removes a user or a group as a member of a role in the specified organization, project, or
analysis.

Syntax:
%SASDRUGDEV_REMOVEROLEMEMBER(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_ROLE_CONTEXT=sdd-role-context, SDD_MEMBER=sdd-member-identifier <, SDD_TYPE=sdd-type,
SDD_GROUP_CONTEXT=sdd-group-context>);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is assigned.
sdd_role - - required - the name of the role that the member is to be removed from.
sdd_role_context - - required - specifies the context in which the role is defined as a
        path (e.g., /SAS).
sdd_member - - required - the ID of the user or the name of the group being removed.
sdd_type - - conditional - indicates the type of member. Valid values are USER and GROUP
        (case-insensitive). The default value is USER.
sdd_group_context - - conditional - specifies the context in which the group being
        removed is defined as a path (e.g., /SAS). This parameter is required if
        SDD_TYPE=GROUP. Otherwise, it will be ignored.
File: sasdrugdev_removerolemember.sas
First available in version: 1.2

%sasdrugdev_removeroleprivilege(sdd_path=, sdd_role=, sdd_privilege=);

[ Exposure: external ]
Removes a privilege from a role in the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_REMOVEROLEPRIVILEGE(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_PRIVILEGE=sdd-privilege-id);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) where the role is defined.
sdd_role - - required - the name of the role that the privilege is to be removed from.
sdd_privilege - - required - the identifier of the privilege to remove.
File: sasdrugdev_removeroleprivilege.sas
First available in version: 1.2

%sasdrugdev_removeuserprivilege(sdd_userid=, sdd_privilege=);

[ Exposure: external ]
Remove a global privilege from a user in the system.

Syntax:
%SASDRUGDEV_ROLEEXISTS(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name);

          
History:
   2013-11-01
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user to remove the global privilege from.
sdd_privilege - - required - the identifier of the global privilege to remove.
File: sasdrugdev_removeuserprivilege.sas
First available in version: 1.3

%sasdrugdev_renameanalysis(sdd_source=, sdd_newname=);

[ Exposure: external ]
Renames an analysis.

Another analysis with the new name must not already exist in the parent project.

Syntax:
%SASDRUGDEV_RENAMEANALYSIS(SDD_SOURCE=sdd-source-path, SDD_NEWNAME=sdd-new-name);

          
History:
   2014-03-04
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_source - - required - the path, including the name, of the analysis to be renamed.
sdd_newname - - required - the new name of the analysis.
File: sasdrugdev_renameanalysis.sas
First available in version: 1.4

%sasdrugdev_renameobject(sdd_source=, sdd_newname=);

[ Exposure: external ]
Renames a file or folder.

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

Syntax:
%SASDRUGDEV_RENAMEOBJECT(SDD_SOURCE=sdd-source-path, SDD_NEWNAME=sdd-new-name);

          
History:
   2014-03-03
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_source - - required - the path, including the name, of the object to be renamed.
sdd_newname - - required - the new name of the object.
File: sasdrugdev_renameobject.sas
First available in version: 1.4

%sasdrugdev_renameproject(sdd_source=, sdd_newname=);

[ Exposure: external ]
Renames a project.

Another project with the new name must not already exist in the organization.

Syntax:
%SASDRUGDEV_RENAMEPROJECT(SDD_SOURCE=sdd-source-path, SDD_NEWNAME=sdd-new-name);

          
History:
   2014-03-04
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_source - - required - the path, including the name, of the project to be renamed.
sdd_newname - - required - the new name of the project.
File: sasdrugdev_renameproject.sas
First available in version: 1.4

%sasdrugdev_resetpassword(sdd_userid=, sdd_newpassword=);

[ Exposure: external ]
Reset the password for a user in the system. This action requires the logged on user to have
the administrative privilege PRIVILEGE_MANAGE_USER_ACCOUNTS. Once the password has been
successfully reset, the user can immediately log on with the new password, but they will be
forced to change their password immediately so the password remains unique to the user.

Syntax:
%SASDRUGDEV_RESETPASSWORD(SDD_USERID=sdd-userid, SDD_NEWPASSWORD=sdd-password);

          
History:
   2013-11-04
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID of the account to reset.
sdd_newpassword - - required - the new temporary password.
File: sasdrugdev_resetpassword.sas
First available in version: 1.3

%sasdrugdev_roleexists(sdd_path=, sdd_role=);

[ Exposure: external ]
Determines whether a a role is defined in the specified organization, project, or analysis.

The SAS macro variable _sddRoleExists_ is set to a value of 1 when the role exists, 0 if it
is not.

Syntax:
%SASDRUGDEV_ROLEEXISTS(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
_sddRoleExists_ - indicates if the role exists in the context.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis).
sdd_role - - required - the name of the role.
File: sasdrugdev_roleexists.sas
First available in version: 1.2

%sasdrugdev_submitjob(sdd_path=, sdd_version=, sas_dsname=);

[ Exposure: external ]
Submits a SAS Drug Development repository job for immediate execution and sets the SAS macro
variable _sddJobSubmissionStatus_ to the identifier for the job submission. If the job cannot
be submitted, _sddJobSubmissionStatus_ will be set to blank.

A data set representing the job parameters whose values are to be overridden for the current
job submission can be sent into the call of sasdrugdev_submitjob. If no job parameters data
set is sent in, the default values for all job parameters will be used.
The output data set from the macro sasdrugdev_getjobparameters contains all the data relevant
to the parameters for a specific job and can be used as a source for the input parameters data
set for the sasdrugdev_submitjob macro. Modify the data set with any desired changes prior to
calling sasdrugdev_submitjob.
- Rename the defaultValue variable to "value" or add a variable with the name "value" to
indicate the values to use for the current submission.
- Default job parameter values will be used for missing parameters (deleted rows)
- Indicating an empty string for a parameter value will result in using a blank as the
parameter value for the current submission.
- Added parameters will be ignored.
- The parameters in the input data set are matched with the job parameters by name and type.
If no match is found for a parameter, its default value will be used.
- Data set rows with duplicate values for parameter name will cause an execution error.
- DATE job parameter values must be in SAS datetime18. format (e.g., 02NOV2013:09:33:22), or
in SAS E8601DZ25. format (e.g., 2013-11-02T09:33:22-04:00). For SAS datetime18. format, an
offset of zero hours from GMT will be used. To specify an offset from GMT, use the
E8601DZ25. format. Date values in formats other than the two described above will result
in an execution error.

Syntax:
%SASDRUGDEV_SUBMITJOB(SDD_PATH=sdd-path <, SDD_VERSION=sdd-version,
SAS_DSNAME=SAS-data-set>);

          
History:
   2014-04-09
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required -the path of the job in the SAS Drug Development repository.
sdd_version - - optional - a specific version number of the job. If not specified,
        the latest version of the job will be submitted. Specifying a version for a
        non-versioned file will cause an error.
sas_dsname - - optional - the name of the SAS data set containing the job parameter
        information specified as libref.dataset. If not specified, the default job
        parameters values will be used. The data set must contain, at minimum, the
        character variables listed below. Any additional variables will be ignored.
        - name: The name of the parameter.
        - type: The parameter type. Valid values are CHARACTER, CHARACTER_MASKED,
        NUMERIC, DATE, FILE, and FOLDER.
        - value: The value of the parameter to be used in the current job submission.
        - fileVersion: The file version to be used if the parameter is of type FILE.
        For versioned files, a blank value will result in the latest file version
        used. For nonversioned files, the value is ignored.
File: sasdrugdev_submitjob.sas
First available in version: 1.4

%sasdrugdev_syncfiletoworkspace(sdd_path=, sdd_version=);

[ Exposure: external ]
Gets the version of the SAS Drug Development from the repository file to the workspace.

Syntax:
%SASDRUGDEV_SYNCFILETOWORKSPACE(SDD_PATH=sdd-path, SDD_VERSION=sdd-version>);

          
History:
   2014-04-07
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the file within the SAS Drug Development repository
        to download.
sdd_version - - conditional - specifies the version of the file to be synchronized if
        the file is versioned. If the file is versioned and a version is specified the
        value must be in the valid format including 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 version is specified, the value will
        be ignored.
File: sasdrugdev_syncfiletoworkspace.sas
First available in version: 1.4

%sasdrugdev_unassignrole(sdd_path=, sdd_role=, sdd_role_context=);

[ Exposure: external ]
Unassigns a role from the specified organization, project, or analysis.

Syntax:
%SASDRUGDEV_UNASSIGNROLE(SDD_PATH=sdd-path, SDD_ROLE=sdd-role-name,
SDD_ROLE_CONTEXT=sdd-role-context);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the context object (organization, project, or
        analysis) from which to unassign the role.
sdd_role - - required - the name of the role being unassigned.
sdd_role_context - - required - specifies the context in which the role is defined as a
        path (e.g., /SAS).
File: sasdrugdev_unassignrole.sas
First available in version: 1.2

%sasdrugdev_unlockuser(sdd_userid=);

[ Exposure: external ]
Unlocks a user account.

The person running the macro must have the user privilege to manage user accounts.

Syntax:
%SASDRUGDEV_UNLOCKUSER(SDD_USERID=sdd-userid);

          
History:
   2014-3-19
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID of the user account to unlock.
File: sasdrugdev_unlockuser.sas
First available in version: 1.4

%sasdrugdev_updateacls(sas_dsname=);

[ Exposure: external ]
Sets permissions on SAS Drug Development objects using a data set as input.

This macro sets access permissions on repository objects using a SAS data set as input. The
permission lists (known as Access Control Lists or ACLs) for multiple objects can be modified
using a single data set. Access permissions are applied only to objects in the repository
within the organization. There are two types of access permission lists: Current and Default.
The Current access permissions are applied to an individual object. The Default access
permissions apply only to container objects (e.g. folders, projects) and define the
permissions that will be inherited by any new objects added to the container. In the context
of this macro the access permission type is referred to as aclType. All records in the input
data set that pertain to the same repository object and aclType will be processed together as
a single ACL.

A set of permissions for a specific repository object for an individual principal within an
access permission type are referred to as an Access Control Entry (ACE). An ACE is
represented as a single row in the input data set. An ACE is defined by the following
characteristics:
- path: Full path of the repository object (file or container) to which the permissions are
being assigned.
- acl type: The access permission type is being assigned (DEFAULT or CURRENT)
- acl principal type: Identifies the type of the principal. The principal type can be Owner,
Members, User, or Group.
- acl principal name: The name of the user or group to assign the permission to.
- set of permissions: The specific permissions being assigned (e.g. administration, read,
properties write, content write, delete).

The output data set from the sasdrugdev_getacls macro contains all the necessary variables
and data needed as the input data set for the sasdrugdev_updateACLs macro. Modify the data
set with any changes prior to calling sasdrugdev_updateacls.
- To add a principal with specific access permissions to a repository object, add a new row
to the data set for that principal.
- To modify the access permissions for a principal already associated with a repository
object, edit the appropriate row in the data set.
- To remove a principal with specific access permissions to a repository object, delete the
appropriate row from the data set. Note that the Owner and Members access control entries
cannot be removed from the object. Removing them from the data set will cause a failure.
- To maintain the existing permissions for a principal already associated with a repository
object, leave the record as it is in the data set. The record must remain otherwise the
access permissions for this principal will be removed.

Failure and Message Handling:
The macro performs a series of validation procedures to determine that the input data set has
the necessary structure for processing. If any of these validation procedures fail, an
appropriate failure message is printed to the log and the macro stops additional processing.

In addition to other modifications, the macro sorts the input data set and stores the modified
data in a temporary data set called WORK.__SASMACRO_ACLTEMP__. In the event that a failure
occurs during processing this temporary data set is retained as a reference. If all updates
are performed successfully, this data set will be deleted from the work library. A message
will be printed to the log reporting whether the data set was retained or not. Regardless of
success or failure of previous runs, this data set will be deleted at the beginning of each
new run of the macro. The data values and sort order of the original input data set are
maintained.

All records pertaining to the same repository object and aclType are processed as a single
access control list by the macro. Messages will be printed to the log as each ACL is
processed. If the update of an ACL fails, the macro will stop processing.

If a failure occurs while processing a specific access control entry (i.e. a principal), the
macro will stop processing and a failure message will be written to the log including the
observation number for the entry that failed. The observation number refers to the
observation in the interim data set (WORK.__SASMACRO_ACLTEMP__) created by the macro.
Successful updates to ACLs made prior to the observation containing the failure will be
maintained in SAS Drug Development. Changes made to access permissions for entries that are
part of the same ACL that contained the observation with the failure will be lost.

Valid values for permissions are as follows. All values must be of type numeric.
1 for GRANT
-1 for DENY
0 for inherited.

Syntax:
%SASDRUGDEV_UPDATEACLS(SAS_DSNAME=SAS-data-set);

Example Code:
Get permissions for a folder:

* start code example;
%sasdrugdev_getacls(sdd_path=%str(/SAS/Study1/Files/folder1), sdd_recursive=0);

data UpdateACLS;
set sddGetACLS end=eof;

output;

if eof then do;
* Adding user permission under DEFAULT;
aclType = "DEFAULT";
aclPrincipalType = "USER";
aclPrincipalName = "user1";
grpSrcCtxt = "";
adminPermission = 0;
readPermission = 1;
writePropPerm = 1;
writeContentPerm = 1;
deletePermission = 1;
output;

* Adding group permission under CURRENT;
aclType = "CURRENT";
aclPrincipalType = "GROUP";
aclPrincipalName = "group1";
grpSrcCtxt = "/SAS";
adminPermission = 0;
readPermission = 1;
writePropPerm = 1;
writeContentPerm = 1;
deletePermission = 1;
output;
end;

run;

%sasdrugdev_updateacls(sas_dsname=UpdateACLS);
* end code example;

Note: Access Control Entries (ACEs) with values of 0 for all permission variables will be
removed from or will not be added to the ACL.
Note: Users and groups being added as access control entries must be members in the context
(organization, project, analysis) containing the object being updated.

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sas_dsname - - required - the name of a SAS data set containing the permission
        information for all the objects to be modified specified as libref.dataset. The
        data set must contain, at minimum, the variables listed below. Any additional
        variables will be ignored.
        - path: The case-sensitive path of the object including object name.
        - aclType: Indicates which ACL to modify for the object. For Analysis and file
        objects, the variable must be present but the value will be ignored. For
        container objects, the value must be either DEFAULT or CURRENT
        (case-insensitive).
        - aclPrincipalType: Indicates the type of ACE being updated.
        Values: ACLOWNER | ACLMEMBERS | USER | GROUP (case-insensitive)
        Default: None
        - aclPrincipalName: The name of the principal ACE being updated or added.
        For aclPrincipalType ACLOWNER, this must have the value OWNER.
        For aclPrincipalType ACLMEMBERS, this must have the value MEMBERS.
        For aclPrincipalType USER, this must be a valid userid (case-sensitive).
        For aclPrincipalType GROUP, this must be a valid group name (case-sensitive).
        - grpSrcCtxt: The case-sensitive path of the context (organization, project, or
        analysis) where the group is defined if aclPrincipalType is GROUP. For
        aclPrincipalType GROUP, this value is required, otherwise the variable must
        be present but the value will be ignored.
        - adminPermission: The permission to administer the object.
        - readPermission: The permission to view the object.
        - writePropPerm: The permission to update the properties of the object.
        - writeContentPerm: The permission to write to the content of the object.
        - deletePermission: The permission to the delete the object.
File: sasdrugdev_updateacls.sas
First available in version: 1.2

%sasdrugdev_updateanalysislead(sdd_path=, sdd_userid=);

[ Exposure: external ]
Updates the current lead of an analysis in the SAS Drug Development repository.

Syntax for files:
%SASDRUGDEV_UPDATEANALYSISLEAD(SDD_PATH=sdd-path, SDD_USERID=sdd-userid);

          
History:
   2014-05-01
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the analysis in the SAS Drug Development repository.
sdd_userid - - required - the user ID for the account that will be the new lead.
File: sasdrugdev_updateanalysislead.sas
First available in version: 1.4

%sasdrugdev_updateanalysisstate(sdd_path=, sdd_state=, sdd_comment=);

[ Exposure: external ]
Update the state of an analysis in the SAS Drug Development repository

Syntax:
%SASDRUGDEV_UPDATEANALYSISSTATE(SDD_PATH=sdd-path, SDD_STATE=sdd-state,
< SDD_COMMENT=sdd-comment >);

          
History:
   2014-05-01
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the analysis to be updated.
sdd_state - - required - the state to set on the analysis.
        Values: DEV | PROD | CLOSED
sdd_comment - - optional - the reason for the state change.
File: sasdrugdev_updateanalysisstate.sas
First available in version: 1.4

%sasdrugdev_updatefile(local_path=, sdd_path=, sdd_comment=, sdd_version=);

[ Exposure: external ]
Updates the contents of an existing file in the SAS Drug Development repository.

If the file is versioned a new version will be created. If the file is not versioned, the
existing contents will be overwritten.

NOTE: This macro is only supported from a PC SAS session. Using this macro within an active
SAS Drug Development application session will result in a failure.

Syntax:
%SASDRUGDEV_UPDATEFILE(LOCAL_PATH=local-path, SDD_PATH=sdd-path <, SDD_COMMENT=sdd-comment>,
SDD_VERSION=sdd-version-type);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
local_path - - required - the absolute path of the file on the local computer.
sdd_path - - required - the path of the content object in the SAS Drug Development
        repository to update. The object must already exist and may not be a container.
sdd_comment - - conditional - the comment for a versioned file in the repository. This
        value is ignored for non-versioned objects.
sdd_version - - conditional - the type of version to be created if the file to be
        updated is versioned. Valid values are MAJOR or MINOR. The default is MINOR. This
        value is ignored for non-versioned objects.
File: sasdrugdev_updatefile.sas
First available in version: 1.1

%sasdrugdev_updateorglead(sdd_path=, sdd_userid=);

[ Exposure: external ]
Updates the current lead of an organization in the SAS Drug Development repository.

Syntax for files:
%SASDRUGDEV_UPDATEORGLEAD(SDD_PATH=sdd-path, SDD_USERID=sdd-userid);

          
History:
   2014-05-01
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the organization object in the SAS Drug Development
        repository.
sdd_userid - - required - the user ID for the account that will be the new lead.
File: sasdrugdev_updateorglead.sas
First available in version: 1.4

%sasdrugdev_updateowner(sdd_path=, sdd_aclType=, sdd_userid=);

[ Exposure: external ]
Updates the current owner of an object within the organization in the SAS Drug Development
repository.

Syntax for files:
%SASDRUGDEV_UPDATEOWNER(SDD_PATH=sdd-path, SDD_USERID=sdd-userid);

Syntax for containers:
%SASDRUGDEV_UPDATEOWNER(SDD_PATH=sdd-path, SDD_USERID=sdd-userid, SDD_ACLTYPE=sdd-acl-type);

          
History:
   2013-08-30
updates for standardization and coding conventions
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the content object in the SAS Drug Development
        repository.
sdd_aclType - - conditional - the type of permission owner being set. The valid values
        are DEFAULT and CURRENT (case-insensitive). Files only have CURRENT permissions,
        therefore, the value is not required when the sdd_path is a file. For container
        objects the value must be specified. The operation will fail if DEFAULT is
        requested for a file path.
sdd_userid - - required - the user ID for the account that will be the new owner. To set
        the owner for the DEFAULT permissions to be the creator of the objects, specify
        the value <creator> as the value for sdd-userid.
File: sasdrugdev_updateowner.sas
First available in version: 1.2

%sasdrugdev_updateprojectlead(sdd_path=, sdd_userid=);

[ Exposure: external ]
Updates the current lead of a project in the SAS Drug Development repository.

Syntax for files:
%SASDRUGDEV_UPDATEPROJECTLEAD(SDD_PATH=sdd-path, SDD_USERID=sdd-userid);

          
History:
   2014-05-01
initial coding.
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the project in the SAS Drug Development repository.
sdd_userid - - required - the user ID for the account that will be the new lead.
File: sasdrugdev_updateprojectlead.sas
First available in version: 1.4

%sasdrugdev_updateprojectstate(sdd_path=, sdd_state=, sdd_comment=, sdd_include_analyses=1);

[ Exposure: external ]
Update the state of a project in the SAS Drug Development repository

Syntax:
%SASDRUGDEV_UPDATEPROJECTSTATE(SDD_PATH=sdd-path, SDD_STATE=sdd-state,
< SDD_COMMENT=sdd-comment, SDD_INCLUDE_ANALYSES=sdd-include-analyses >);

          
History:
   2014-05-01
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the project to be updated.
sdd_state - - required - the state to set on the project.
        Values: DEV | PROD | CLOSED
sdd_comment - - optional - the reason for the state change.
sdd_include_analyses - - optional - whether project child analyses, if any exist, should
        have their state updated as well.
        Values: 0 | 1
        If no value is supplied, the child analysis states will be updated to the same
        state value as supplied for the project.
File: sasdrugdev_updateprojectstate.sas
First available in version: 1.4

%sasdrugdev_updateproperties(sdd_path=, sas_dsname=);

[ Exposure: external ]
Updates the editable properties of SAS Drug Development repository object using a SAS data
set as input.

The output data set from the sasdrugdev_getproperties macro contains the necessary variables
and data needed as the input data set for the sasdrugdev_updateproperties macro. Modify the
data set with any changes prior to calling sasdrugdev_updateproperties.
- Data in the input data set that do not correspond to a property of the object being updated
will be ignored.
- Values specified for properties that are not editable will be ignored.
- An input data value that is the same as the current property value will be ignored and will
not result in a property update. No audit record will be created for the property.

Organization, project, and analysis leads cannot be updated via the
sasdrugdev_updatepropertiesmacro. Use the sasdrugdev_updateorglead,
sasdrugdev_updateprojectlead, sasdrugdev_updateanalysislead macros, to update organization,
project, and analysis leads, respectively.

Project and analysis state and state comment cannot be updated via the
sasdrugdev_updateproperties macro. Use the sasdrugdev_updateprojectstate and
sasdrugdev_updateanalysis state macros for this purpose.

Syntax:
%SASDRUGDEV_UPDATEPROPERTIES(SDD_PATH=sdd-path, SAS_DSNAME=SAS-data-set);

          
History:
   2014-04-24
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_path - - required - the path of the object in the SAS Drug Development repository.
sas_dsname - - required - the name of a SAS data set containing the property values
        to be set on the repository object specified as libref.dataset. The data set must
        contain, at minimum, the variables listed below. Any additional variables will
        be ignored.
        - name: the name of the property to be updated.
        - value: the value to set on the property.
File: sasdrugdev_updateproperties.sas
First available in version: 1.4

%sasdrugdev_updateuserinfo(sdd_userid=, sdd_displayname=_sdd_updateuser_donotupdate_, sdd_email=_sdd_updateuser_donotupdate_, sdd_accounttype=_sdd_updateuser_donotupdate_, sdd_firstname=_sdd_updateuser_donotupdate_, sdd_lastname=_sdd_updateuser_donotupdate_, sdd_department=_sdd_updateuser_donotupdate_, sdd_phone=_sdd_updateuser_donotupdate_);

[ Exposure: external ]
Update general user account information

Syntax:
%SASDRUGDEV_UPDATEUSERINFO(SDD_USERID=sdd-userid, < SDD_DISPLAYNAME=sdd-displayname,
SDD_EMAIL=sdd-email, SDD_ACCOUNTTYPE=sdd-accounttype, SDD_FIRSTNAME=sdd-firstname,
SDD_LASTNAME=sdd-lastname, SDD_DEPARTMENT=sdd-department, SDD_PHONE=sdd-phone >);

You must have either the Manage User Account General Information or the Manage Users global
privilege in order to update user information.

If an optional parameter is not passed in, no change to the existing user attribute value
will be made. If the parameter is pased in, the specified value will be set on the user
attribute. Parameter values must conform to SDD validation rules.

          
History:
   2014-03-27
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
sdd_userid - - required - the user ID of the account being updated.
sdd_displayname - - optional - the user display name to be set.
sdd_email - - optional - the user email address.
sdd_accounttype - - optional - the user account type.
        Values: INTERACTIVE | SYSTEM
sdd_firstname - - optional - the user first name.
sdd_lastname - - optional - the last name of the user.
sdd_department - - optional - the business unit of the user.
sdd_phone - - optional - the phone number of the user.
File: sasdrugdev_updateuserinfo.sas
First available in version: 1.4

%sasdrugdev_uploadandexpand(local_path=, sdd_path=, sdd_versioning=, sdd_version=, sdd_comment=);

[ Exposure: external ]
Uploads and expands the contents of a zip file into the specified folder location in the SAS
Drug Development repository.

NOTE: This macro is only supported from a PC SAS session. Using this macro within an active
SAS Drug Development application session will result in a failure.

Failure and Message Handling:
The action status for each file that is being uploaded and each folder that is being created
will be printed in the log.

Syntax:
%SASDRUGDEV_UPLOADANDEXPAND(LOCAL_PATH=local-zipfile-path, SDD_PATH=sdd-path
<, SDD_VERSIONING=sdd-versioning, SDD_VERSION=sdd-version, SDD_COMMENT=sdd_comment>);

          
History:
   2013-03-18
initial code
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
Parameters:
local_path - - required - the absolute path and name of the zip file on the local
        computer.
sdd_path - - required - the path of the target folder.
sdd_versioning - - optional - indicates whether the new files being created should be
        versioned. The default value is 0, which will create a non-versioned file. A
        value of 1 will create a versioned file. The versioning status of existing
        files will not be changed.
        Values: 0 | 1
        Default: 0
sdd_version - - optional - the type of version to be created if the new files are to be
        versioned. Valid values are MAJOR or MINOR. The default is MINOR. This value is
        ignored for non-versioned objects.
sdd_comment - - conditional - the comment for the versioned file being created. This
        option is ignored when creating non-versioned files.
File: sasdrugdev_uploadandexpand.sas
First available in version: 1.4

%sasdrugdev_userexists(sdd_userid=);

[ Exposure: external ]
Determines whether a user exists within the system.

The macro variable _sddUserExists_ will be set to 1 if the user exists, 0 if it does not.

Syntax:
%SASDRUGDEV_USEREXISTS(SDD_USERID=sdd-userid);

          
History:
   2013-10-30
initial coding
Expected Macro Variables:
_sddMsg_ - the return message.
_sddRC_ - the return code.
_sddUserExists_ - indicates if the user exists.
Parameters:
sdd_userid - - required - the user ID of the user account to check.
File: sasdrugdev_userexists.sas
First available in version: 1.3