sena@infinet.UUCP (Fred Sena) (05/06/89)
I am new to this news group so I might have missed a discussion on this subject. What I am looking for is information about how to build abf applications external to abf. The environment that we are using is Sun Unix release 3.5, and ingres 5.0. There are several reasons to move away from the abf environment. The most obvious is that it is not consistent with the way things are "done" in Unix. Unix utilities tend to be set up such that they can run in a "non-interactive" mode. That means that you can run a command on a bunch of files, go out to lunch, come back, and check to see which files had errors and what they were. In abf, however, the "Image" command forces you to sit there and press the <return> key several times for each module which has an error. (Is there any way to prevent that?) If you do not happen to be tee'ing your output to a file, you then have to write down the module name and the errors that occurred. (Uug, back to The Stone Age... in the 20th century csh, I would use "!make > mod.out") Another limitation is that there is no way using abf to build a version of your code compiled with the '-g' debug option directly from the unix command line. And, there is no way to have abf link the code together with the '-lg' option, thus limiting the usefulness of dbx. I could go on, but I think that you get the general idea... Anyways, I have investigated two avenues for solving this problem with abf as it exists today in release 5.0. One solution involves sending keystrokes to abf via stdin. That solution is pretty cumbersome to figure out and the end result runs pretty slow (it's a Bourne shell, but much of the delay is in abf). It does not address linking with the debug option either. Another thing that I have been trying to do is replicate the compile and link sequence that abf goes through when it creates an executable image. I have found out how to compile everything except .osq files. And, I have figured out the argument list that abf sends to ld. (I did that by creating a Bourne shell called ld which calls /bin/ld. And by setting my PATH variable to make abf find my ld.) So now, I can at least make use of dbx. Does anyone know how .osq files are compiled? Abf runs something called "oslsql" to initially process the file, but I don't understand the arguments that abf is sending. There is also something else abf does, but I'm not sure what it is. I am also wondering what algorithm abf uses to figure out which files to compile. I would appreciate any information that anyone can send me. Also, I would be interested in hearing about changes made in ingres 6.0 which address the issues above. thanks in advance -- -------------------------------------------------- Frederick J. Sena sena@infinet.UUCP Memotec, Inc. N. Andover, MA
jkrueger@daitc.daitc.mil (Jonathan Krueger) (05/08/89)
In article <1506@infinet.UUCP>, sena@infinet (Fred Sena) writes: >Unix utilities tend to be set up such that they can run in a "non-interactive" >mode. That means that you can run a command on a bunch of files, go out to >lunch, come back, and check to see which files had errors and what they were. >In abf, however, the "Image" command forces you to sit there and press the ><return> key several times for each module which has an error. Although ABF's current implementation is awkward and thus confuses the issue, "batchability" of inherently interactive tools is a tradeoff. Would would be the non-interactive mode for MacDraw, and what would you do with it? ABF is meant to provide a highly interactive debugging shell suited to the incremental development of database applications. It's not meant as a general purpose tool, or even a tool. Don't blame it for what it isn't. It has proven its value as a productive environment for building interactive programs that share data among a group of users. >Another limitation is that there is no way using abf to build a >version of your code compiled with the '-g' debug option directly >from the unix command line. And, there is no way to have abf link >the code together with the '-lg' option, thus limiting the usefulness >of dbx. Not true. See the notes from the Advanced ABF/4GL seminar. You seem to have discovered the basic method yourself: >(I did that by creating a Bourne shell called ld which calls /bin/ld. >And by setting my PATH variable to make abf find my ld.) So now, I >can at least make use of dbx. >Does anyone know how .osq files are compiled? Not documented, to the best of my knowledge, and sure to change in release 6. >I am also wondering what algorithm abf uses to figure out which files >to compile. The same one make uses: file dates and dependency rules. -- Jon --
robf@squid.rtech.com (Robert Fair) (05/08/89)
First, the good news, in INGRES 6.1 there is a utility called 'abfimage' which is callable from the command line, and basically does the same thing as the "Image" menu option within ABF, but is non-interactive so it can be called from scripts, makefiles etc. Options allow you to do a conditional image (recompile whats necessary), force a full re-image etc. For ESQL/EQUEL users there is also a new utility called "compform" which will compile a VIFRED frame to source code, allowing you to avoid using VIFRED when doing batch compiles/makes. Both of these commands are described in the SQL/QUEL Reference manual in the section on operating system commands. BTW for anyone not at the IUA, INGRES 6.2 BETA has a full OSL interpreter for the "Go" option, but still generates machine object code for "Image", so development is faster, and you still get the benefit of a compiled image for the production version. For 5.0 users, some recent ports have a version of "abfimage" included on the tape (I don't know which ones). Check the release notes for your particular version to see if its on the tape, and whether or not its supported. Trying to directly compile OSL/OSQ code in 5.0 without ABF/ABFIMAGE is not easy, since the 5.0 OSL compiler was written to be called as a subprocess - command line arguements include things like the file descriptors to use when talking to the backend etc. Hope this helps, Robert Fair RTI Tech Support
cs_bob@gsbacd.uchicago.edu (05/10/89)
>For 5.0 users, some recent ports have a version of "abfimage" included on >the tape (I don't know which ones). Check the release notes for your particular >version to see if its on the tape, and whether or not its supported. > >Robert Fair >RTI Tech Support For some time now, RTI has included a program in its VAX/VMS distribution to do this. It's called BATCHIMAGE.EXE and it lives in SYS_INGRES:[INGRES.SIG]. I think you just have to define the symbol, as $batchimage:==$sys_ingres:[ingres.sig]batchimage and then run it as follows $batchimage database_name application_name I don't know if there's any such program out there for the UNIX world. RCK
nick@bilpin.UUCP (Nick Price) (05/11/89)
In article <511@daitc.daitc.mil> jkrueger@daitc.daitc.mil (Jonathan Krueger) writes >In article <1506@infinet.UUCP>, sena@infinet (Fred Sena) writes: >>(I did that by creating a Bourne shell called ld which calls /bin/ld. >>And by setting my PATH variable to make abf find my ld.) So now, I >>can at least make use of dbx. >>Does anyone know how .osq files are compiled? >Not documented, to the best of my knowledge, and sure to change in >release 6. Last time I looked through the source the 'ld' command and options were *hard wired* which caused me some problems with ABF not producing shared text images. Bet they have it fixed now ! -- _______________________________________________________________________________ Nick Price SRL Data || Apple link : UK0001 1 Perren Street London NW5 3ED || UUCP : nick@bilpin.uucp Phone: +44 1 485 6665 || Path : mcvax!ukc!icdoc!bilpin!nick
edg@squid.rtech.com (Ed Goldman) (05/11/89)
In article <511@daitc.daitc.mil> jkrueger@daitc.daitc.mil (Jonathan Krueger) writes: >In article <1506@infinet.UUCP>, sena@infinet (Fred Sena) writes: >>Unix utilities tend to be set up such that they can run in a "non-interactive" >>mode. That means that you can run a command on a bunch of files, go out to >>lunch, come back, and check to see which files had errors and what they were. >>In abf, however, the "Image" command forces you to sit there and press the >><return> key several times for each module which has an error. > > [other discussions about abf deleted...] Some hints: the file ~ingres/files/utcom.def is used by abf to compile source depending upon a file's extension. Take a look at it. You should be able to see where you can put -g flag (or any cc flag for that matter) by directly editing this file on the "cc" lines. the file ~ingres/files/utexe.def has templates of the flags used by ingres executables. Check out oslosq. I think you'll be able to figure out how to compile .osq files by looking here. I can't recall offhand, but I think you'll need to give ite it: .osq filename, database name, framename, outputfile name (.qc file). setenv II_UTEXE_TRACE /dev/tty will output to screen the ld command line. (Not in all releases and definately *NOT* supported) newer ingres releases have an ~ingres/files/utld.def file which abf uses aS a template to build the ld command line. -edg-