 WEBDAT  G A web application 3 and a half GL (generator language). Very crude, but  saves a lot of coding.  @ Simple example of what it does. Let's build a database of tcp/ip0 addresses and some information about the device:  O Simply run it and follow this example to answer the questions. All applications F generated are self-contained in the two command files, the fdl and theL data file. You'll need to define the command WEBDAT == "@SYS$MANAGER:WEBDAT"@ or wherever you want it to reside. The OSU web server needs this definition also.  > Now to create a new application, first we "make" the database:   	| $ WEBDAT MAKE  A Webdat will tell you what it is doing and why as it goes along...   < 	| WEBDAT.COM                            written 4/9/97 *JM* 	|  7 	| This routine will create an .FDL and an empty master ; 	| file for a new WEBDAT application. All data fields other 8 	| than the primary key are free-format, variable length< 	| character data. The default delimiter between data fields7 	| is the ^ (carat). This can be changed in WEBDAT.COM.  	|  = 	| There is a 'model' record '%%%MODEL' that is typically the > 	| first record in the file and contains a list of each of the? 	| variable length data fields associated with the primary key. @ 	| WEBDAT.COM attempts to step over this record anytime it showsC 	| up in normal use. If you write your own applications, you should > 	| do the same. In this way, WEBDAT maintains its own internal  	| data dictionary for the file. 	|  B 	| Enter the filename with a complete disk/directory spec or use a' 	| logical name for the directory name.  	|  ( 	| Example:   WWW_ROOT:[DATA]NEWFILE.DAT 	|    F Here we enter the filename of the datafile. We'll assume it resides inF the WWW_ROOT:[000000] directory. You probably want to put it somewhere/ else using a logical name in front of the file:    	| FILE NAME [EXIT]? TCP.DAT 	|    G Now you can create one single fixed length RMS Indexed key of arbitrary  size:   B 	| How many characters should the primary key be? MIN=8 [EXIT]? 15 	|  B 	| DCL has a limit of 2048 for a record. Stay below this size. theA 	| file will be a variable length ISAM, so no additional space is # 	| required if you use the maximum.  	|    F It's a variable length file, so it doesn't really matter what size you? make this as long as it is bigger than you could possibly need:   H 	| WHAT IS THE MAXIMUM TOTAL RECORD SIZE YOU WANT TO ALLOW? [EXIT]? 2000 	|    J OK, it creates an FDL and then uses it to create an empty file. Be careful9 not to overide an existing file when you run this script!   E 	| %FDL-I-CREATED, SYS_OPS:[MORGAN.GEOCITIES.WEBDAT]TCP.DAT;1 created  	|  A 	| OK, now we need to add the model record that defines the names @ 	| for each of the variable length fields. Press return when youB 	| have finished entering your names. Keep field names as short as 	| possible. 	|  7 	| The key field is always called 'KEY' do not enter it 6 	| in the following list. Keep field names short, with3 	| underscores if desired. Enter one field name per  	| response. 	|    N OK, primary key is going to be the tcpip address in the format 255.255.255.255  C Here we specify all the other variable length fields we want in the 	 database:   , 	| Enter field name [FINISHED]? COMPUTERNAME) 	| Enter field name [FINISHED]? PROCESSOR ( 	| Enter field name [FINISHED]? LOCATION 	| Enter field name [FINISHED]?  	|   	| TCP.FDL and TCP.DAT+ 	| have been created and are ready for use!  	|   	| Execute the DCL command...  	|   	|        WEBDAT SCRIPT TCP.DAT  	|  < 	| ...to create generic CREATE-REVIEW-UPDATE-DELETE scripts. 	|    K The empty file now has a "%%%MODEL" record as the first record. The "model" D record defines all the fields in the file. You can add new fields orA re-arrange fields by changing the model and any records affected.   B Now, let's generate the scripts from our newly generated database:   	| $ WEBDAT SCRIPT TCP.DAT9 	| Generating generic CREATE-REVIEW-UPDATE-DELETE scripts  	|  ? 	| This procedure generates two scripts, one for retrieving and @ 	| choosing records to be updated, the other for updating record 	| data. 	|  : 	| Enter the filename to generate scripts. You should have9 	| already generated the empty file using the WEBDAT MAKE < 	| command. Include a logical or disk/directory spec on thisC 	| filename. Do not use a logical for the actual file name, however 7 	| you can hack the generated scripts to use a logical.  	|  ( 	| Example:   WWW_ROOT:[DATA]NEWFILE.DAT 	|   	|   	| GENERATING TCP_DISPLAY.COM  	|   	| GENERATING TCP_UPDATE.COM 	|   	| Script generation completed 	|  . 	| Now move TCP_UPDATE.COM and TCP_DISPLAY.COM7 	| to the WWW_ROOT:[BIN] directory. Move the empty data 5 	| file to the correct directory specified during the : 	| generation and make sure the OSU web server account has 	| update access to it.  	|  M 	| You can then access this script as http://your.node.name/htbin/TCP_display  	|  > 	| If you want to use username security for controlling accessF 	| to updates to this file, put it in a different OSU script directoryL 	| and set a level II protection on that directory by username and password.K 	| Otherwise all users will be able to modify your file through the script.  	|  K 	| If you'd like to implement checkboxes for a particular field, there is a M 	| routine 'MAKE_CHECKBOXES.COM' that you can hack into the generated scripts  	| where desired.   J TCP_DISPLAY.COM has a simple retrieval script. You enter a partial key and1 it returns a clickable list of all matches found.   H TCP_UPDATE.COM actually processes add/change/delete requests against theG database. You can customize this script easily to add checkboxes, radio I buttons, fancier record displays, headings, imbedded links and gifs, etc.   B The sample application and empty data file are included in the zip
 distribution.   = Email enhancements, comments and bugs to vmswiz@geocities.com   