A sample stored procedure is provided for you. PL/I source code
is provided for it. There is also a COBOL source code example if you want
to create a sample stored procedure using COBOL.
Description
The
sample stored procedure used in
Working with stored
procedures uses a table called SAMPLE.CITYTABLE and provides an insert,
a select, and a delete function to manipulate the content of this table. Create
this table as described in
Creating the sample
table if you want to use the sample stored procedure.
Parameters
The stored procedure receives three input
parameters. The Function parameter specifies the requested function and must
be either Select, Insert, or Delete (or one of the abbreviations S,
I, or D). The City and Country parameters are used as column values
in the insert function or selection criterion in the select and delete function.
The
stored procedure returns the output parameter Response, which contains
information about the success of the function and it returns a result set
with the selected rows, if the select function is used.
Sample code
Sample PL/I code is provided for the
sample stored procedure. Sample COBOL code is also provided if you want to
create a sample stored procedure for COBOL.