Can I override the table my program looks at?
Posted in 1994
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
We are using a case tool (source code generator) that generates MF COBOL code with embedded SQL that accesses an Informix database. We have run into a problem that we do not know how to solve, especially since we CANNOT modify the COBOL source code without losing our changes the next time we regenerate our code. Here is the scenario: We have a program (PROG1) that accesses several database tables (TABLE1, TABLE2 & TABLE3) and creates a report. This program was generated by the case tool, and works correctly. However, now we want to create a duplicate of TABLE1 (TABLE1A), modify the data in it with another program (PROG2), and run PROG1 against TABLE1A, TABLE2 & TABLE3. We also need to be able to run PROG1 against the original tables. We have spent quite a lot of time in brainstorming sessions, without coming up with a solution. One of the possibilities we came up with was to create a directory structure matching that of the database, with symbolic links to the actual database files, and replace one of the symbolic links with the modified table. This would (possibly) work for Informix SE, but not OnLine. We also thought of checking the program for the tables it references, and creating a new database with just the tables that program needs, and modify the tables in that database. Our application looks at an environment variable for the location of the database, so we can point to another database if we need to. The frustrating thing about all of this is that this can be done fairly easily on some other platforms. In fact, our application was originally written, using this case tool, on an IBM AS/400, and it is done on that platform all the time (we will end up supporting our application on both the AS/400 and the RS/6000). The AS/400 uses a CL command called OVRDBF (Override Database File) to tell the program which file to actually use at application time. After all of the arguments we have had with the rest of the company over the superiority of Unix (AIX in our case), it will be very embarrassing if we have to admit that we cannot do this on the RS/6000. (Not to mention the fact that my job would be in jeopardy if we cannot get our application up and running on the RS/6000.) If anyone out there has successfully tackled this situation before, or even has some thoughts that we might not have thought of ourselves yet, _please_ let us know. We will ultimately have to find a solution that will work with OnLine, and therefore not be tied to the directory structure of SE (and may even have to work for Oracle later on, but that is another issue), but we would also be interested in hearing of any possible solutions at all, even if they are tied to SE. We have been put on a deadline, and we may be able to put in a temporary fix, as long as we come up with something more permanent later. Again, if you have a solution for us, or just want to toss in an idea or two, please let us know. Posts and e-mail are both acceptable. Thanks. P.S. Our environment is: IBM RS/6000, model 230 AIX 3.2.4 (although we could upgrade to 3.2.5 if need be) MF COBOL 3.1 Informix SE 5.? -- Bill Dixon