DTR_Rdb, Utilities, Datatrieve Rdb and System Management procedures. This is a collection of items that were contributed over the years to the Datatrieve / 4GL DECUS SIG, and a couple of items I've written myself. I've also added some DCL procedures for processing system and Rdb information, as it seemed easier to put them here than to create a separate collection. Bart Z. Lederman Directory [.ALL-IN-1-AND-WPS] ALL-IN-1.DTR This contains some very old definitions for ALL-IN-1 data files, and the WPS DOCDB (with or without ALL-IN-1). They may well have changed since I wrote these, but I'm including them in case anyone has old data files to recover. Directory [.FMS] CDD-TO-FMS.DTR CDDTOFMS.COM This contains a procedure that reads a CDD dictionary and writes out definitions for FMS forms that matches the CDD record definitions. Directory [.FUN] BIORHYTHMS.DTR MORTGAGE.DTR PRIMES.DTR This stuff dates back to the DTR-11 days, but they still work. PRIMES was mostly a programming demonstration. MORTGAGE isn't very sophisticated, but it works. BIORHYTHMS demonstrated the ability to do "PLOTS" on character cell devices. (I don't believe in them, but some co-workers wanted it.) Directory [.FUNCTIONS] DTRFND.MAR HELP_RELAY.MAR SOUNDEX_DESC.MAR USER_TIMER.MAR TEST_BAS_EDIT_PRC.DTR DTRFND.MAR defines functions that can be added to Datatrieve. It includes submissions from several long-time supporters of Datatrieve, and many of the entries are very useful. Most require only that you compile DTRFND.MAR and replace the entry in the appropriate object library, as described in the Datatrieve manual. A few require some extra steps, which are described in the file itself. These functions are commented out with ";!" at the beginning of the line, and you will have to edit the file to select them if you want them. You should read through the file, to see what functions are there, and select the ones you want, especially if you are running Datatrieve as a captive process. Also, a couple of definitions have changed, and the linking process has changed, since the last time these definitions were distributed to bring the definitions up-to-date with the current release of OpenVMS. Some functions call System Shared Images (such as EDTSHR and CONVSHR) and this requires adding a line to the DTRBLD.COM file. Others require that you compile extra source code (HELP_RELAY and SOUNDEX_DESC), and add the object modules to DTRFUN.OLB. HELP_RELAY.MAR allows you to add a function that calls HELP libraries from within Datatrieve. This lets you add on-line HELP to your Datatrieve applications. SOUNDEX_DESC.MAR implements a SOUNDEX function in a way that can be added to Datatrieve (which you can also call from any other program that uses standard OpenVMS String Descriptors). This is very useful when you need to look up data items like names, where you know what it sounds like but may not know the exact spelling. USER_TIMER.MAR is a submission by DTRWIZ (Joe Gallagher), to add functions calls to LIB$INIT_TIMER and LIB$SHOW_TIMER. TEST_BAS_EDIT_PRC.DTR shows how FN$BAS_EDIT works, if you add that function. Directory [.PLOTS] CIRCLES.DTR HISTO_LOGY.DTR HISTO_Y.DTR These are some additions to the Datatrieve PLOTS library. CIRCLES adds a COMPASS plot (Zero degrees is at the top, increasing angles go clockwise); a VECTOR plot (Zero degrees is at the right, increasing angles go counter clockwise); and just for fun, you can also plot a clock face. The other plots are as the name describes them. Directory [.SYSMGR] This directory holds some useful system management tools. DISK_USE.DTR This defines structurs that allow reading the output of $ ANALYZE /DISK_STRUCTURE /USAGE = filespec This will collect data on all files on a volume, including disk space allocated and used, and file owners, much faster than a $ DIRECTORY command of an entire disk (unless you have only a very tiny number of files on the volume). It also allows generating reports, such as disk usage by owner. INSTALL.DTR This defines some structures that allow you to parse the output of INSTALL LIST /FULL. This gives you counts of how many users there are for shared images, and allows a quick report of what images are installed and what qualifiers are used on each one (shared, header-resident, etc.) PARAMS.DTR This allows parsing of the SYSGEN SHOW command (using a SET /OUTPUT to direct it to a file). I've used this to find all paramters which are not set to the system defaults, compare parameters on different systems, and so on. SYSUAF.DTR RIGHTS.DTR As the names imply, these allow reading the SYSUAF and RIGHTSLIST data files. It is very strongly recommended that you do this READONLY, SHARED (if at all): but it does allow generating reports such as last login time by user, users per group, looking quickly at show quotas are set for all users, etc. Directory [.XFC_CACHE] xfc.header XFC_CACHE.COM xfc_cache.txt XFC_CACHE_LOG_FIX.TPU XFC.DTR This procedure captures the output of the $ SHOW MEMORY /CACHE = FILE = volume command, then post-processes it with TPU to convert it into a CSV file that can be loaded into a spread sheet. This allows you to see what files were cached, and how they were used (hit rates, read aheads, total QIOs, etc.) If you don't have a spread sheet handy, XFC.DTR will define Datatrieve structures that read the CSV file and write it to a Domain it can process. Directory [.RDB_TO_RTF] I was working on a project where there was an Rdb database, and we wanted to include descriptions of the tables in the documentation. The goal was to automate the proccess of extracting the definitions of tables, views, fields, etc., and converting them to Rich Text Format (RTF), something nearly all word processing programs can read. It's been a long time since I've used these procedures, but they should at least be a good place for other to start from. RDB_TO_RTF_DCL.COM This command procedure does a series of extraction and post-processing steps, using SQL to list the basic information, and DCL to convert it to RTF. RDB_TO_RTF.COM This is a newer version of the process, which uses a C with Embedded SQL program to generate a cross reference. The source for this program is in the directory. SQL_TO_RTF.TPU This TPU procedure will edit this output of an SQL SHOW TABLE command and convert it to RTF. It's been replace by the above procedures, but I include it as an example of TPU programming.