MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2014

Re: create xml for external system needs all permissions



fixed

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)






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact