Never mind. Went a different way using the QSYRUSRI api.
Steve Needles
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Needles,Stephen J
Sent: Monday, June 22, 2015 12:47 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: qsygetgroups() anyone use this API to retreive a list of Supplemental Group Profiles?
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
________________________________
This communication, including attachments, is confidential, may be subject to legal privileges, and is intended for the sole use of the addressee. Any use, duplication, disclosure or dissemination of this communication, other than by the addressee, is prohibited. If you have received this communication in error, please notify the sender immediately and delete or destroy this communication and all copies.
TRVDiscDefault::1201
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.