OSQL BUILD Command

PURPOSE:  The BUILD command is an automated application generator.  This command will generate the OSQL commands necessary to construct the default application for this Data Base Library (DBL) and store the commands in an optional Command Module (CM) object.

For each table specified (TABLE table_name) or catalogued in the DBL (ALL TABLES), BUILD will create an OSQL INSERT, OSQL SELECT, and OSQL UPDATE command.  The generic table maintenance screens which result from these commands are entered into a default table maintenance menu created by the OSQL BUILD command using the OSQL MENU command.  Each table maintenance menu will then be entered into a main menu for this DBL.

Syntax

OSQL BUILD FOR {TABLE \\table_name [,...]\\; ALL TABLES}
         
DEFINE CM command_module_name ONLY

{TABLE \\table_name
[,...]\\; ALL TABLES}

is the name of the table or tables which should be included in the application building process.  Each table will have the necessary OSQL commands generated to provide for adding rows to the table, displaying rows in the table, modifying rows in the table, and menu access to each of these functions.

NOTE:  Either the TABLE table_name or ALL TABLES clause must be chosen.  If the ALL TABLES clause is chosen, all tables (up to 20) in the current DBL will be included in the BUILD process.

DEFINE CM command_module_name

specifies that the Command Module containing the code generated to execute the OSQL command be saved and named as an object in the current DBL.  This Command Module is made up of OSQL commands which, when executed, will build the default application for this DBL.

ONLY

specifies that the Command Module will be created without being executed by OSQL.  If you include the ONLY clause, you may invoke the Command Module interactively or from another Command Module.

Examples

*OSQL BUILD FOR ALL TABLES &
    DEFINE CM BUILD_ORDERS_SYSTEM ONLY
*USE CM BUILD_ORDERS_SYSTEM

NOTES:  Each default screen will be assigned a name corresponding to the name of the table plus the name of the appropriate OSQL command.  For example, the DS ORDERS table insert program will be named PM ORDERS_INSERT.

Only one Main Menu generated by OSQL BUILD is permitted per DBL.  This menu is named after the current DBL plus the name “_MAIN_MENU”.  For example, a DBL named ORDERS would have a Main Menu name of ORDERS_MAIN_MENU.  Likewise, the Table Maintenance Menu associated with each table has a default name.  Each Table Maintenance Menu is named after the DS (Data Set) or table name plus the name “_TABLE_MENU”.  For example, a DS named PRODUCTS would have a Table Maintenance Menu name of PRODUCTS_TABLE_MENU.

The BUILD command will REMOVE any existing Process Modules (PM’s) with the specified names before the BUILD operation begins.  The BUILD command will have a total of three OSQL commands generated for it:

For example, a Data Set (DS) named PRODUCTS will have default maintenance screens named PRODUCTS_INSERT, PRODUCTS_SELECT, PRODUCTS_UPDATE.

Manipulating Oracle Tables    OSQL Create DS Command