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



Scott;

I had missed the Qp0lSetAttr API while browsing the unix api list. I didn't
want to use the CHGATR and QCapCmd API but because of time constraints that
is what I did. I will put Qp0lSetAttr in my notes for that function and
upgrade it to the API later.

Thanks 
Duane Christen

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Scott Klement
Sent: Tuesday, July 11, 2006 3:34 PM
To: Midrange Systems Technical Discussion
Subject: Re: IFS file with read only attribute fails to unlink()


Hi Duane,

I have an IFS file that has the read-only attribute set.
[SNIP]
I have attemted to use the chMod() function to change the read only 
attribute but it seems to only effect the authorities to the object/data 
and not the read only attribute.

Correct, chmod() is intended to be compatible with the Unix API for 
changing a file's mode. Since a file's mode isn't the same as it's 
attributes, chmod() won't help you.

The "read-only attribute" was designed to work like MS-DOS, and not like 
Unix.

Does anyone know the correct unix function to change the read only 
attribute of the correct mode(s) to use with chMod()?

Qp0lSetAttr() is the correct API to change the attribute.  It's not really 
a unix API, as it only exists on the iSeries (though it's still listed 
with the Unix APIs in the information center).

I find Qp0lSetAttr() to be rather awkward and difficult to code. There's 
also a CHGATR CL command that does the same thing, and you can call it via 
QCMDEXC -- much easier to code.


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.