Stored Procedure Create/Alter/Template

You can create or alter a stored procedure.
You can create or alter a stored procedure.
Follow these steps:
  1. Complete the following fields on the Main Menu:
    • Specify
      (alter), or
      (template) in the
    • Specify
      in the
    • Specify a name in the
      Item Name
    • (Optional) Specify values for one or more of the remaining fields to add to the object definition.
    Press Enter.
    The Procedure Create/Alter/Template panel appears.
  2. Complete the following fields:
    • Language
      Specifies the language interface convention to which the procedure body is written.
      All programs must be designed to run in the server's environment. Assembler, C, COBOL, and PL/I must be designed to run in the IBM Language Environment.
      • ASSEMBLE–Assembler (unless overridden by object definition defaults, this is the default)
      • C–C or C++
      • COBOL–COBOL, including the OO-COBOL language extensions
      • JAVA–Java byte code and executes the procedure in the Java Virtual Machine
      • PLI–PL/I
      • REXX–REXX (this value sets Program Type to MAIN and restricts the allowable values for Parm Style to GENERAL or NULLS)
      • SQL–DB2 SQL procedural language (this value sets DBINFO to NO and hides the Parm Style field)
    • Fenced
      Specifies whether the procedure runs in an external address space.
      This field unconditionally defaults to YES and
      receive keyed input unless the Language field is set to SQL. When this field is YES and Language is SQL, the SQL procedure program is a z/OS load module with an external name.
      You can specify NO only when Language is SQL, which defines your SQL procedure as native. Otherwise, the SQL procedure is external. You can also specify NO when External Name is not blanks, which removes this field from the panel and treats it as implicitly blank. Changing Fenced back to YES restores External Name to the panel with its previous value.
  3. Complete the procedure definition as follows:
    1. Complete the remaining fields on the panel, depending on your Language and Fenced selections. For complete information about all fields, see the online help.
    2. Complete any information in the Parameter Declaration List or SQL body area.
  4. Press the END key.
    A confirmation panel appears.
  5. Press Enter and then enter
    in the execution confirmation pop-up to begin the activity.
    The product processes the request.