4gl check a file on the system
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
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
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!"
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
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