TBASE accepts a database name and
password; It is a CGI program interacting with an Apache Server gathering
information from a post in an html page.
If the database can be opened (mode 5), the
Image intrinsics
are called to determine the characteristics of the database.
- First, a summary of the datasets is shown;
- Next, all the active items in the database are shown;
- Finally, datasets are shown with their items and paths.
The form is also redrawn so the user can enter another database, if desired.
Developers are advised that Chapter 5 of the TurboIMAGE Database Management
System Reference, Edition 7, is vital to understand the
DBINFO
calls used to power the program.
Note that this program also checks to see if TPI is present and if it is
turned on, will account for additional key fields used as indices by the
Third Party Index provider [note that
OMNIDEX
was used for the model and
SUPERDEX
may not work the same way].
Although a similar program,
DBHTML,
was provided as a utility by
Stan Sieler at
Allegro, this one differs in that:
1) No privileged processing is done,
so the user must provide a valid password;
2) No passwords are given or provided in
any way in the listing;
3) All processing is done dynamically at the time
of POST from the Web page and is not a statically built page;
4) Data sets in the Data set summary are in sorted order
-- in databases with over 100 sets, the particular data set you are looking
for may be rather illusive;
5) The program was built on the requirements of end user
clients who need to know the structure of the database for the
purpose of using Data Express and other report writers, so the structure of
the output has been made so they can jump from item to item easily and can
print the page;
6) The Items are no longer in table format
for ease use;
7) Blocking factors and sectors were left off the
data set summary;
8) Items now have their properties shown with the
detail of the data sets;
9) In the detail of the data sets, the information for each
data set from the summary is also given;
10) The program tells you right off how
many data sets you have at the summary, so there is no counting or
guessing;
11) The count of the data items is given in the Items
section right off, so there is no guessing how many items you have;
12) There is some disagreement over search and key fields, and you will find
keys in detail data sets rather than search items
rendered by the other program;
13) A rose egg shell color was selected for the
background to be somewhat more easy on the eyes than glaring white;
14) The post area is regenerated on the page each time
the program runs and developers may want to change certain features (like
just running an exec and embedding the database name and password in the
program);
15) Note that the post routines were clearly stolen
from
Lars Appel and without his help and experimentation this program wouldn't
run [of course I have used the
DBINFO Intrinsics
years ago with the same problems with the numbers of items going WAY WAY
beyond 1024--a real bummer for subscripting!];
16) This program was written entirely in COBOL85;
17) Orphaned items do not appear in the Items Section,
so if no dataset is associated with an item, the item will not be in the
cross reference.
18) No item key appears for an Automatic Master in
the Detail Datasets Section.
This program is provided as is and is free to be used by anyone as long as you
follow the commonly accepted licensing terms of the Open Systems Community--to
wit, you must provide the original source to people who ask for it.
Anybody who wants to, can neaten and tidy up the program and give it back
to me, because there is an instance where intrinsics were called a second
time while the values were in a table.
The following CSMC script is provided to allow program compilation
[note: Use lower case!]:
PARM PROG,SUFF="CC"
COB85XL !PROG!SUFF
LINK $OLDPASS;TO=./!PROG;RL=/lib/libc.a ;posix ;share
PURGE !PROG
COPY ./!PROG , !PROG
PURGE /APACHE/PUB/cgi-bin/!PROG
COPY ./!PROG , /APACHE/PUB/cgi-bin/!PROG
XEQ /SYS/HPBIN/CHMOD;INFO=" 755 /APACHE/PUB/cgi-bin/!PROG"
That is:
:CSMC tbase
Note that using :CSMC tbase works just fine DON'T USE UPPER CASE ON tbase!
Many thanks are in order for
Whisper Technologies for
their Programmer Studio, without which this project would have taken 5
months rather than two weeks -- testing took seconds.