Re: User-defined sorting in Ace
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
[cutting] >I had hesitated to mention the 'on the fly' option because you might just >end up with 24 ACE programs anyway and would be stuck compiling every time >when the program might already be there. Of course you might just find >that the client really only ever uses 6 of the possible sort orders so I >posted that one anyway. Hmm what if you determined if the compiled >program is already there and use it or generate/compile it if not! Then >you would build just those that the user uses and reuse them. Ooo I'm >just so clever! ;-) We are currently doing the 'on the fly' option. The generic master report is held in SCCS and extracted at run time, tweaked according to the user using sed, compiled, ran and then deleted. Not ideal but it's robust and works >> Of course, if the user had 4gl..... > >Yup. Life would be simpler with 4gl >Art S. Kagel Paul Watson WF Software Ltd Tel: +44 1436 674729 Fax: +44 1436 678729 www.wfsoftware.com/informix # If you broke it, hide the evidence
Paul watson wrote: > [cutting] > >I had hesitated to mention the 'on the fly' option because you might just > >end up with 24 ACE programs anyway and would be stuck compiling every time > >when the program might already be there. Of course you might just find > >that the client really only ever uses 6 of the possible sort orders so I > >posted that one anyway. Hmm what if you determined if the compiled > >program is already there and use it or generate/compile it if not! Then > >you would build just those that the user uses and reuse them. Ooo I'm > >just so clever! ;-) > > We are currently doing the 'on the fly' option. The generic master report is > held in SCCS and extracted at run time, tweaked according to the user > using sed, compiled, ran and then deleted. Not ideal but it's robust and works > > >> Of course, if the user had 4gl..... > > > >Yup. > > Life would be simpler with 4gl Why? You could certainly dynamically build up a SELECT statement and (in particular) the ORDER BY clause. In the report itself, you could specify that the data is presented to the report in sorted order with the ORDER EXTERNAL BY clause. Nonetheless, the report is written with the before and after group of blocks triggering in a particular sequence, and if the data is presented in a different sequence, then the report will have lots of different groups from the ones you'd like. Of course, if you have no grouping, then there is no problem, but many reports do have grouping and this means that a single report cannot be used with multiple sort orders. So you are no better off with I4GL than with ISQL/ACE in general. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>