Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
ms_getgroups.sas File Reference

Fetches the list of groups from SASjs Server. More...

Go to the source code of this file.

Detailed Description

Fetches all groups, or the groups for a particular user. When both user and uid are provided, user takes precedence. GROUPURI is the API group uid, not the legacy numeric groupid. Desktop mode returns a synthetic group with GROUPURI=1, GROUPNAME=SYSUSERID and a desktop description.

A failed HTTP request raises a failure and leaves an empty output dataset, except that a missing user returns no groups. Empty group arrays produce an empty dataset with the model. Descriptions longer than 256 bytes are truncated to fit GROUPDESC.

Example:

%ms_getgroups(outds=work.groups)
%ms_getgroups(user=James,outds=work.groups)
%ms_getgroups(uid=1,outds=work.groups)
Parameters
[in]mdebug=(0) Set to 1 to enable HTTP debug messages
[in]user=(0) Username used to filter groups
[in]uid=(0) User uid used to filter groups
[out]outds=(work.ms_getgroups) Dataset with exactly GROUPURI, GROUPNAME and GROUPDESC, all character length 256.

SAS Macros

Related Files

Definition in file ms_getgroups.sas.