1.2 Toolkit

The toolkit command was demonstrated in the Tutorial manual. Toolkit provides easy access to C/Base by providing a structure under which an application is built. By providing this structure, the novice user need not worry about remembering command names, command formats, and where the application files are stored. The toolkit command provides all this automatically. This chapter explains the various C/Base commands that are integrated within toolkit.

When you create a new application, the application name is added as a database name in the database catalog. The database catalog identifies the component parts (RMSfiles, formfiles, and reportfiles) of each database in the system. See Chapter 2, Databases for a more complete description of databases.

Toolkit also creates a directory with the same name as the application in your current directory. Within that directory, other directories are created to hold the different kinds of files for the application. The directories are named def, data, scr, and rpt. The rest of this section describes these directories and the commands executed within toolkit to create the various application files.

When building an application, you create files that describe a file, a form, or a report. C/Base does not generate program code, but instead creates descriptor files. One program is used to produce the descriptor file; another program reads the descriptor file and produces the result. Note: All descriptor and data files are compatible across all Version 3.8 platforms. For example, the application developer uses the formedit program to create a formfile that describes a sequence of data entry forms. The application user runs the form program, which reads the formfile and displays the forms.

An RMSfile has several components. An RMS definition file describes the fields, indices, and file organization for an RMSfile. From the RMS definition file, one or more RMSfiles can be created. With toolkit, however, there is always just one RMSfile for each RMS definition file.

The Create File Definition choice in the Data Files Menu of toolkit creates a new RMSfile with the lfedit command as follows:

c:\> lfedit -cv lname

The -c flag tells lfedit to create a new RMSfile. Lname is the logical name for the new RMSfile. Lfedit puts the RMSfile in dbhome\data\lname, the RMS definition file in dbhome\def\lname, and creates an entry in the RMSfile catalog for lname.

To modify the definition of an RMSfile and convert it to the new definition, enter the command:

c:\> lfedit -v lname

Creating and maintaining RMSfiles is covered in Chapter 4, Creating RMSfiles.

The Create a Data Entry Form choice in the Data Entry Forms Menu in toolkit invokes the formedit command:

c:\> formedit -vc lname

Lname is a logical name for the new formfile. Formedit creates a new formfile in dbhome\scr\lname and creates an entry in the formfile catalog for lname.

To modify an existing formfile, enter the command:

c:\> formedit -v lname

where lname is the logical name of the formfile. Chapter 5, Creating Formfiles discusses creating formfiles in detail.

The Test a Data Entry Form choice invokes the form command to perform data entry. It takes the logical formfile as its parameter, as in

c:\> form -qfuad formfile

Chapter 3, Using Form describes data entry with form.

Toolkit invokes rptedit to create or modify reportfiles. A reportfile can be a visual report or a text report. Reportfiles are stored in dbhome\rpt\lname. Toolkit invokes the rptedit command to create a reportfile as follows:

c:\> rptedit -cv lname

and to modify an existing reportfile as follows:

c:\> rptedit -v lname

where lname is the logical reportname. Toolkit runs a reportfile with the grace command as follows:

c:\> grace lname

where lname is the logical report name. To print a listing of the screens and field descriptions in a visual report, toolkit invokes the preport command as follows:

c:\> preport lname

This same command, when used with the -r option, lists the visual report as a text report:

c:\> preport -r lname

Creating reports with rptedit is covered in Chapter 7, Creating Visual Reports.

The application menu you create with toolkit has the same name as the application and is stored in the database home directory. Submenus that you create with toolkit may be stored anywhere. You can create the menufile with the interactive screen command menudef:

c:\> menudef pathname

You can test the new menufile by invoking the menu command:

c:\> menu pathname

where pathname is the pathname of the menufile. Chapter 8, Creating Menus discusses creating menus with the menudef command.

As you can see, toolkit has C/Base commands and directories built in, so you do not need to know command names, directories, or parameters.