Setting database at runtime with 4GL
Posted in 1995
} Is it possible to choose which database to use from within a 4gl program? } } All our source files have a 'DATABASE abc' at the top. So, if we want to } use the same set of source on a different database, we need to change every } occurence of 'abc' to 'xyz' and recompile. Essentially, what we're looking } for is a way of choosing the database at run time. Is it possible? } } Similarly, can report variables be decided at run time? We have a system } that runs on separate databases in the UK & Canada and currently we have to } change all the PAGE LENGTHs in each country to the appropriate value and } recompile. } } Any advice gratefully received... } } =================================================== } Simon Bunce simonb@misslink.demon.co.uk } =================================================== Choosing a database is easy. We have a 4gl function which reads an environment variable and sets the value of DATABASE to match. It is that simple. We use this in many places to run one set of source code against many databases (including a test database.) I don't know about the report variables off the top of my head, but I think that's been covered before and you'll probably get a good response there from the other guys. Have fun, __________________________________________________________________ | Clem Akins Standard Disclaimers Apply | |Reynolds Metals Co, Alloys Plant "Climb High, Cave Deep!" | | Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com | |________________________________________________________________|