You can list a logical RMSfile with toolkit as follows:
Start toolkit on your database:
c:\> toolkit dbname
Select 1 - Data Files Menu from the Toolkit Development Menu.
Select L1 - List Logical Data File(s) from the Data File Menu to list the names and descriptions of the logical RMSfiles in the current database.
Select L2 - List Data File Dictionary from the Data File Menu to list the definition of the RMSfile.
Select L3 - List Data File Records from the Data File Menu to list the data records of an RMSfile.
You can list the logical name and description of all logical RMSfiles in a database with the following command:
c:\> lfadmin -lv dbname
You can list the names of the non-alias fields in an RMSfile as follows:
c:\> pdict lfile
For example, the command pdict demo~mag produces the following output:
magazine
publisher
title
subscribers
rates
You can list the definition of a logical RMSfile (the RMS dictionary file) as follows (alias fields are not shown):
c:\> pdict -l lfname
To list the definition of a logical RMSfile including alias fields enter:
c:\> pdict -la lfname
For example, the command pdict -l demo~mag produces the following output:
File dictionary contents for file demo~mag
Number of records in file=29
Record size in bytes=121
File access method: indexed, reusing deleted records
Key transformation used: btree
Duplicates resolution method used: none
Primary key fields:
magazine
Secondary key fields:
title
publisher, title
Field descriptions:
name , type , size, #elem, offset, isakey, isindex
magazine , STRING , 16, 1, 0, YES, NO
publisher , STRING , 36, 1, 16, NO, YES
title , STRING , 36, 1, 52, NO, YES
subscribers , REAL , 8, 1, 88, NO, NO
rates , MONEY , 24, 3, 96, NO, NO
Note that the size column contains the total size of the field, not the size of a single element.
You can list the data records of a logical RMSfile as follows:
c:\> dprint lfname
You can get the number of record slots currently allocated to an RMSfile as follows:
c:\> pdict -n lfile
For example, the command pdict -n demo~mag produces the following output:
29
Additionally, to get a report showing all logical RMSfiles, select the choice R2 - C/Base RMSfile Catalog from the cbase application menu (see section 2.3, The C/Base Database in Chapter 2, Databases).