home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psinntp!dlogics!hermes.dlogics.com!dlm
- From: dlm@hermes.dlogics.com
- Newsgroups: comp.databases.oracle
- Subject: Re: How to print something in PL/SQL
- Message-ID: <1992Sep9.101753.1308@hermes.dlogics.com>
- Date: 9 Sep 92 10:17:53 CST
- References: <shamel.715612348@tdsb-s> <2662@uswnvg.uswnvg.com> <1992Sep7.100426.353@hhcs.gov.au>
- Organization: Datalogics, Inc., Chicago, IL
- Lines: 24
-
- In article <1992Sep7.100426.353@hhcs.gov.au>, pihlab@hhcs.gov.au writes:
- >> Oracle, in their infinite wisdom, has deemed it appropriate that PL/SQL
- >> have no native print utilities. A rather hideous means of "printing"
- >> is to write results to a table and then print them out with a select
- >> statement following the PL/SQL script. But this is horrible (and costly
- >> in terms of extra database access) alternative to a print statement.
- >
- > I've been toying with the idea that SQL*Connect could be used to write output
- > from within PL/SQL but you would have to define a "table" to SQL*Connect that
- > is really an OS output stream. Unfortunately, we don't have SQL*Connect/RMS
- > here so I can't play with it.
- >
- In version 7, oracle offers packaged procedures called debug_io which resemble
- "c" print statements. This is a cosmetic improvement, for internally, the
- procedures write to tables. Furthermore, in v7 sqlplus you can declare
- pl/sql variables which are bound to your dml statements. you can examine the
- scalar values in much the same way as defined &symbols.
-
- No matter what you do, the kernel has no choice but to write to structures
- available to it. One item nobody has considered is the session trace file.
- Could the kernel be seduced to put debug messages there?
- --
- Dave Mausner, Senior Consultant / Datalogics Inc / Chicago IL / 312-266-4450
- dlm@dlogics.com Motto: Just show me the code
-