/* 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 "" skip. put unformatted "
" skip. put unformatted "" skip. put unformatted '
| ' + _file._file-name + ' | ' skip. if i modulo 5 = 0 then put unformatted "
" skip. put unformatted "
" skip. put unformatted "" + _file._desc + "
" skip. put unformatted "| Field Name | " skip. put unformatted "Datatype | " skip. put unformatted "Format | " skip. put unformatted "Extent | " skip. put unformatted "Default | " skip. put unformatted 'Description | ' skip. put unformatted "|
|---|---|---|---|---|---|---|
| " + _field._field-name + " | " skip. put unformatted "" + _field._data-type + " | " skip. put unformatted "" + _field._format + " | " skip. if _field._extent > 0 then put unformatted "" _field._extent " | " skip. else do: put unformatted "1 | " skip. end. put unformatted "" + _field._initial + " | " skip. put unformatted "" + _field._desc + " | " 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 '