|
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 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.