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



Ted,

I don't know where this thread started, but it sounds like you are
trying to use adopted authority against an IFS file or directory. That
will not work. There are a few ways you can do this. The first is to
swap the profile of the current job. When you swap profiles there is a
safe way and there is the easy way. There are also a several APIs, some
that work in multi-threaded jobs after V4R5 and some that have been
around much longer but are not safe in all environments.

The easy way is to get a handle to the profile and swap, do what you
want to do and then swap back. This is somewhat risky because the person
running the program might intercede while the profile is swapped and do
something dastardly. The hard way is to register exits and then change
the profile, swap, do what you need to do, and then swap back.

The APIs you would look at are QSYGETPH, QSYRLSPH, QSYSETP, or in a
multi-threaded environment QSYSETREGID, QSYSETREGID etc. You will find
those listed in the IFS API manual, not sure why though. I could post
some examples of these if you plan on going this route.

David Morris

>>> TBARRY@centralsan.dst.ca.us 01/18/02 15:17 PM >>>
Not monitoring for any errors, but that's probably it.  So, even though
QSECOFR is giving cart-blanche, they aren't authorized to QMSF and
thereby can't change the ownership?  So does that mean I have to give
*PUBLIC certain rights to QMSF?

>>> sublime78ska@yahoo.com 01/18/02 02:14PM >>>
It *can* work.  What error are you getting?  Probably no authority to
the
user profile.

Phil

> -----Original Message-----
> From: rpg400-l-admin@midrange.com
[mailto:rpg400-l-admin@midrange.com]On
> Behalf Of Ted Barry
> Sent: Friday, January 18, 2002 4:58 PM
> To: midrange-l@midrange.com; rpg400-l@midrange.com
> Subject: CHGOWN Problem
>
>
> I've got a program that checks the existence of a subdirectory
> based on the user id.  If it doesn't exist, the program creates
> the directory (CRTDIR) and then does a CHGOWN to ensure QMSF is
> the owner...only...IT DOESN'T WORK.
>
> I compiled it as QSECOFR *OWNER so that users would be able to do
> this.  Does anyone know of a way to get it to work?
>
> Ted J. Barry
> Programmer/Analyst
> Central Contra Costa Sanitary District
> 5019 Imhoff Place
> Martinez, CA 94553-4392
> (925) 229-7389
> (925) 676-7211 fax
> tbarry@centralsan.dst.ca.us
> http://www.centralsan.org
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.