


     DDDDBBBBZZZZ((((1111))))		  XXXXEEEENNNNIIIIXXXX	3333....0000 ((((11111111	FFFFeeeebbbb 1111999999992222))))		DDDDBBBBZZZZ((((1111))))



     NNNNAAAAMMMMEEEE
	  dbz -	operate	on dbz databases of text

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
	  ddddbbbbzzzz [	----{aaaaxxxxmmmmcccc}	] [ ----tttt c ] [ ----llll	length ] [ ----{qqqqiiiiuuuueeee} ] [ ----ffff old
	  ] [ ----pppp parms ] database file ...

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
	  _D_b_z is a shell-level interface to the	_d_b_z(3z)	database
	  routines for indexed access to a text	file.

	  The _d_a_t_a_b_a_s_e file must be a text file, one line per database
	  record, with the key the first field on the line.  The ----tttt
	  option sets the field-separator character; the default is
	  tab.	Setting	the separator character	to NUL (with ----tttt	'''''''')
	  makes	the whole line the key.	 Lines must not	exceed 1023
	  bytes	in length including the	newline; this limit can	be
	  increased with the ----llll	option.	 The limitations and
	  restrictions of _d_b_z(3z) must also be observed; in
	  particular, it remains the user's responsibility to ensure
	  that no attempt is made to store two entries (whether
	  identical or not) with the same key.

	  In the absence of options, _d_b_z creates a _d_b_z(3z) index for
	  the database;	the index comprises files _d_a_t_a_b_a_s_e....ppppaaaagggg and
	  _d_a_t_a_b_a_s_e....ddddiiiirrrr in the same directory.  Any previous index is
	  silently overwritten.	 The ----aaaa, ----xxxx, ----mmmm, and ----cccc	options
	  specify other	operations.

	  With ----aaaa, _d_b_z appends lines from the _f_i_l_e(s) (standard	input
	  if none) to the database, updating both the text file	and
	  the indexes.

	  With ----xxxx, _d_b_z reads keys from the _f_i_l_e(s) (standard input if
	  none)	and prints (on standard	output)	the corresponding
	  lines, if any, from the database.  The input is in the form
	  of database lines, although only the keys are	significant.
	  The ----qqqq option	makes ----xxxx print the input lines whose keys are
	  found	instead	of the database	lines; this is somewhat
	  faster.

	  With ----mmmm, operation is	the same as for	----xxxx except that the
	  keys which are _n_o_t present in	the database are printed.

	  With ----cccc, _d_b_z checks the database for internal	consistency.
	  The ----qqqq option	causes this check to be	done more quickly but
	  less thoroughly (each	key is looked up in the	index, but no
	  check	is made	to be sure that	the index entry	points to the
	  right	place).

	  The ----iiii option	suppresses the use of _d_b_z(3z)'s	_i_n_c_o_r_e
	  facility.  This makes	accesses slower, but keeps the files



     Page 1					      (printed 2/5/95)






     DDDDBBBBZZZZ((((1111))))		  XXXXEEEENNNNIIIIXXXX	3333....0000 ((((11111111	FFFFeeeebbbb 1111999999992222))))		DDDDBBBBZZZZ((((1111))))



	  current during updating and reduces startup/shutdown
	  overhead.

	  Normally, _d_b_z	checks whether a key is	already	in the
	  database before adding it.  The ----uuuu option suppresses this
	  check, speeding things up at the expense of safety.

	  A new	index is normally created with default size, case
	  mapping, and tagging.	 The default size is right for 90-
	  100,000 records.  The	default	case mapping is	right for
	  RFC822 message-ids.  See _d_b_z(3z) for what tagging is about.
	  (Note, these defaults	can be changed when _d_b_z(3z) is
	  installed.)

	  If the ----ffff option is given, size, case	mapping, and tagging
	  are instead initialized based	on the database	_o_l_d.  This is
	  mostly useful	when creating a	new generation of an existing
	  database.  (See the description of _d_b_z_a_g_a_i_n in _d_b_z(3z) for
	  details.)

	  If the ----pppp option is given, the _p_a_r_m_s string specifies	the
	  size,	case mapping, and tagging.  If _p_a_r_m_s is	a single
	  decimal number, that is taken	as the expected	number of
	  records in the index,	with case mapping and tagging
	  defaulted.  Alternatively, _p_a_r_m_s can be three	fields-a
	  decimal number, a case-mapping code character, and a
	  hexadecimal tag mask-separated by white space.  The decimal
	  number is, again, the	expected number	of records; 0 means
	  ``use	the default''.	See _d_b_z(3z) for	possible choices of
	  case-mapping code, but in particular,	0000 means	``no case
	  mapping''.  See _d_b_z(3z) for details on tag masks; 0 means
	  ``use	the default''.

	  If the ----eeee option is given, the decimal number	in ----pppp is taken
	  to be	the exact table	size, not the expected number of
	  records, and invocation of _d_b_z_s_i_z_e (see _d_b_z(3z)) to predict
	  a good size for that number of records is suppressed.

	  The ....ppppaaaagggg file	is normally about 6 bytes per record (based on
	  the estimate given to	----pppp or the previous history of the ----ffff
	  database).  The ....ddddiiiirrrr file is tiny.

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
	  dbz(3z)

     HHHHIIIISSSSTTTTOOOORRRRYYYY
	  Written at U of Toronto by Henry Spencer, for	the C News
	  project.  See	_d_b_z(3z)	for the	history	of the underlying
	  database routines.

     BBBBUUUUGGGGSSSS
	  There	are a number of	undocumented options with obscure



     Page 2					      (printed 2/5/95)






     DDDDBBBBZZZZ((((1111))))		  XXXXEEEENNNNIIIIXXXX	3333....0000 ((((11111111	FFFFeeeebbbb 1111999999992222))))		DDDDBBBBZZZZ((((1111))))



	  effects, meant for debugging and regression testing of
	  _d_b_z(3z).

	  Permissions for the index files probably ought to be taken
	  from those of	the base file.

	  The line-length limit	is a blemish, alleviated only slightly
	  by ----llll.















































     Page 3					      (printed 2/5/95)



