Creating a sample table
Before you create a COBOL or PL/I stored procedure, you must create a sample table that the stored procedure can access.
Procedure
- Right-click the Tables folder of your schema.
- Select New > SQL File Editor.
- Change the text in the editor to the following, replacing
myschewith the name of the schema folder:CREATE TABLE mysche.CITYTABLE ( CITY CHAR(32) NOT NULL, COUNTRY CHAR(32) NOT NULL, PRIMARY KEY(CITY) ); - Right-click the white space in the editor and click Run SQL. The Data Output view indicates a successful run.
- Close the SQL editor without saving the contents.
- Right-click the Tables folder and click Refresh. The new table definition is added
to the Tables folder of your schema.
Column name Column type Length CITY VARCHAR 32 COUNTRY VARCHAR 32