*****************************************************************
*      Advanced PowerBuilder Utilities FreeWare			*
*****************************************************************                           

The Advanced PowerBuilder Utilities ( APU ) are being released as freeware.  You may utilize the source code in accordance with the license included.   The APU is a collection of utilities that extend the PowerBuilder Development environment.  The APU has a long history since many of them were introduced in Version 2 of PB.  The utilities have been enhanced and migrated thru Version 8.x.  

Starting with Version 7 of PowerBuilder, much of the functionality the utilities provide is being incorporated into the PB Development environment.  Features such as Global Search, Stored Procedure Updates, DB Repository reporting, etc. have made the need for these tools less likely. but you may still find them useful.

The following describes the files in this package:
*****************************************************************
*   PowerBuilder Libraries:
*****************************************************************
apu110.pbl	- Contains objects common to all the utilities
apapsrv.pbl*	- Contains generic application services and objects
apdwsrv.pbl*	- Contains generic datawindow services and objects
apmain.pbl*	- Contains common ancestor windows and controls
apwnsrv.pbl*	- Contains generic window services and objects
cporca.pbl	- Contains Library Management services and ORCA routines
dweas.pbl	- Objects for the DataWindow Extended Attributes Synchronizer
dwcheck.pbl	- Objects for the DataWindow SQL Verifier
xref.pbl	- Objects for the Cross-Reference Utility
pear.pbl	- Objects for the PB Extended Attributes Reporter
spud.pbl	- Objects for the Stored Procedure Updates for DW Utility
objsrch.pbl	- Objects for the Object Search Utility

	*  In Version 5, the APU was revamped.  At this time, PFC was also being developed and the APU was retrofitted to use PFC.   Since APU was being enhanced at the same time as PowerBuilder and PFC were in alpha and beta states, the libraries you find here are a snapshot of PFC at a point during the beta cycle.  It was necessary to do this to insure the stability of APU.
	   THESE LIBRARIES, IN NO WAY, SHOULD BE CONSIDERED TO BE ANY PART OF PFC.

*****************************************************************
*   C Source Files:
*****************************************************************
cpfnd110\  contains routines for parsing and searching PB source
cphst110\  contains string routines used by cpfnd110
cporc110\  contains ORCA routines


*****************************************************************
*   PowerBuilder Resource Files and Resources
*****************************************************************
apu110.pbr, apapsrv.pbr, apdwsrv.pbr, apmain.pbr, apwnsrv.pbr, cporca.pbr, dweas.pbr, dwcheck.pbr, xref.pbr, pear.pbr, spud.pbr, objsrch.pbr	
plus...
All .bmp, .ico, .cur files in Resources sub-directory

*****************************************************************
*   SQL Anywhere Databases
*****************************************************************
xref.db		- Used by the Cross-Reference Utility to store reports.

*****************************************************************
*   SQL Files (Used to build the XRef Database in other 
*	       DBMSs.
*****************************************************************
xrefin7.sql	- Informix V7
xrefo73.sql	- Oracle V7.3
xrefsyb.sql	- Sybase Sql Server 4.x
xrefsyc.sql	- Sybase System 10/11

*****************************************************************
*   Help Files
*****************************************************************
pbapu110.cnt, pbapu110.hlp

*****************************************************************
*   Other Files
*****************************************************************
spuderr.txt	- Contains script to include for error processing code generated by the SPUD utility


*****************************************************************
*   An Overview of the APU
*****************************************************************
Each of the utilities were designed to be completely separate in such a way, that new utilities could be easily inserted and obsolete utilities could be easily removed.  Each utility has it's own application manager service (descended from n_cst_appmanager) which allows the utilities to function separately.  Most of this logic occurs in the of_run function of w_toolkit_main.

How the utilities work:

DataWindow Extended Attributes Synchronizer (DWEAS):   DWEAS reports and updates datawindows which have column attributes that differ from the current DataBase Repository tables.  To accomplish this, DWEAS extracts the SQL Statement from the datawindow and uses it to create a new datawindow.  It then compares each attribute from the existing datawindow to the newly-created datawindow and reports those differences.  You must be connected to appropriate database for the datawindows.

DataWindow SQL Verifier (DWCHECK):   DWCHECK reports SQL in datawindows that are invalid.  To accomplish this, DWCHECK extracts the SQL from the datawindow and executes it, reporting the database errors.

Cross-Reference (XREF):   XREF cross-references an application.  It accomplishes this by first extracting a list of referencable items and then parses the source of the application's objects and reports matches.

Stored Procedure Updates (SPUD):   SPUD allows you to match a datawindow's columns to an update stored procedure.  Given the mappings, SPUD then creates the script to be pasted into the dw's SQLPreview event that will cause the database updates to be generated thru the stored procedure.

PB Extended Attributes Reported (PEAR):   PEAR reports the extended attributes associated with a database table(s).

Object Search (OBJSRCH):   Object Search functions much like the PowerBuilder Library Search with the major difference being that Object Search can search across PBLs.

All of the utilities (but primarily Object Search), have occasion to access ORCA to accomplish some of its functionality.  These external routines are found in the cpfnd110.dll, cphst110.dll, cporc110.dll files.  The External Function Declarations are in the n_cst_orca_manager (and descendants) objects of cporca.pbl.

To Build the APU, use the project object in apu110.pbl.