5 Database Utilities
DBCREATE is used after the schema program has installed the database structure in the database server catalog. DBCREATE is available as a commandline utility or a Eloquence statement.
The following command can be executed from the operating system commandline:
dbcreate [options] database [data set [ data set ] . . .] ] ]
NOTE: The user must have administrative capabilities for either the server or the database. When using the eloqdb5 server, the user information is ignored and the maintenance password must be specified.
The DBCREATE statement can be used in a Eloquence program:
DBCREATE root file spec [;maintenance word] [,set list] [,return status]
NOTE: The user must be authorized with the DBLOGON statement before using executing DBCREATE. The user must have administrative capabilities for either the server or the database. When using the eloqdb5 server, the user information is ignored and the maintenance password must be specified.
dbcreate [-u user] [-p password] [-v] database [data set [ data set ] . . .] ] ]
The parameters are:
dbcreate -v SADDisplay:
B1368B DBCREATE (C) COPYRIGHT MARXMEIER SOFTWARE AG Processing data base: SAD DATA SET INDEX(ES) ---------------- -- - -------------------- DATE 01 A ORDER 02 A PRODUCT 03 M 1 LOCATION 04 M OPTION 05 D CUSTOMER 06 D 2 | | | | | | | | Dataset Name | | Number of Indexes defined | | | Dataset Types | A= Automatic Master | M= Manual Master | D= Detail | Dataset NumberIn this example, all the data sets in the SAD data definition file are created.
DBCREATE database [;maintenance word] [,set list] [,return status]
The parameters are:
When executed from the keyboard without a return status parameter, certain errors may be reported by DBCREATE without terminating execution (see page 197 for a description of these non-fatal errors). However, when DBCREATE is executed from a program or when it is executed from the keyboard and a return variable is used, the first error encountered terminates execution of the command. When the return status variable is used, the return variable contains the error number (or 0 if no errors are encountered), but no error message is displayed.
The following command can be executed from the operating system commandline:
dberase [-u user] [-p password] [-v] database [data set [ data set ] . . .] ] ]
NOTE: The user must have administrative capabilities for either the server or the database or must have the erase privilege for a dataset. When using the eloqdb5 server, the user information is ignored and the maintenance password must be specified.
The DBERASE statement can be used in a Eloquence program:
DBERASE root file spec [;maintenance word] [,set list] [,return status]
NOTE: The user must be authorized with the DBLOGON statement before using executing DBERASE. The user must have administrative capabilities for either the server or the database or must have the erase privilege for a dataset. When using the eloqdb5 server, the user information is ignored and the maintenance password must be specified.
dberase [-u user] [-p password] [-v] database [data set [ data set ] . . .] ] ]
The parameters are:
dberase -v SADDisaplay:
B1368B DBCREATE (C) COPYRIGHT MARXMEIER SOFTWARE AG Processing database: SAD DATA SET INDEX ---------------- -- - ----------------- DATA 01 A ORDER 02 A PRODUCT 03 M LOCATION 04 M OPTION 05 D CUSTOMER 06 D | | | | | | Data Set Name | | | | | Data Set Type | A = Automatic Master | M = Manual Master | D = Detail | Data Set NumberIn this example, the contents of all the data sets are erased.
DBERASE database [;maintenance word] [,set list] [,return status]
The parameters are:
When a set list is supplied, DBERASE erases only the data entries in the sets specified. Sets may be identified by name or number (for example: "1,2,CUSTOMER"). If no set list is supplied, DBERASE attempts to erase all data sets of the database.
When executed from the keyboard without a return-status parameter, certain errors may be reported by DBERASE without terminating execution (see page 197 for a description of these non-fatal errors). However, when DBERASE is executed from a program or when it is executed from the keyboard and a return variable is used, the first error encountered terminates execution of the command. When the return status variable is used, the return variable contains the error number (or 0 if no errors are encountered), but no error message is displayed.
NOTE: Executing a DBERASE on a master data set erases all chain information linking the master set entries with related detail entries. This erased chain information may cause unexpected errors on subsequent accesses of the database.
The following command can be executed from the operating system commandline:
dbpurge [options] database [data set [ data set ] . . .] ] ]
NOTE: The user must have administrative capabilities for either the server or the database. When using the eloqdb5 server, the user information is ignored and the maintenance password must be specified.
The DBPURGE statement can be used in a Eloquence program:
DBPURGE root file spec [;maintenance word] [,set list] [,return status]
NOTE: The user must be authorized with the DBLOGON statement before using executing DBCREATE. The user must have administrative capabilities for either the server or the database. When using the eloqdb5 server, the user information is ignored and the maintenance password must be specified.
dbpurge [-u user] [-p password] [-v] [-f] database [data set [ data set ] . . .] ] ]
The parameters are:
dbpurge -v SADDisplay:
B1368B DBPURGE (C) COPYRIGHT MARXMEIER SOFTWARE AG Processing database: SAD DATA SET ---------------- -- - DATA 01 A ORDER 02 A PRODUCT 03 M LOCATION 04 M OPTION 05 D CUSTOMER 06 D * | | | | | | | | Data Set Name | | and ROOT File | | | Data Set Type | A = Automatic Master | M = Manual Master | D = Detail | Data Set NumberIn this example, all the data sets and the root file of the SAD database are deleted.
DBPURGE database [;maintenance word] [,set list] [,return status]
The parameters are:
When a set list is supplied, DBPURGE deletes the data set files of the specified sets. Sets may be identified by either name or number (for example, "1,2,CUSTOMER"). If no set list is supplied, DBPURGE attempts to purge all data set files of the database, and if successful, attempts to purge the root file.
When executed from the keyboard without a return-status parameter, certain errors may be reported by DBPURGE without terminating execution (see page 197 for a description of these non-fatal errors). However, when DBPURGE is executed from a program or when it is executed from the keyboard and a return variable is used, the first error encountered terminates execution of the command. When the return status variable is used, the return variable contains the error number (or 0 if no errors are encountered), but no error message is displayed.