Re: How to put validation/code in perform file using isql ?
Posted in 1998
On Thu, 3 Sep 1998 n_kolekar@hotmail.com wrote: > Hey Folks, Is there a way to put code in instruction section of the > perform file generated by isql? We are doing input using the perform > screen using ISQL. So we want to validate the data in minimal before it > goes into the database. Example: My valid date range is from 80 to 99. > So if the user enters any other dates, I want him to re-enter the date. > And I want this to be done using ISQL only (not 4gl). You can create a custom version of Perform with the cperf script, and you can add validation functions which can be called in the instructions section of the form. That is the only really plausible way of doing it. Beware that you will need to use the correct version of ESQL/C to compile any ESQL/C code, whether it accesses the database or not. This often means that you compiled I4GL on the machine to get the relevant version of ESQL/C as the 4.12-ish ESQL/C used in ISQL 4.x is not generally available except as bundled with I4GL. Specifically, it is not safe to use 5.x ESQL/C to compile code to be bundled into a 4.x version of Perform, nor is it safe to use a 7.x ESQL/C to compile code to be bundled into a 6.x version of Perform. If you have 7.2 ISQL, you can probably use a 7.2x ESQL/C compiler. If you only need C code linked into your runner and not ESQL/C code, then you don't have any real problems. There is documentation in the manuals (or supplements) about how to create custom runners, and more particularly about the interface to the functions. It is not very complex, but it is not a simple as simply writing a C function. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn