	/*  
	
	report_category.sql -	main driver for Collaboration Area Data Integrity Check report, for a category-workflow 
					collab area.


	Copyright 2005, IBM Corporation
	
	Version 1, April 6, 2006

	Instructions for using this script:

	1. Run the SQL command "select * from coa" in your WPC DB Admin, or sqlplus, window, 
		to see a list of collab areas and their ids.

	2. Find (the name of) the collab area you want to do reporting, i.e. problem detection, for.
		 and write down its id (i.e. the values of its"coa_id" field).

	3. Now do the following:

		a. Run the drop_views_category.sql script.

		b. Text edit the create_views_category.sql script, to substitute the desired collaboration area's id, 
		for each of the seven occurrences of the default id value of "84" in that script.

		c. Run the edited create_views.sql script.

		d. Run the procs_category.sql procedure to define two PL/SQL procedures.

		e. Run this report_category.sql script.  This will produce a certain report, consisting of one
		"section" per view.  Each section reports the total number of items in that view, and a 
		small random sample of primary keys of items that are in that view.

		f. Run the drop_views_category.sql script.

	4. Capture the text outputs of all the runs of report_category.sql, and send those output files to IBM,
		together with the output of the "select * from coa" command.

	END of Instructions.


	*/

set serveroutput on size 1000000;
set echo off;
set linesize 120
set heading off
set line 10000
set wrap off
set newpage NONE
BEGIN 
  DBMS_OUTPUT.enable(1000000);
  report_views(1, 100000);
	/* hardwired whichchecks = 1, keystoshow = 100000 for now. */
	/* Whichchecks for future use to select the exact checks to be done. */
	/* keystoshow for future use to select the max number of actual entry keys to display, in each displayed view. */
END; 
/