SE & OL integrated.
Posted in 1992
SE & OL as one integrated environment ! --------------------------------------- Due to historical reasons we have to have databases under as well Informix On-Line (OL) as Standard Engine (SE) in our environment. This is not a problem as long as you run separate applications for each engine type. But we would like to integrate our environment into the extent where is becomes possible to access SE & OL from within the same application. It has to be noted that it is not possible for us simply to migrate all our SE to OL. In order to solve this problem we have created a workaround utilizing named pipes so we now can write 4-GL code like the following example : // DEFINE VARIABLES AND START OL DATABASE loen # DO QUERY ON OL TABLE LET q_txt = "SELECT * FROM funk_opl WHERE ",sel_txt CLIPPED PREPARE q_1 FROM q_txt DECLARE q_crs SCROLL CURSOR FOR q_1 OPEN q_crs FOREACH q_crs INTO loenrec.* DISPLAY loenrec.* TO loendata.* # CONSTRUCT SE QUERY LET sq_txt = "SELECT login,uge,aar FROM uger WHERE login = '", loenrec.brugerid CLIPPED,"'" # EXECUTE SE QUERY AND TEST IF IT HAS RESULTED IN ANY DATA IF do_standard(sq_txt) <> 0 THEN FOR i = 1 TO 5 CALL fetch_timesag() RETURNING retval, timesagrec.* IF retval <> 0 THEN EXIT FOR ELSE DISPLAY timesagrec.* TO timesagdata[i].* END IF END FOR ELSE MESSAGE "There are no records for this person" END IF END FOREACH // REST OF CODE The model chart describing this looks as follows : SE OL == == E-SQL 4-GL | read select <-------------- pipe_1 <------| | |------------'C'-routine ^ do fetch ---------| | |-----> pipe_2 -------| | |-----------------| All this works surprising well, but we would very much like to incorperate it at a much lower level. When running any program accessing a database eg. isql or a 4-GL program, a SQL server process is started - which type of engine (SE or OL) is based on the SQLEXEC variable in the environment, thus enabling programs to access both types just be changing this variable. This model does not bring any solution to our problem. Instead it could be incorperated in the code in the DATABASE (4-GL) or $database (ESQL/C) statement. Today the syntax allows you to specify 2 things only machine/databasename what we can think of as a solution would be to alter this statement to allow the following syntax : engine/machine/databasename The only implication as far as we can see would be that it would be necessary to start 2 SQL server processes instead of the one which starts today. If this was implemented at the suggested level it would make it much easier and far more flexible than the workaround that we have today. Therefore we would like suggestions,comments,solutions to both our workaround as the possibility to actually get the level of integration that we would like. ---------------------------------------------------------------------- Databaseadministrator Poul Pedersen Kuwait Petroleum (Denmark) A/S Hummeltoftevej 49 Mail: pp@q8.dk 2830 Virum Voice: +45 45 98 45 94 Denmark Fax: +45 42 85 14 18 ----------------------------------------------------------------------