2.3 The C/Base Database

The database catalog is implemented as a database named cbase. Since the database catalog itself is a database, you can look at its contents just like you can with any other database. The C/Base database catalog contains the names of all databases on the system, and the logical RMSfile, formfile, and reportfile names that belong to each of the databases. The catalog database contains the following RMSfiles:

dbase Database catalog

lfile RMSfile catalog

rfile Reportfile catalog

sfile Formfile catalog

wtrconf Report writer configuration

remoteh Client/Server master configuration

remoted Client/Server detail configuration

prsetup Printer setup/sequence configuration

login PowerPull user security file

access PowerPull user/file access file

pcmd PowerPull user defined command file

We provide forms and reports as a part of the cbase database to help you administer the database catalog. Databases and logical files can be added, changed, or removed from the C/Base database catalog.

To run the cbase application, enter the command:

c:\> start cbase

and to examine the internals of the cbase application, enter the command:

c:\> toolkit cbase

WARNING: Do not modify the cbase database, except as instructed below. The cbase database is referenced each time any program opens a logical file. Making incorrect changes in this database will cause all C/Base database programs to fail.

Normally, you should use the database and logical file administrative commands rather than modifying the cbase database directly. The administrative commands insure the consistency of the cbase database.

The cbase application menu is shown below.

gifs/00000001.gif

Selecting the E1 - C/Base Catalog choice displays the following screen:

gifs/00000001.gif

The Database Name field contains the name of the database. This field is required.

The Home Directory field contains the home directory of the database. The Home Directory field is required, and must be an absolute pathname. Relative pathnames of logical files in this database are relative to the Home Directory.

The Description field contains a description, or comment, for the database. This field may be blank.

The Log File Name names the pathname of the transaction logging file for this database. If the Log File Name is a relative pathname, it is relative to the database home directory. If the Log File Name field is blank, no logging is done, and all RMSfiles in the database should have transaction logging disabled.

If you add or update a database entry, or press the SWITCH <F7> key, you will see the following screen that shows the logical RMSfile catalog.

gifs/00000001.gif

The Database Name and Description fields show the name and description of the database containing the logical RMSfile. The following fields describe the logical RMSfile.

The Logical Data File Name field contains the logical name of the RMSfile. This field is required.

The Logged? field contains a boolean value; if it contains yes, transaction logging is enabled for this RMSfile. There must be a transaction log file for the database. If the Logged? field contains no, transaction logging is disabled for this RMSfile.

The Data File System Name field contains the pathname of the RMSfile. This field is required, and can be either an absolute pathname, or a pathname relative to the database home directory.

The Description field contains a description, or comment, for this RMSfile. This field may be blank.

After storing the Logical Data File Definition form, or pressing SWITCH <F7>, you will see the next screen that shows the logical reportfile catalog.

gifs/00000001.gif

The Database Name and Description fields show the name and description of the database containing the logical reportfile. The following fields describe the logical reportfile.

The Logical Report File Name field contains the logical name of the reportfile. This field is required.

The Precompiled? field contains a boolean value. If it contains yes, the report is compiled into a file (named as the pathname of the reportfile with .rw appended) whenever the reportfile is modified. If it contains no, the report is compiled into a temporary file each time the reportfile is run; the temporary file is discarded after the run. The default value is yes.

Note: Client/Server ignores the precompiled flag. Each time the report is processed it will be compiled.

The Report File System Name field contains the pathname of the reportfile. This field is required, and can be either an absolute pathname, or a pathname relative to the database home directory.

The Description field contains a description, or comment, for this reportfile. This field may be blank.

After storing the Logical Report File Definition form, or pressing SWITCH <F7>, you will see the next screen that shows the logical formfile catalog.

gifs/00000001.gif

The Database Name and Description fields show the name and description of the database containing the logical formfile. The following fields describe the logical formfile.

The Logical Form File Name field contains the logical name of the formfile. This field is required.

The Form File System Name field contains the pathname of the formfile. This field is required and can be either an absolute pathname, or a pathname relative to the database home directory.

The Description field contains a description, or comment, for this formfile. This field may be blank.

Selecting R1 - C/Base Catalog from the cbase application menu produces a report like the following:

Begin Report

C/Base Catalog Listings Page 1

Database Name: cbase

Home: \cbase\lib\cbase

Description: C/Base Files

LOGICAL RMSFILE NAME REAL? LOG? DESCRIPTION SYSTEM NAME

access yes no PowerPull file dbase\access

dbase yes no Data Base Names dbase\dbase

lfile yes no Logical File Names dbase\lfile

login yes no PowerPull File dbase\login

pcmd yes no PowerPull File dbase\pcmd

prsetup yes no Printer Setup routine dbase\prsetup

remoted yes no Remote Server Detail dbase\remoted

remoteh yes no Remote Server Header dbase\remoteh

rfile yes no Logical Report Names dbase\rfile

sfile yes no Logical Form File Names dbase\sfile

wtrconf yes no Report Writer Configuration wtr\data\wtrconf

PRE-

LOGICAL REPORT NAME COMPILE DESCRIPTION SYSTEM NAME

dbase yes List of Logical datafiles dbase\rpt\dbase

lfile yes List of Logical Data File dbase\rpt\lfile

remote no CBase Remote Catalog List dbase\rpt\remote

report no List of Logical Rpt File dbase\rpt\report

screen yes List of Logical Form File dbase\rpt\screen

wtrconf yes Report Writer Defaults wtr\rpt\wtrconf

LOGICAL FORMFILE NAME DESCRIPTION SYSTEM NAME

dbase Catalog Entry Form dbase\scr\dbase

lfile Data File Catalog Entry Form dbase\scr\lfile

remote Remote Server dbase\scr\remote

report Report File Catalog Entry dbase\scr\report

screen Form File Catalog Entry Form dbase\scr\screen

wtrconf Report Writer Defaults wtr\scr\wtrconf

C/Base Catalog Listings Page 2

Database Name: demo

Home: \cbase\demo

Description: C/Base Demonstration

LOGICAL RMSFILE NAME REAL? LOG? DESCRIPTION SYSTEM NAME

mag yes no demo magazine file data\mag

script yes no demo subscription file data\script

sub yes no demo subscriber file data\sub

PRE-

LOGICAL REPORT NAME COMPILE DESCRIPTION SYSTEM NAME

label yes Subscriber labels (text) rpt\label

mag yes Magazine Lists (text) rpt\mag

magazine yes Magazine List (visual ver) rptdef\magazine

mscript yes Subscriptions by Mag. (text) rpt\mscript

scripts yes Subscriptions by Sub. (visual) rptdef\scripts

smag yes Magazine (selected) rpt\smag

sscript yes Subscriptions by Subscrib (text) rpt\sscript

sub yes Subscribers List (text) rpt\sub

subscrib yes Subscribers List (visual) rptdef\subscrib

wlabel yes Labels (windows ver) rpt\wlabel

LOGICAL FORMFILE NAME DESCRIPTION SYSTEM NAME

mag Magazine Entry Form scr\mag

script Subscription Entry Form scr\script

sub Subscriber Entry Form scr\sub

subscrpt Subscription Entry Form scr\subscrpt

End Report

The other catalog reports produce a subset of the R1 - C/Base Catalog report.