Create database tables

Learn how to create the database tables on the remote system. You must have special privileges to be able to create and modify database tables on the remote system, so check with your systems administrator before beginning.

This lesson assumes that you have a solid understanding of COBOL, JCL, and compilation.

The GAM0VDB.cbl file inserts data into the Global Auto Mart sample database tables. To create the database tables that are needed for the Global Auto Mart tutorial:

  1. Compile the GAM0VDB.cbl file with the following provided copybooks: GAM0BCD, GAM0BDD, GAM0BED, GAM0BMD and GAM0BPD.
  2. Edit <HLQ>.AUTOMART.CNTL(GAM0VCDB), and provide the database schema name by changing all instances of &SCHEMA to match the schema name you want to use. If you do not know which schema name to use, ask your systems administrator.
  3. Submit the GAM0VCDB JCL file to run GAMOVDB. If the required tables exist, the JCL drops them. If the tables do not exist, it creates them. The JCL then runs GAM0VDB to populate the tables.