Re: compiling esql/c code with c4gl?
Posted in 1999
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL
Art S. Kagel wrote: > Walter Haslbeck wrote: > > I want to install php3 with informix support on a SCO OpenServer > > machine. Unfortunately on this machine is no escl/c compiler, > > only a 4gl compiler. (And there is no budget for a esql/c compiler) > > > > As far as I know, the 4gl compiler creates first a .ec file from > > the 4gl file, then a .c file and finally a object file. > > > > So I think it must be possible to use c4gl to compile esql sources. > > The definitive answer is: it depends! I4gl versions 7.20 and later > use the same ESQL parser as ESQL/C does and so the answer is YES. > Versions before that (ie 6.xx, 4.xx) had an independent ESQL/C parser > that was not only different but supported an irregular subset of the > language so except for the most trivial ESQL programs the answer was > usually NO. Not strictly true. Prior to version 4.12/6.00, the ESQL/C compiler with I4GL actually understood a superset of the corresponding ESQL/C language -- it also understood the I4GL extensions now handled by the Phase 2 compiler which converts a .4ec file into a .ec file. So you could compile any .ec file which the real ESQL/C compiler would handle with the I4GL version, and you'd get the same result. After 4.12/6.00, the I4GL Phase 2 compiler converted only the I4GL extensions into C code and left the pure ESQL/C code to be converted by the real ESQL/C compiler -- which was the 4.12 compiler in the 4.x code stream and 6.00 in the 6.0x code stream, and the 7.24 compiler in the 7.2x code stream. So, again, you have always been able to compile ESQL/C programs with the I4GL compiler providing that the ESQL/C would be accepted by the corresponding ESQL/C compiler. What would not work is compiling 5.0x ESQL/C with the 4.x I4GL compiler, or compiling 7.x ESQL/C with the 6.x I4GL compiler (where I mean that the ESQL/C code used features only found in 5.0x ESQL/C which would not, therefore, be acceptable to the 4.12 ESQL/C compiler, or the ESQL/C code used features found only in 7.x ESQL/C which would not, therefore, be acceptable to the 6.00 ESQL/C compiler). -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Jonathan Leffler wrote: > > Art S. Kagel wrote: > > Walter Haslbeck wrote: > > > I want to install php3 with informix support on a SCO OpenServer > > > machine. Unfortunately on this machine is no escl/c compiler, > > > only a 4gl compiler. (And there is no budget for a esql/c compiler) > > > > > > As far as I know, the 4gl compiler creates first a .ec file from > > > the 4gl file, then a .c file and finally a object file. > > > > > > So I think it must be possible to use c4gl to compile esql sources. > > > > The definitive answer is: it depends! I4gl versions 7.20 and later > > use the same ESQL parser as ESQL/C does and so the answer is YES. > > Versions before that (ie 6.xx, 4.xx) had an independent ESQL/C parser > > that was not only different but supported an irregular subset of the > > language so except for the most trivial ESQL programs the answer was > > usually NO. > > Not strictly true. Prior to version 4.12/6.00, the ESQL/C compiler > with I4GL actually understood a superset of the corresponding ESQL/C > language -- it also understood the I4GL extensions now handled by > the Phase 2 compiler which converts a .4ec file into a .ec file. So > you could compile any .ec file which the real ESQL/C compiler would > handle with the I4GL version, and you'd get the same result. > > After 4.12/6.00, the I4GL Phase 2 compiler converted only the I4GL > extensions into C code and left the pure ESQL/C code to be converted > by the real ESQL/C compiler -- which was the 4.12 compiler in the > 4.x code stream and 6.00 in the 6.0x code stream, and the 7.24 compiler > in the 7.2x code stream. So, again, you have always been able to > compile ESQL/C programs with the I4GL compiler providing that the > ESQL/C would be accepted by the corresponding ESQL/C compiler. > > What would not work is compiling 5.0x ESQL/C with the 4.x I4GL compiler, > or compiling 7.x ESQL/C with the 6.x I4GL compiler (where I mean that > the ESQL/C code used features only found in 5.0x ESQL/C which would > not, therefore, be acceptable to the 4.12 ESQL/C compiler, or the > ESQL/C code used features found only in 7.x ESQL/C which would not, > therefore, be acceptable to the 6.00 ESQL/C compiler). Thanks for clearing that up and it explains all of the problems I have had over the years compiling ESQL/C w/ I4GL. Art S. Kagel Private to Jonathan: I really did enjoy this. Weird huh?