Re: Permissions of IFS file created with QZRUCLSP

Dennis <iseries-HF96MFG82JhWk0Htik3J/[email protected]> Thu, 17 Mar 2011 09:21:27 -0400
Newsgroups gmane.comp.lang.as400.mi
Message-ID <[email protected]>
Wow, thanks, Chuck.  You did this in CL?  What, to prove you could?  :)

I really appreciate the follow-up.  Strange that that one parameter would be (apparently) mishandled while the others are intact.  It makes me wish, once again, that I could see code generated by the ILE RPG compiler, which does handle this properly.  Of course, it probably (?) doesn't go through this API to get there, so there is that.

I can live with inherited rights in this case - thanks for that tip!  Life goes on, and I will march forward with that flag.  But this one's going in my back pocket for occasional review 'cuz it bothers me.  :)

Thanks again.

"CRPence" <CRPbottle-/[email protected]> wrote:

>On 3/16/11 12:58 PM, Dennis wrote:
>> Folks, I have posted MI code at
>> http://code.midrange.com/9176a9360c.html that:
>>    - Deletes file mi-ifs-file.txt from the current directory
>>    - Creates a new file by same name in the current directory
>>    - Writes a line if all successful
>>    - Closes that file
>>
>> It creates the file just fine, except that there are no permissions
>> (flags ----------).  I am absolutely convinced that this is my error
>> (I used the same concept in RPG and it worked great), but my eyes
>> don't see where I might have gone wrong.  Would some kind soul mind
>> steering me in the right direction?
>>
>> <<SNIP>>
>
>   I created an equivalent CALL to the Call Service Program Procedure 
>(QZRUCLSP) API from a CLP to invoke the open procedure in QP0LLIB1 and
>I 
>got what I infer are the same [at least similar] results creating a
>file 
>in my directory under /home; i.e. *NONE data authority was the effect. 
>When I changed the oflag mask to include O_INHERITMODE I got the same 
>authorities to both *PUBLIC and to my user\owner as those which were
>set 
>for my directory under /home.  However attempts at changing the 
>permissions mask for the mode parameter in that same CLP saw no change 
>for any of the owner, group, or public data authorities even when 
>passing 0d511. :-(
>
>Regards, Chuck
>_______________________________________________
>This is the MI Programming on the AS400 / iSeries (MI400) mailing list
>To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/mi400
>or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/mi400.

--  
Sent from my Galaxy tablet phone with with K-9 Mail. Please excuse my brevity.
_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.