Re: DB Definition Reference
Posted in 1996
Hi Mark, You can avoid using the hard coded database name by replacing it by ENVIRONMENT variable DBNAME. You may have to change little bit of code to accept the database name from DBNAME. If I get time I will try to give you an example. Regards, Srinivas Reddy On Wed, 14 Aug 1996, Mark R. Ainis wrote: } } ----------- Posted news begins ---------------- } Dear netters, } } 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? } } Thanks in advance. } } } 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. } } Sample codes begin: } } database dbsrss01 } ############################################################ } # global variable declaration area } ############################################################ } globals } define g_request_id integer, } g_template_id integer, } g_max_group_no smallint, } g_sql_select_text char(512), } g_location_code char(08), } g_range_view_name like vwscttp00.range_view_name, } g_ret_tabname like vwscttp00.range_view_name, } g_eop_view_name like vwscttp00.eop_view_name, } g_top_view_name like vwscttp00.top_view_name, } } ----------- Posted news ends ---------------- } }