home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.ingres
- Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!mail-to-news-gateway
- From: CS_PAUL@GSBVAX.uchicago.edu (Paul Ford 312/702-0335)
- Subject: re: Frequently Used Procedures
- Message-ID: <921117165351.23600e27@GSBVAX.uchicago.edu>
- Sender: daemon@nrao.edu
- Organization: National Radio Astronomy Observatory
- Date: Tue, 17 Nov 1992 22:53:51 GMT
- Lines: 63
-
- Michael McGarrigle writes:
-
- >Does anybody out there know of a way that commonly used routines can be stored
- >in one place but accessed by several databases.
-
- Several options occur to me:
-
- o Write the procedure in an embedded language (e.g., ESQLC/C) and define
- it as a LIBRARY procedure to ABF. The procedure has to be compiled
- externally to ABF. The disadvantage is that you must add a link
- options file to your application definition (for VMS, for Unix I'm not
- sure what the moral equivalent is) to tell ABF where to find the
- compiled object file (or object library file) when it links.
-
- o Under VMS: Leave the procedure in 4GL, but put it in a common
- directory. Use a VMS path logical for your ABF source directory that
- includes the application specific directory and the common directory.
- Each ABF application that uses the procedure will recompile it, but
- there will be only one source.
-
- Example:
-
- Specific source directory for application MYAPP
- DEV1:[SOURCE.MYAPP]
- Common source directory
- DEV1:[SOURCE.COMMON]
- Path logical
- $ define MYAPP_PATH DEV1:[SOURCE.MYAPP], DEV1:[SOURCE.COMMON]
- ABF directory specification for application MYAPP
- MYAPP_PATH
-
-
- o With UNIX I have no real experience, but I'd guess that you could do the
- same sort of common directory trick using soft links instead of VMS
- logical names. Create a common directory to hold the shared procedure,
- and then in each application directory create a soft link pointing to the
- shared procedure source. Maybe something like this:
-
- Specific source directory for application MYAPP
- /dev1/source/myapp
- Common source directory
- /dev1/source/common
- Soft link from application directory to common directory
- /dev1/source/myapp/sharedproc.osq ->
- /dev1/source/common/sharedproc.osq
-
- Some real UNIX experts will have to provide the final word on this
- approach.
-
- I'm a 3GL bigot, so the first option is my preference. In fact it's these
- kind of obstacles to code sharing in ABF that make me love it so much.
-
- [I think I accidentally sent off an unedited copy of the original posting.
- My apologies.]
-
- Paul Ford
- --------------------------------------------------------------------------
- GSB Computing Services 312.702.0335
- University of Chicago cs_paul@gsbvax.uchicago.edu
- 1101 E. 58th Street
- Chicago IL 60637
- --------------------------------------------------------------------------
-
-