home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / oracle / 1555 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.8 KB

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