Re: DATABASE statement catch-22 SUMMARY
Posted in 1994
Topics: General Discussion
Joe Hartley (jh@cadre.com) wrote: : In article 15486@fripp.ri.cadre.com, jh@cadre.com (Joe Hartley) writes: : >I think I'm screwed on this, but I figured I'd check... : Turns out I'm dead wrong about this. What I need to do is set the code up : like this example and pass the database name as a command line arguement: : DATABASE fubar1 : DEFINE om30cus LIKE omlic.om30cus : . : . : MAIN : DEFINE dbname char(20) : DATABASE dbname : . : . : END MAIN : I could have sworn I tried this approach unsuccessfully, but obviously I : mucked it up somehow. This works fine. : Thanks to Paul Pryor, Dave Snyder, Lester Knutsen, Kevin Whitaker, Greg King, : and may@alert for the tips. how about main define db_name char(32) let db_name = arg_val(1) database db_name . . end main This works as well !! (you may wish to verify the number of args passed etc. when trying this for real). mak