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