Home | Previous Page | Next Page   The Database Option > Displaying Database Information >

Retrieving Information on Routines

Depending on the database server product that you use, select either the Procedures or Routine option on the DATABASE INFO menu to display the text from a selected routine. The SELECT PROCEDURE or SELECT ROUTINE screen appears and shows a list of SPL routines in the current database.

Tip:
Routine and Procedures options do not display system-created routines. They only display user-defined routines and SPL routines.
Dynamic Server

Figure 36 shows the SELECT ROUTINE screen that appears if you use Dynamic Server. The SELECT PROCEDURE screen looks the same although the prompt uses different wording for an SPL routine.

Figure 36. The SELECT ROUTINE Screen
SELECT ROUTINE >> 
Select a routine with the Arrow Keys, or enter a name, then press Return.

--------------- demodb@dbserver1 ------------ Press CTRL-W for Help --------

  read_address  
End of Dynamic Server

If the routine exists in the system catalog and it fits on the DATABASE INFO menu, the text appears on the screen, as Figure 37 shows.

Figure 37. The DATABASE INFO Menu with Text of Selected Routine Displayed
DATABASE INFO: read_address:  dBspace  Nls   Routine   Databases  Exit
Display routine text for a selected routine.

--------------- demodb@dbserver1 ------------- Press CTRL-W for Help --------

create procedure read_address (lastname char(15))
      returning char(15), char(15), char(20), char(15), char(2), char(5);
      define p_fname, p_city char(15);
      define p_add char(20);
      define p_state char(2);
      define p_zip char(5);
      select fname, address1, city, state, zipcode
      into p_fname, p_add, p_city, p_state, p_zip
      from customer
      where lname = lastname;

      return p_fname, lastname, p_add, p_city, p_state, p_zip;

end procedure

If the routine text does not fit on one screen, the DISPLAY menu appears with partial text, as Figure 38 shows.

Figure 38. The DISPLAY Menu with Partial Routine Text Displayed
DISPLAY:   Next  Restart Exit
Display the next page of results.

----------------- demodb@dbserver1 ---------- Press CTRL-W for Help -------

create procedure read_address (lastname char(15))
      returning char(15), char(15), char(20), char(15),char(2), char(5);
      define p_fname, p_city char(15);
      define p_add char(20);
      define p_state char(2);
      define p_zip char(5);

To display the next page of text, select the Next option. To display text from the beginning, select the Restart option.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]