Re: selecting databases on command line with fglgo
Posted in 1994
In article <TH2mTc1w165w@cssnet.sanford.nc.us>, david@cssnet.sanford.nc.us (J. David Schronce) wrote: > Long title for what I thought would be a simple solution. I have 2 > division in my company and I want to maintain their data in 2 separate > databases. The tables and fields will be identical. What I thought was > that I could use one (the SLOW division) for development work and specify > the database from the comand line when calling the program with: > > fglgo progname -d database only it doesn't override the line in the > progname.4gl that says: database company1 > > Is there any "quick'n'dirty" way to override the database specified in > the 4gl file? Not really. If you have some sort of common initialization routine at the start of each program (highly recommended for setting isolation levels, lock modes, options, help files, logfiles etc etc) then you could include: LET l_database = arg_val(1) DATABASE l_database Then when you run the program use: fglgo program <database_name> Note that'll you'll need to create a "company1" database even when running against company2 data, but it need not have any tables in it. --------------------------------------,------------------------------------- Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/* | mathcs.emory.edu:/pub/informix/faq/* +64 9 377-4473 (work) 276-5546 (home) | quasar.ucar.edu:/?