Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!ncar!unmvax!pprg.unm.edu!hc!lll-winken!uunet!portal!cup.portal.com!DMasterson From: DMasterson@cup.portal.com (David Scott Masterson) Newsgroups: comp.databases Subject: Re: Ingres OSL-passing parameters from command line Message-ID: <16748@cup.portal.com> Date: 6 Apr 89 04:37:11 GMT References: <470@agrigene.UUCP> Organization: The Portal System (TM) Lines: 38 In message <470@agrigene.UUCP>, overby@agrigene.UUCP writes: > >Can one pass in parameters/values to an Ingres OSL program at the time of >program execution? e.g. progamname frame value,...,value. If so, how? > >Scott Overby >Agigenetics >Madison, WI > By definition -- NO! !@#%&^*?! OSL programs are started at frames. Frames do not have parameters, they have field names (as in the forms that they display). OSL procedures have parameters. Therefore, the only way that it might be done is to call a procedure from the command line. However, I do not believe that the main procedure that Ingres supplies with ABF is set up for command line arguments beyond the database name (-ddbname) and the framename. You could look around in ~ingres/files for abfmain.[co] (I think) which should be the installed main routine that is called by the compiled program. You could try replacing it with your own routine, but I never saw any documentation on what functionality the main() routine has to support, so you're on your own. How about a quick hack? Define a relation within the database for passing arguments to your programs. Then develop a shell/command file (you are using Unix or VMS, aren't you ;-) that reads the command line arguments, calls sql/quel to insert the values into the relation, then starts up your application with the appropriate frame name. The definition of the frame would include an "initialize" section that would retrieve the values from the relation and populate the fields on the form accordingly (or whatever else you wanted to do with them). Not exactly a barn burner, but should provide the functionality you are after. Later, you could convert the shell/command file into an EQUEL/EQSL file. Think about it. David Masterson DMasterson@cup.portal.com