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



just in case you are interested here is my error code DS
dErrorDS ds Qualified
d BytesProvided 10i 0 Inz(%Size(ErrorDS))
d BytesAvailable 10i 0
d MsgID 7a
d 1a
d Text 500a Varying

so your call would look like this:

QSyCUsrA(AuthYN:'USERID':'LIBRARY/FILENAME':'*FILE':
Authority:AuthNbr:CallLevel:ErrorDS);
Thanks,
Tommy Holden



jstevens@xxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/07/2007 04:15 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Help with QSYCUSRA API - Check User Authority






OH - right.

Thanks!


Jeff Stevens
Mize, Houser & Co. P.A.
913 451 1882
JStevens@xxxxxxxxxxxxxx





Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/07/2007 04:13 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Help with QSYCUSRA API - Check User Authority






you still have a problem. error code is NOT a pointer...it's variable
character data.


d errorcode 500a options(*varsize)

the field definition would be a character field as well...

Thanks,
Tommy Holden



jstevens@xxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/07/2007 04:01 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Help with QSYCUSRA API - Check User Authority






Okay - Thanks for your help!

Here's the new code (for the archives), and it's working now...



// Interface for the API...
D QSyCUsrA PR ExtPgm('QSYCUSRA')
D 1A CONST Authority Indicator
D 10A CONST Profile Name
D 20A CONST Qualified Object Nam
e
D 10A CONST Object Type
D 110A CONST Authority
D 10i 0 Number of Authorites
D 10i 0 Call Level
D * Error Code

D AuthYN S 1A
D ObjType S 10A
D Authority S 110A
D AuthNbr S 10i 0 INZ(1)
D CallLevel S 10i 0
D ErrorCode S *

D Response S 1A

/Free

//AUTHYN = 'N';
ObjType = '*FILE ';
Authority = '*CHANGE ';

QSyCUsrA(AuthYN:'USERID ':'FILENAME LIBRARY ':ObjType:
Authority:AuthNbr:CallLevel:ErrorCode);

DSPLY AUTHYN ;

*INLR = *On;


/End-Free

I also had to take the Varying off of the Authority parameter.

Thanks for your all of your help.

Jeff Stevens
Mize, Houser & Co. P.A.
913 451 1882
JStevens@xxxxxxxxxxxxxx





Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/07/2007 03:55 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Help with QSYCUSRA API - Check User Authority






your prototype is severely off. char(*) in the IBM documentation means
it's a variable character data not a pointer (which is what you have the
parms defined as)


my prototype would be more like this:
D QSyCUsrA PR ExtPgm('QSYCUSRA')
d authindicator 1a
d userprofile 10a const
d qualobject 20a const
d objecttype 10a const
d authority 110a options(*varsize)
d authcount 10i 0 const
d calllevel 10i 0 const
d errorcode 500a options(*varsize)

Thanks,
Tommy Holden



"Francis Lapeyre" <flapeyre@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/07/2007 03:47 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Help with QSYCUSRA API - Check User Authority






Also, I see what could be a problem is the 4B 0 definitions. Change them
to
*10I 0* (integer).



On 8/7/07, jstevens@xxxxxxxxxxxxxx <jstevens@xxxxxxxxxxxxxx> wrote:

I am pretty new to API's. I am trying to call the QSYCUSRA API. My
code
is like this...


// Interface for the API...
D QSyCUsrA PR ExtPgm('QSYCUSRA')
D 1A Authority Indicator
D 10A CONST Profile Name
D 20A CONST Qualified Object
Nam
e
D 10A CONST Object Type
D * Authority
D 4B 0 Number of Authorites
D 4B 0 Call Level
D * Error Code

D AuthYN S 1A
D Authority S *
D AuthNbr S 4B 0 INZ(1)
D CallLevel S 4B 0
D ErrorCode S *

D Response S 1A

/Free

AUTHYN = 'N';

QSyCUsrA(AuthYN:'USERID':'LIBRARY/FILENAME':'*FILE':
Authority:AuthNbr:CallLevel:ErrorCode);

DSPLY AUTHYN ;

*INLR = *On;

/End-Free

But when I run it, I get the message CPF22F7 Number of authorities must
be
between 1 and 11. A value of 120064 was specified.

I'm using the info at


http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/QSYCUSRA.htm





to get the required parameter goup.

I assume that I'm doing something wrong with my AuthNbr definition, but
I'm not sure.

Any suggestions?

Thanks!


Jeff Stevens
Mize, Houser & Co. P.A.
913 451 1882
JStevens@xxxxxxxxxxxxxx

--
This is the RPG programming on the AS400 / 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.

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.