× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Steve:

I think the quick and easy way to get a list of supplemental groups is to CALL a small CL program (or CLLE module), e.g.:

PGM PARM(&GRPPRF &SUPGRPPRF)
DCL &GRPPRF *CHAR 10 /* primary group profile */
DCL &SUPGRPPRF *CHAR 150 /* supplemental group profiles */

RTVUSRPRF USRPRF(*CURRENT) GRPPRF(&GRPPRF) SUPGRPPRF(&SUPGRPPRF)

RETURN
ENDPGM

HTH,

Mark S. Waterbury

> On 6/22/2015 1:47 PM, Needles,Stephen J wrote:
IBMi 7.2

I need a list of supplemental group IDs associated with the active user profile within a job.

I researched and found API qsygetgroups() that seems to promise the results I'm after. The deal is that the expected list of Supplemental Groups is not coming to bear.

Has anyone used this (or another) method to retrieve the supplemental group profiles associated with a user profile?

The needed snippets of code I'm using is below:

D REPLY S 10I 0
D grouplist S 10U 0 DIM(1000)

D qsygetgroups PR 10I 0 extproc('qsygetgroups')
D gidsize 10I 0 value
D grouplist 10U 0 dim(32767)
D options(*varsize)

eval ListSize = %elem(grouplist);

Eval reply = qsygetgroups(ListSize
:grouplist);

Eval reply = qsygetgroups(0
:grouplist);

eval ListSize = 20;

Eval reply = qsygetgroups(ListSize
:grouplist);

Results:

First example:
Reply = 1,
ListSize = 1000,
GroupList =
GROUPLIST(1) = 222
GROUPLIST(2) = 0
GROUPLIST(3) = 0
GROUPLIST(4) = 0
GROUPLIST(5) = 0
GROUPLIST(6) = 0
GROUPLIST(7) = 0
GROUPLIST(8) = 0
GROUPLIST(9) = 0
GROUPLIST(10) = 0
GROUPLIST(11) = 0
GROUPLIST(12) = 0
GROUPLIST(13) = 0

Second example:
Reply = 1,
ListSize = N/A,
GroupList =
GROUPLIST(1) = 222
GROUPLIST(2) = 0
GROUPLIST(3) = 0
GROUPLIST(4) = 0
GROUPLIST(5) = 0
GROUPLIST(6) = 0
GROUPLIST(7) = 0
GROUPLIST(8) = 0
GROUPLIST(9) = 0
GROUPLIST(10) = 0
GROUPLIST(11) = 0
GROUPLIST(12) = 0
GROUPLIST(13) = 0

Third example:
Reply = 1,
ListSize = 20,
GroupList =
GROUPLIST(1) = 222
GROUPLIST(2) = 0
GROUPLIST(3) = 0
GROUPLIST(4) = 0
GROUPLIST(5) = 0
GROUPLIST(6) = 0
GROUPLIST(7) = 0
GROUPLIST(8) = 0
GROUPLIST(9) = 0
GROUPLIST(10) = 0
GROUPLIST(11) = 0
GROUPLIST(12) = 0
GROUPLIST(13) = 0

Same result each time.

Steve Needles




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.