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



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

Follow-Ups:
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.