Re: DATABASE statement catch-22
Posted in 1994
In article <1994Jan28.194710.15486@fripp.ri.cadre.com> you write: } I think I'm screwed on this, but I figured I'd check... } } I have a 4GL program (written under RDS 4GL 4.10) that has a set of defines } at the beginning using the LIKE keyword, immediately following the DATABASE } statement. } } Example: } DATABASE fubar1 } DEFINE om30cus LIKE omlic.om30cus } . } . } MAIN } . } . } END MAIN } } I have a new requirement for this program that requires that this program be } useable under any of our databases, fubar_1 through fubar_5, all of which } have the same schema. } } Is there a way I can do this that I'm missing? I can't call ARG_VAL() before } this, so I can't pass the database name as a command line argument. } Why not? Fourgen does. Provided that ALL the schemas are identical, you can have the DATABASE fubar1 statement as the first line of your code for all the DEFINE LIKE statements. In your MAIN you stuff a variable with the database name from the command line and do a DATABASE varname. DAS -- David Snyder @ Snide Computer Services - Folcroft, PA Current Release is db4glgen-3.17 UUCP: ..!uunet!das13!dave INTERNET: dave@das13.snide.com