Re: HELP on open text file in read/write mode
Posted in 1997
>From: Letchu.MAL_at_PG1E02@ca.slr.com >Date: Fri, 30 May 97 18:36:37 PST >X-Informix-List-Id: <list.14715> > > Can we read from a text file using r4gl(INFORMIX SE 4.0 on AIX 4) without > loading the data to a table i.e say to read the first 10 character of the > text file and start another process beased on the value. There is no standard way to read files in I4GL or R4GL. However, it is not hard to produce I4GL-callable C code which can be used from an I4GL program (or embedded in the p-code runner for use with R4GL). I have a collection of two or three different sets of such routines posted by different people at different times, mostly in the distant past. If these are not available via sites such as IIUG (http://www.iiug.org) or DejaNews (http://www.dejanews.com), then send me an email and I'll dig them out, dust 'em off and post them. Don't forget that on most recent versions of Unix, if the file starts with the correct magic incantation, the kernel will run the correct program for you when you ask it to run a given file. That assumes that all the extra data that is needed is in the file. #!/bin/someprog Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>