/* htmldict.p * * HTML dictionary report * * 01/11/96 tom created (thanks to Gerry Duprey for the idea) * 04/03/96 mjb changed lots of stuff to automate this. * 04/17/96 mjb put an html link back to the dict.html page at the bottom of every table listing. * 08/30/96 bmy protect against hashes in URL names via encoding * 09/24/96 dmk changed links to use _dump-name.html instead of _file-name.html to match with actual names of link files * 02/06/98 tom adapted to genericize * 07/16/03 rgl corrected links to *.html instead of *.htm * 08/01/03 tom fixed absolute path names & table selection * * January 11, 1996 */ define variable d_name as character no-undo. define variable d_title as character no-undo initial "Data Dictionary". define variable d_dir as character no-undo initial "dict". define variable i as integer no-undo. output to value( "./" + d_dir + "/dict.html" ). put unformatted "" skip. put unformatted "" skip. put unformatted "" + d_title + "

" skip. put unformatted "" skip. put unformatted "" skip. put unformatted "


" skip. put unformatted "

" + d_title + "

" skip. put unformatted "
" skip. put unformatted "

" skip. put unformatted '' skip. for each _file no-lock where _file._file-num > 0 and _file._file-num < 10000: i = i + 1. if i modulo 5 = 1 then put unformatted "" skip. /** replace any # (hashes) with special encoding for URL **/ d_name = _file._dump-name. do while index( d_name, "#" ) > 0: substring( d_name, index( d_name, "#" ), 1 ) = "%23". end. put unformatted '' skip. if i modulo 5 = 0 then put unformatted "" skip. end. put unformatted "
' + _file._file-name + '
" skip. put unformatted "

" skip. put unformatted "
" skip. put unformatted "Last updated " + string( today, "99/99/9999" ) + " " + string( time, "hh:mm:ss am" ) + "" skip. put unformatted "" skip. put unformatted "" skip. output close. for each _file no-lock where _file._file-num > 0 and _file._file-num < 10000: output to value( "./" + d_dir + "/" + _file._dump-name + ".html" ). put unformatted "" skip. put unformatted "" skip. put unformatted "" + d_title + " -- " + _file._file-name + "

" skip. put unformatted "" skip. put unformatted "" skip. put unformatted "


" skip. put unformatted "

" + d_title + "

" skip. put unformatted "
" skip. put unformatted "

" + _file._file-name + "

" skip. put unformatted "

" + _file._desc + "

" skip. put unformatted "
" skip. put unformatted '' skip. put unformatted "

" skip. put unformatted "

" skip. put unformatted "" skip. put unformatted "" skip. put unformatted "" skip. put unformatted "" skip. put unformatted "" skip. put unformatted '' skip. put unformatted "" skip. for each _field no-lock where _field._file-recid = recid( _file ) by _order: put unformatted "" skip. put unformatted "" skip. put unformatted "" skip. put unformatted "" skip. if _field._extent > 0 then put unformatted "" skip. else do: put unformatted "" skip. end. put unformatted "" skip. put unformatted "" skip. put unformatted "" skip. end. put unformatted "
Field NameDatatypeFormatExtentDefaultDescription
" + _field._field-name + " " + _field._data-type + " " + _field._format + " " _field._extent "1" + _field._initial + "" + _field._desc + "
" skip. put unformatted "

" skip. put unformatted "
" skip. put unformatted "

" skip. for each _index no-lock where _index._file-recid = recid( _file ): put unformatted "" + _index._index-name + " " skip. if _file._prime-index = recid( _index ) then put unformatted "Primary " skip. if _index._unique then put unformatted "Unique " skip. for each _index-field no-lock where _index-field._index-recid = recid( _index ): find _field no-lock where recid( _field ) = _index-field._field-recid. put unformatted _field._field-name + " " skip. end. put unformatted "
" skip. end. put unformatted "

" skip. put unformatted "
" skip. put unformatted "Last updated " + string( today, "99/99/9999" ) + " " + string( time, "hh:mm:ss am" ) + "" skip. put unformatted "

" skip. put unformatted ' Return to Listing Of Database Tables ' skip. put unformatted "" skip. put unformatted "" skip. output close. end. return.