Re: Report - saving into file
Posted in 1991
Greg Bryan <gbryan@ssf-sys.dhl.com> writes: > > [ ... multiple users cannot write to file "inv.out" ... ] > > > >Thanks. Ruchi. > > Ruchi - > > Write a C function to call chmod() and fix the permissions > on the file. Link the C function into your 4GL program, and > call it after your 4GL report program creates the file. Ah-ha ! chmod(2) ? How 'bout --chmod; :-) RUN "chmod 666 inv.out" after you've written the report. The file gets creat(2)'ed with 660 mode. The problem then arises that, if more than 1 guy can use the application at once, they can stamp on each other's files. Is it possible to write the file to the user's home directory ? Then there's no problem with write permissions, either. Does it matter that they can read each others' reports ? If so, change the 666. Hope this helps. Cheers - Tony. PS. Jim - did you get any mail ? _______________________________________________________________________________ Tony Heskett th@bnr.co.uk |Voice: (+44) 279 429531 x 2637 BNR, London Road, Harlow, Essex, CM17 9NA |Fax: (+44) 279 454187