DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: IN OUT and dbms_output.put_line in PL/SQL

  1. #1
    Join Date
    Jul 2001
    Posts
    59

    IN OUT and dbms_output.put_line in PL/SQL

    Hi all,

    I have some questions about PL/SQL and how Oracle is configured.

    Background:

    We have a scanning application developed externally which is written in PL/SQL and interfaces with wireless barcode scanners. The scanning system writes to a log file and interacts with the databases procedures and packages. I'm not real familiar with how it all works and I'm trying to figure it out. I am somewhat knowledgeable about Oracle and PL/SQL, and I can read the code and understand 90% of it, but some things elude me.

    First of all where does dbms_output.put_line normally print to and how do you change where it prints to? OR how do I find out where it is printing to? There isn't any command window open so it certainly isn't printing there.

    Next, IN and OUT are specified in the package bodies and functions. How do you know where IN comes from and where OUT goes? I know that things are coming IN from the scanners and OUT to the scanners, but I can't tell if they are being written to a file first and then picked up by the database or what.

    Basically I have to learn how this all works together and make some changes since the company who developed it for us wants tens of thousands of dollars to fix the bugs. Apparently someone in our organization signed off on it saying that it was all good and after using it for some time we have discovered a lot of bugs (literally programming mistakes not enhancements) that need fixing and so I have to do it myself. I'm a so-so programmer whose job is really sysadmin. I know perl and SQL well and can read Java and PL/SQL pretty well, but don't know either well enough to write fluently. Anyway, any insight you can provide would help me out a lot. If you know of any good resources like tutorials or learning sites, please let me know.

    Thanks!

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166

    Re: IN OUT and dbms_output.put_line in PL/SQL

    Originally posted by shagymoe
    First of all where does dbms_output.put_line normally print to and how do you change where it prints to? OR how do I find out where it is printing to? There isn't any command window open so it certainly isn't printing there.

    Next, IN and OUT are specified in the package bodies and functions. How do you know where IN comes from and where OUT goes? I know that things are coming IN from the scanners and OUT to the scanners, but I can't tell if they are being written to a file first and then picked up by the database or what.
    dbms_output.put_line is normally used in a procedure as a debugging tool. When packages, procedures or functions are called from a gui front end there is no place for DBMS_OUTPUT to write to therefore under that circumstance it doesn't do anything. When you call a package, procedure or function you pass in parameters. When you create a procedure you can specify one or more "out" or "in out" parameters. The "out" parameter means that the variable passed in gets updated with a new value form the procedure. Functions can also have "out" and "in out" parameters, but having those types of parameters means that you can't use the function in a sql statement. It seems that you should spend a lot of time studying PL/SQL before you start making changes. There are a lot of good books on the market, you should get one and start working through it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width