|
Jeff,
Here is a quick and dirty demonstration of accessing the variable length
array of supplemental group profiles. A rough example of this (using the
initial library list of a *JOBD) can also be found in Appendix B of the
System API Programming (not Reference) manual.
As for COMMON, I don't fly and so the only recent COMMON I've made was
Chicago. This COMMON struck me as just a bit too much driving given my
other vacation plans... Wish I was able to attend more though.
Bruce
D* Allocate working variables
DRcvlen s 10i 0 inz(%size(QSYI0200))
DFormat s 8 inz('USRI0200')
DSuppPrfX s 10i 0
DGrpPrf s 10
D*
D* Include Error code parameter for API calls
D/COPY QSYSINC/QRPGLESRC,QUSEC
D*
D* Copy USRI0200 from QSYSINC/QRPGLESRC(QSYRUSRI) and define as 1000
D* bytes (to allocate storage for variable length entries)
D*
DQSYI0200 DS 1000
D* Qsy USRI0200
D QSYBRTN01 1 4B 0
D* Bytes Returned
D QSYBAVL01 5 8B 0
D* Bytes Available
D QSYUP02 9 18
D* User Profile
D QSYUC 19 28
D* User Class
D QSYAOBJ00 29 29
D* All Object
D QSYSA03 30 30
D* Security Admin
D QSYJC00 31 31
D* Job Control
D QSYSC00 32 32
D* Spool Control
D QSYSS01 33 33
D* Save System
D QSYRVICE00 34 34
D* Service
D QSYAUDIT00 35 35
D* Audit
D QSYISC00 36 36
D* Io Sys Cfg
D QSYERVED09 37 43
D* Reserved
D QSYGP01 44 53
D* Group Profile
D QSYOWNER00 54 63
D* Owner
D QSYGA 64 73
D* Group Auth
D QSYLC 74 83
D* Limit Capabilities
D QSYGAT 84 93
D* Group Auth Type
D QSYRSV102 94 96
D* Reserved 1
D QSYSGO 97 100B 0
D* Supp Group Offset
D QSYSGNBR01 101 104B 0
D* Supp Group Number
D*QSYSGN01 105 105
D*
D* Varying length
C* Get to work
C*
C* Get USRPRF name as a parameter
C *entry plist
C parm usrprf 10
C* Set error code to not work with exceptions
C eval qusbprv = %size(qusec)
C* Call the QSYRUSRI API
C call 'QSYRUSRI'
C parm QSYI0200
C parm rcvlen
C parm format
C parm usrprf
C parm QUSEC
C* Test for error on API call
C if qusbavl > 0
C 'error1' dsply
C else
C* Extract and display all group profiles
C QSYGP01 dsply
C if QSYSGNBR01 > 0
C eval SuppPrfX = QSYSGO + 1
C do QSYSGNBR01
C eval GrpPrf = %subst(QSYI0200:SuppPrfX:10)
C GrpPrf dsply
C eval SuppPrfX = SuppPrfX + 10
C if (SuppPrfX + 10) > RcvLen
C 'error2' dsply
C leave
C endif
C enddo
C endif
C endif
C eval *inlr = '1'
C return
>
> Bruce,
>
> I had looked at this one also, forgot to mention it i my initial
> note. The issue I had here was how I might do this in RPGLE as the array
> in USRI0200 is array(*) of Char(10), where as the AUTU0200 is a fixed
> array(16) of char(10). Of course what AUTU will do if there are more than
> 16 groups (is there a limit, I can't recall), is a part of why I was not
> sure I would want to do it that way ??
>
> PS: Are you comming to COMMON next week ??
>
> Jeff Silberberg
>
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.