Re: DB Definition Reference
Posted in 1996
Mark R. Ainis wrote: > > We have an application that consists of Informix 4gl programs on our HP machine. > In all of the source codes, we have record declarations that reference > current database table definitions using the LIKE key word. A sample of > the source codes is attached below. The problem arises during compiling. > The compiler must know the database name explicitly specified in the fi > rst line of the codes in order to define the record definitions. Is there a > known way of eliminating the hard-coded database name in the source such as > passing the name to compiler during compilation? > 1st, you must have some database with the appropriate schema (minimally, the tables and columns used as part of the LIKE syntax). At compile time, the compiler gets the values of the LIKE variables from system tables. So you could have an empty database named appropriately just for compiling purposes. Or, you could have your Makefile do it for you by calling a shell that does sed on any .4gl file, looking for the pattern "database xxxxx" and changing it to "database yyyyy". Let me know if you need a more explicite example. > > p.s. We called Informix's Tech. Support; however, the only answer we got from them is: > To get rid of the problem, DON'T use it! We are quite disappointed with > Informix's Tech Support. It looks like they are no better than us. > Maybe that's because you're pretty good, yourself. A quote from me circa 1988, which still holds true (IMHO): "Informix Tech Support is the best in the business, and it's no damn good" //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 5299 DTC Blvd Suite 740 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-843-6408 and do not necessarily //////////////// http://www.informix.com reflect those of my employer