Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Rene Bagia asked how to test from a 4GL program whether a file exists on the DB server. Jonathan Leffler said there is no standard way and suggested a C hook. Art S. Kagel advised a simple C function called from 4GL. Andrej Falout described a pure 4GL trick: open the file as a form with WHENEVER ERROR CONTINUE and check the returned status.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Rene Bagia — — source: Informix-list mailing list archive (1991-1998)
Hallo,
please help my, how can i check the validity from a file on my DB-Server
filesystem direkt from my 4gl program like:
if exists "c:\\temp\\ho.txt"
then
Thanks
best reguards
Rene
↪ replying to Rene Bagia
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
Rene Bagia wrote:
> please help my, how can i check the validity from a file on my DB-Server
> filesystem direkt from my 4gl program like:
>
> if exists "c:\\temp\\ho.txt"
> then
There isn't a standard way to do it. If you're using a 9.x server, you
could write some sort of extension to do the test. This is extra
complicated because of the requirement 'on the server'. You can write a
hook in C code that's callable from I4GL to test for a file on the 4GL
system.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"
↪ replying to Rene Bagia
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Write a "C" function to perform the check and call it from 4GL.
Writing such utility functions is trivial.
Art S. Kagel
Rene Bagia wrote:
>
> Hallo,
>
> please help my, how can i check the validity from a file on my DB-Server
> filesystem direkt from my 4gl program like:
>
> if exists "c:\\temp\\ho.txt"
> then
>
> Thanks
> best reguards
> Rene
↪ replying to Art S. Kagel
Andrej Falout — — source: Informix-list mailing list archive (1991-1998)
In article <39931E22.918ED0AC@bloomberg.net>, kagel@bloomberg.net
says...
> Write a "C" function to perform the check and call it from 4GL.
> Writing such utility functions is trivial.
>
> Art S. Kagel
>
> Rene Bagia wrote:
> >
> > Hallo,
> >
> > please help my, how can i check the validity from a file on my DB-Server
> > filesystem direkt from my 4gl program like:
> >
> > if exists "c:\\temp\\ho.txt"
> > then
One simple way I found in pure 4gl is to pretend this is a form file,
and try open it like a form file. WHENEVER ERROR CONTINUE before that,
then test for status returned to see if it is notfound or some other
error, that would indicate file exists.
It worked in several versions, not sure about current one... Then again,
D4GL have several extension in this field that you can use instead...
--
Yours, Andrej Falout, http://www.falout.com ICQ 7628616 ++64.21.607517
#-----------------------------------------------------------------
globals "std_disclaimer.4gl"
Ask yourself just one question: ' Qu' m's se puede hacer y aprender ?
- Propellerhead ReBirth RB-338 manual
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.