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



S_IRWXO + S_IRWXU + S_IRWXG

On 1/17/2014 9:56 PM, J Franz wrote:
Am creating xml file in IFS with rpgle
(originally from Scott's samples, but maybe altered
since then. Have been asked to make permissions
equal to unix CHMOD 777
(they have some automated process that expects the
file permissions already set, and needs (in their words)
all access..
Since I failed binary class, how can I set this file
to have all access.
Jim
C* Create a new file, and assign it a code page of 819:
c eval fd = open(%trim(filename):
c O_CREAT+O_WRONLY+O_CODEPAGE:
c S_IWUSR+S_IRUSR+S_IRGRP+S_IROTH:
c 819)
c if fd < 0
c callp die('open(): ' + %str(strerror(errno)))
c eval @errflag='Y'
c endif
c callp close(fd)
C* Now re-open the file in text mode. Since it was assigned a
C* code page of 819, and we're opening it in text mode, OS/400
C* will automatically translate to/from ASCII for us.
c eval fd = open(%trim(filename):
c O_WRONLY+O_TEXTDATA)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.