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



Hello Mark,

He's a short sample that works:

     **
     **  Compile options:
     **
     **    CrtRpgMod Module( CBX119T )
     **              DbgView( *LIST )
     **
     **    CrtPgm    Pgm( CBX119T )
     **              Module( CBX119T )
     **              ActGrp( QILE )
     **
     **
     **-- 
Specifications -----------------------------------------------------**
     H Option( *SrcStmt )
     **-- Api error
tructure:  ----------------------------------------------**
     D ApiError        Ds
     D  AeBytPro                     10i 0 Inz( %Size( ApiError ))
     D  AeBytAvl                     10i 0
     D  AeExcpId                      7a
     D                                1a
     D  AaExcpDta                   256a
     **-- Global
ariables:  -------------------------------------------------**
     D Idx             s             10i 0
     **-- User authorization
arameters:  ------------------------------------**
     D RuRcvVar        s          32767a
     D RuObjNam        s           4096a   Varying
     **
     D RuFdbInf        Ds
     D  FiBytRtnFb                   10i 0
     D  FiBytAvlFb                   10i 0
     D  FiBytRtnRv                   10i 0
     D  FiBytAvlRv                   10i 0
     D  FiNbrAutUsr                  10i 0
     D  FiUsrEntLen                  10i 0
     D  FiObjOwn                     10a
     D  FiObjPgp                     10a
     D  FiAutL                       10a
     D  FiSnsLvl                      1a
     **
     D RuInfEnt        Ds                  Based( pInfEnt )
     D  ReUsrPrf                     10a
     D  ReUsrTyp                      1a
     D  ReDtaAut                     10a
     D  ReAutlMgm                     1a
     D  ReObjMgm                      1a
     D  ReObjXst                      1a
     D  ReObjAlt                      1a
     D  ReObjRef                      1a
     D                               10a
     D  ReObjOpr                      1a
     D  ReDtaRead                     1a
     D  ReDtaAdd                      1a
     D  ReDtaUpd                      1a
     D  ReDtaDlt                      1a
     D  ReDtaExe                      1a
     D                               10a
     **-- Retrieve users authorized to an
bject:  ---------------------------**
     D RtvUsrObjAut    Pr                  ExtPgm( 'QSYRTVUA' )
     D  RuRcvVar                  32767a          Options( *VarSize )
     D  RuRcvVarLen                  10i 0 Const
     D  RuFdbInf                    256a          Options( *VarSize )
     D  RuFdbInfLen                  10i 0 Const
     D  RuFmtNam                      8a   Const
     D  RuObjPth                   4096a   Const  Options( *VarSize )
     D  RuObjPthLen                  10i 0 Const
     D  RuError                   32767a          Options( *VarSize )
     **
     C                   Eval      RuObjNam    =
'/qopensys/QUSER/BL2005.prn'
     **
     C                   CallP     RtvUsrObjAut( RuRcvVar
     C                                         : %Size( RuRcvVar )
     C                                         : RuFdbInf
     C                                         : %Size( RuFdbInf )
     C                                         : 'RTUA0100'
     C                                         : RuObjNam
     C                                         : %Len( RuObjNam )
     C                                         : ApiError
     C                                         )
     **
     C                   If        AeBytAvl    = *Zero
     **
     C                   Eval      pInfEnt     = %Addr( RuRcvVar )
     **
     C                   For       Idx = 1  To FiNbrAutUsr
     **
     **-- Do whatever...
     **
     C                   If        Idx         < FiNbrAutUsr
     C                   Eval      pInfEnt     = pInfEnt + FiUsrEntLen
     C                   EndIf
     **
     C                   EndFor
     C                   EndIf
     **
     C                   Return
     **

- A potentail problem often comes from not specifying the exact length of
the object path and thus having the API include trailing blanks as part of
the object name - leading to a nonexisting object name.

Best regards,
Carsten Flensburg

----- Original Message ----- 
From: <MWalter@xxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Tuesday, March 08, 2005 7:38 PM
Subject: QSYRTVUA


> Does anyone have an example of using this API. I'm prototyping it like
> this:
>
>      DretrieveAuthorizedUsers...
>      D                 PR                  extpgm('QSYRTVUA')
>      D returnArray                  520
>      D rtnArrayLen                   10i 0 const
>      D feedbackArea                  55
>      D feedbackLen                   10i 0 const
>      D format                         8    const
>      D objName                      100
>      D objNameLen                    10i 0 const
>      D usec                         516
>
> I've used every iteration of the object name parameter that I can think
of.
> Always getting CPFA0A9, object not found. The object name is passed in the
> query string cgi variable. Looks fine in debug.
>
> Thanks,
>
> Mark



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.