|
Hi Michael, > all is good. However, when I put the same value in a variable (FileName) > and use it like this: > > D FileName S 1024 Varying > fd = open(FileName : flags); > > I receive an fd of -1 and the message "open() for input: No such path or > directory." I've tried a bunch of different combinations and can't make > it work. Please make sure that you've trimmed any spaces off of the end of the filename. Spaces ARE legal in IFS filenames, so "/path/to/Myfile.txt" is a different file than "/path/to/Myfile.txt " Since you're using a VARYING variable, you probably only need to ensure that when the filename is assigned to this variable, you trim any trailing blanks from it. If you were using a fixed-length variable, you'd have to do the %trimr() directly on the open() statement... Hope that helps...
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.