Define an external procedure

The CREATE PROCEDURE statement for an external procedure names the procedure, defines the parameters and their attributes, and gives other information about the procedure that the system uses when it calls the procedure.

Consider the following example:

 CREATE PROCEDURE P1
          (INOUT PARM1 CHAR(10))
          EXTERNAL NAME MYLIB.PROC1
          LANGUAGE C
          GENERAL WITH NULLS
 

This CREATE PROCEDURE statement:

It is important to note that it is not necessary to define a procedure in order to call it. However, if no procedure definition is found, either from a prior CREATE PROCEDURE or from a DECLARE PROCEDURE in this program, certain restrictions and assumptions are made when the procedure is called on the CALL statement. For example, the NULL indicator argument cannot be passed.

Related reference
Use embedded CALL statement where no procedure definition exists