Sie sind auf Seite 1von 111

PBL Peeper Documentation

June 18, 2008 General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step By Step Quick Start Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 User Interface Clues.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Universal Control Behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Technical Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 PBLs Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Source: Treeview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Source: Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Source: Grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Selected: Listview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Browse Page.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Lists Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 DataWindow Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 DataWindow Columns.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 External Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Find Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Reports Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Trace Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Trace Call Stack Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Exports Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Mass. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Process Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Replace.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Remove. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Other. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

June 18, 2008

PBL Peeper Documentation

Page 2 of 111

Compare Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Object C mpare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 o App Compare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 DataWindow Compare.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Print Options Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Preferences Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 PSR Viewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 RTF Viewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 SQL Formatter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Script Formatter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Stringer.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 SQL Parser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Command Line Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Application Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 PBL Peeper Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Tool Windows Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 File or Directory Parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Applied PBL Peeper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 How do I check for memory leaks?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 How do I migrate my application back from PowerBuilder 9 to PowerBuilder 8?.. . . . . 88 How do I check that all objects are built based on my class library?. . . . . . . . . . . . . . . . 88 How do I ensure that GUI standards have been kept?. . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 I want to browse an object, but I dont know what PBL its in.. . . . . . . . . . . . . . . . . . . . 89 I want to review all the DataWindow Clicked (or other) scripts.. . . . . . . . . . . . . . . . . . . 89 My PowerBuilder application GPFs.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 How do I use PBL Peeper for producing reports on my system?. . . . . . . . . . . . . . . . . . . 90 Can I produce system metrics from PBL Peeper?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 I want to move an object to another application, but I dont know what other objects it needs.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 I want to find how many times a function is being called during runtime for a certain task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 How do I see all the instance variables?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 How do I launch PBL Peeper from the source PBLs in Windows Explorer (file associations)?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

June 18, 2008

PBL Peeper Documentation

Page 3 of 111

How do I search / review an object and its ancestors?.. . . . . . . . . . . . . . . . . . . . . . . . . . . 92 How do I selectively search and replace?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Can I us Script or SQL forma tting from the PowerBuilder IDE?. . . . . . . . . . . . . . . . . . 92 e How do I create a class hierarchy diagram in Visio?.. . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 How do I compare specific attributes between versions?. . . . . . . . . . . . . . . . . . . . . . . . . 93 How do I search with boolean tests (e.g. create datastore AND (NOT settransobject))? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Frequently Asked Questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 What does PBL Peeper cost?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 My PBL Peeper is a beta version. Where can I find a gold version?.. . . . . . . . . . . . . . . . 94 How can I make PBL Peeper run faster?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Can I get the source code for PBL Peeper?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Where do I check for the latest version or news on PBL Peeper?. . . . . . . . . . . . . . . . . . . 95 Ive got a bug to report, comment etc.... Where can I send a note to Sequel?.. . . . . . . . . 95 Does PBL Peeper use metaclass functionality?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Why PBL Peeper?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 What is that thing on the cats head?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Known Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 PowerBuilder Version Conflicts and ORCA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Tip of the Day List.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

June 18, 2008

PBL Peeper Documentation

Page 4 of 111

General
The general purpose of PBL Peeper is to view, analyze and manipulate the exports of PowerBuilder objects. This was built as a tool for PowerBuilder developers. Its features have been driven by my requirements to do my work as a PowerBuilder consultant. Ive released it with the hope that it will help other PowerBuilder developers complete their work more effectively.

Warnings IMPORTANT: PBL Peeper is provided as is. No guarantees or warrantees accompany


it. Users of this tool accept responsibility for any damage it does to their source code and/or computer system and any other potential impacts. Users should be aware that parts of the tool are intended to modify and/or create source code and/or other files on the computer system. Computer systems and connected devices should be backed up before using this tool. Historically, a version of PBL Peeper was tied to a specific version of PowerBuilder. As of PBL Peeper v4, that tie no longer exists. Efforts have been made to not only be compatible with all past versions of PowerBuilder, but also with future versions of PowerBuilder. Compatibility with Pocket PowerBuilder, PocketBuilder and DataWindow.NET also exists.

Step By Step Quick Start Tutorial


Launch PBL Peeper. Expand the Workspaces item below PowerBuilder X Apps, then expand the first workspace beneath this and select the first target in this workspace. This is your current application. Current is defined as the last target that was run within the current workspace. Drag it over to the listview on the right. The PBLs in your application appear on the right and all the tabpages become enabled. Select the FIND PAGE . In the field labeled CONTAINING :, type update Beneath this: select CHARACTER BY CHARACTER ensure CASE INSENSITIVE is checked. ensure WHOLE WORD ONLY is checked. uncheck INCLUDE QUOTES uncheck INCLUDE COMMENTS From the menu, select EDIT / ADD ROW . In the new row, in the field labeled CONTAINING :, type commit Beneath this: select CHARACTER BY CHARACTER

June 18, 2008

PBL Peeper Documentation

Page 5 of 111

ensure CASE INSENSITIVE is checked. ensure WHOLE WORD ONLY is checked. uncheck INCLUDE QUOTES uncheck INCLUDE COMMENTS In the bottom portion of the FIND PAGE : check CONTEXT LINES and make the corresponding value 0 set PORTION TYPES to SCRIPTS set PAGE BREAKS to NONE uncheck DATA WINDOW OUTPUT check BOLD MATCHES Press the toolbar button for GO (with the VCR style play icon). Review the list of places where your application does updates and commits. Close the results page and return to the FIND PAGE . On the FIND PAGE , check the DATA WINDOW OUTPUT and press GO , repeating the search Select a row on the output Find the button on the toolbar with the same icon os the BROWSE PAGE , and click it (or press CTRL-SHIFT-B) to be moved to the BROWSE PAGE , looking at the same script as the matched item. Press CTRL-Q (also the binoculars with the lightening bolt on the toolbar) to activate QuickFind, and enter the first few characters in a DataWindow name. Press Enter. From the menu, select VIEW / EXPAND . Select a DataWindow column within this DataWindow and see the objects attributes in the right panel. Find a window and drill down to select a script. Click into the right panel, noticing the available toolbar buttons changing. Press Ctrl-Shift-G and enter a line number to select. Select a script you know has an ancestor; when you do, the button with the up arrow in the lower right will appear enabled. Press the up arrow button to view the ancestor; notice the change in position in the treeview on the left. Press the down arrow to return to the original script. Press the PRINT icon. Select Print Objects / Portions Contents from the supplied list. In the SCRIPTS/VARIABLES section of the PRINT OPTIONS DIALOG , check the PRINT ANCESTORS option, select the Rich Text OUTPUT, and press OK.

June 18, 2008

PBL Peeper Documentation

Page 6 of 111

User Interface Clues


There are some general principles to the user interface that help in navigating around the tool: Watch for microhelp to determine the purpose of a given control. Microhelp is dependent on the control which has focus. Watch for enabled/disabled menu and toolbar items to identify available functionality. Menu and toolbar items are enabled/disabled depending on which control has focus. Watch the stop/go light on the microhelp bar to watch for process completion. There is not usually an opportunity to cancel a process once it is started. Watch the progress meter for process progress.

Universal Control Behaviour


Several controls have functionality that is consistent throughout the tool. This functionality is documented here only. General NEW Opens a new sheet. Options are: PBL Peeper sheet PSR Viewer RTF Viewer Closes the current sheet. Closes PBL Peeper. PBL Peeper parses apart object syntax, and caches the offsets of parts of each object to improve performance when subsequently using that object. It also caches relationships between objects. When objects are changed in PowerBuilder after the object is indexed, PBL Peeper will fail to recognize the change and will make mistakes processing that object. When an object changes, you have the option of refreshing the indexing in the entire application. Initiates action on the current sheet and tab page.

CLOSE EXIT REFRESH APP [CTRL-SHIFTR]

GO [CTRL-G]

B]

BROWSER [CTRL-SHIFT-Switches to the BROWSE PAGE , moving to the current item if one can be identified on the current page.

June 18, 2008

PBL Peeper Documentation

Page 7 of 111

OBJECT FILTER

Allows a definition of a subset of objects within the application to be processed. This definition is with a DataWindow filter expression. Fields available for the filter are the same as initially available from the OBJECT LIST. When an object filter is active, the menu item will be checked and the toolbar button will be depressed. Not all functionality is sensitive to the OBJECT FILTER. On occasion, the splitters between controls on windows or panes have been known to miscalculate and leave one control hidden behind another. RESET SPLITTERS makes an attempt to correct errors by reverting to their original state. Opens a window to set user preferences that determine the behaviour of PBL Peeper. Accept drag and drop from Windows Explorer. Launches Adobe Acrobat with the PBL Peeper documentation. Most options are saved between runs of PBL Peeper, so they are persistent.

RESET SPLITTERS

PREFERENCES File/Directory fields DOCUMENTATION Option selection

Microhelp Line Number Progress Where appropriate (e.g. a script viewer), indicates the line number, row number or page number. Indicates current task progress as an estimated percentage. (This does not necessarily represent a percentage of actual time for task completion.) Shows a red light when PBL Peeper is busy. Shows a green light at other times.

Busy Indicator

Treeview COPY [CTRL-C] EXPAND COLLAPSE Copies the text of the currently selected treeview item onto the clipboard. Expands the sub-tree of the currently selected item, including all contained sub-trees. Collapse every expanded treeview item in the treeview, returning the treeview to its original state.

June 18, 2008

PBL Peeper Documentation

Page 8 of 111

UP BACK FORWARD QUICKFIND

Move up one level in the treeview to the currently selected items parent. A history of movements among treeview items is maintained. These move back and forward along this history list in the same way these work in an Internet browser. An edit field opens in the upper right corner of the treeview. Based on what is typed in this field, current selection moves to an already populated treeview item that matches the entered string. The search looks through labels with the following priority: exact match prefix match substring match Pressing Enter or losing focus from the edit field will leave focus on the found item. Pressing Esc will return to the original treeview item. Moves to and selects the first item in the tree. Moves to and selects the previous item in the tree. Moves to and selects the next item in the tree. Moves to and selects the last item in the tree. Saves the visible portion of the treeview to an text file, with tabs indenting the levels. Expands/collapses current selection.

FIRST PRIOR NEXT LAST SAVE AS Enter Listview CLEAR

Deletes all items in the listview.

SELECT ALL [CTRL-A] Selects all items in the listview. Headings Click on listview heading to sort by that data element. To create a compound sort (e.g. PBL, then Object), Ctrl-Click on the subsequent headings.

June 18, 2008

PBL Peeper Documentation

Page 9 of 111

Script/Portion Viewer SAVE AS COPY [CTRL-C] Saves the script/portion as a file. Copies the selected part of the script or portion to the clipboard

SELECT ALL [CTRL-A] Selects all of the script or portion FIND [CTRL-F] FIND NEXT [F3] GO TO LINE [CTRL-SHIFT-G] WRAP TEXT DataWindow SAVE AS IMPORT SAVE SYNTAX Saves DataWindow data contents to file. Imports a previously saved set of data into the current DataWindow (only DataWindows used for data entry). Saves the current DataWindow syntax to a file so that the DataWindow can be reproduced and saved DataWindow contents can be imported. Note that some commands change the structure of the DataWindow, so a saved syntax from a DataWindow may not be able to import all data exported from that DataWindow at other times. Prints DataWindow contents. Toggles the print preview mode of the DataWindow. Displays the page setup dialog to select settings for printing. Reverses the last data editing, when applicable. Cuts the currently selected text or data to the clipboard. Copies the currently selected text or data to the clipboard. Pastes into the current field. Finds a string in the script/portion. Resumes the previous find from the current position using the previous settings. Moves to and selects a specified line. Wraps the displayed text to the size of the viewer.

PRINT [CTRL-P] PRINT PREVIEW PAGE SETUP UNDO [CTRL-Z] CUT [CTRL-X] COPY [CTRL-C] PASTE [CTRL-V]

June 18, 2008

PBL Peeper Documentation

Page 10 of 111

CLEAR

Removes selected text from the current field.

SELECT ALL [CTRL-A] Selects all the text in the current field. BACK FORWARD QUICKFIND A history of movements among rows is maintained. These move back and forward along this history list in the same way these work in an Internet browser. An edit field opens over the header above the column that currently has focus. Based on what is typed in this field, current selection moves to the first row where that column matches the entered string. The search looks with the following priority: exact match prefix match substring match Pressing Enter or losing focus from the edit field will leave focus on the found row. Pressing Esc will return to the original row. A filter is created based on the current column and the value in it. For example, if a row on the Object List is selected with the cursor in the Type column, QUICKFILTER might create a filter type=window. Prompts for a row number, and scrolls to the entered row. Magnification control. Click on DataWindow heading to sort by that data element. (While not always implemented, it is usually implemented in grid DataWindows with 3D raised borders on the headings.) To create a compound sort (e.g. by PBL, then by Object), click the first heading then Ctrl-Click subsequent headings in sequence.

QUICKFILTER

GO TO LINE [CTRL-SHIFT-G] ZOOM Headings

Rich Text Window SAVE AS PRINT [CTRL-P] PRINT PREVIEW UNDO [CTRL-Z] CUT [CTRL-X] Saves rich text window contents to file as either text or rich text, depending on the file extension. Prints the rich text window contents. Displays a preview of the print. Reverses the last data editing, when applicable. Cuts the currently selected text or data to the clipboard.

June 18, 2008

PBL Peeper Documentation

Page 11 of 111

COPY [CTRL-C] PASTE [CTRL-V] CLEAR

Copies the currently selected text or data to the clipboard. Pastes into the document. Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document. FIND [CTRL-F] FIND NEXT [F3] FIRST PRIOR NEXT LAST Finds a string in the rich text window contents. Resumes the previous find from the current position using the previous settings. Moves to the first page. Moves to the previous page. Moves to the next page. Moves to the last page.

Technical Information
With the exception of a DLL for some string functions written in C for performance, the application is entirely written in PowerBuilder, using native PowerBuilder controls. A COM object built in PowerBuilder 9 is deployed to handle reading of ANSI/DBCS PBLs. PBL Peeper was built using PowerBuilder Foundation Classes as the cornerstone

Acknowledgments
Tony Cook has supplied C code for string parsing. This has speeded some processes up significantly. Roy Kiesler has also helped me through C code issues and has been a source for much WinAPI information.

June 18, 2008

PBL Peeper Documentation

Page 12 of 111

PBLs Page

When a PBL Peeper sheet opens, and no application-selecting command line parameters have been supplied, the PBLS PAGE will be selected. The purpose of this page is to select which PBLs (or other object containers, like file system folders containing object exports) the rest of the pages in this sheet in PBL Peeper will work with. The rest of the documentation will refer to this set of PBLs and/or containers as the application, although this set of PBLs and/or containers does not have to correspond to a PowerBuilder applications set of PBLs.

Source: Treeview
When using the TREEVIEW interface, the treeview on the left will have available drive items and PowerBuilder application items. In order to select PBLs for the PBL Peeper application, drag items from the treeview on the left to the listview on the right. Alternate methods for selecting an item are pressing Enter and double clicking, although double clicking an item that has children will revert to the native treeview behavior of expanding the item. Selecting an item will bring with it all PBLs belonging to the item.

June 18, 2008

PBL Peeper Documentation

Page 13 of 111

The drive items in the treeview provide to access drives, folders and subsequently PBLs, PBTs (targets) and PBWs (workspaces). Dragging across a PBL will move that individual PBL into the list of selected PBLs. Dragging across a target or workspace will select all PBLs that belong to those. If SCAN FOR PB FILES is selected, dragging a folder across will bring across all PBLs in the subtree beneath that folder, not just PBLs in that folder directly. If SCAN FOR EXPORT FOLDERS is selected, directories containing export files (*.sr*) will be selected, and the folders treated as PBLs. Dragging across a drive will select all PBLs or exports on the drive. PBL Peeper provides a list of applications from each version of PowerBuilder or compatible PowerBuilder products it finds on the system. Below each are workspaces, targets or applications, as appropriate, found in their respective PB.INI files or registry settings, and in turn the PBLs associated with each. If a PBL can no longer be found, its icon will have a red circle with a slash through it. Selecting a PBL that is no longer available for the PBL Peeper application will result in an warning message. Dragging an application icon across will bring all the PBLs associated with that application.

June 18, 2008

PBL Peeper Documentation

Page 14 of 111

Source: Text

When using the TEXT interface, there is a FILE SPEC field in which to enter a file specification of PBLs, PBTs or PBWs to transfer. You can build this file specification with the SELECT DIRECTORY and SELECT FILE buttons. The INCLUDE SUBDIRECTORIES checkbox will indicate whether you want PBL Peeper to go through the subdirectories beneath the specified directory in order to find other matches to the file specification. The TRANSFER button will load the specified files into the listview on the right.

June 18, 2008

PBL Peeper Documentation

Page 15 of 111

Source: Grid

The GRID interface provides a list of applications and targets found in all versions. The list has all the standard amenities provides by other lists, including Sort, Filter, Find, QuickFilter and QuickFind. The list maintains the sort and filter between runs. To select an application or target, double click it or drag it to the listview.

Selected: Listview
The listview on the right shows the list of PBLs or export folders selected. At start up, unless an application-selecting command line parameter has been provided, the listview on the right will be empty. See the notes on each interface to see how to select PBLs or export folders. To remove PBLs or export folders from PBL Peepers application list, select them in the listview and press Delete. (Note that this does not delete the files from the hard disk; it merely removes them from the list.) The listview on the right also accepts PBLs, PBTs, PBWs and folders dragged and dropped from Windows Explorer. The behaviour when a folder is dropped depends on whether SCAN FOR EXPORT FOLDERS or SCAN FOR PB FILES is selected, as described above.

June 18, 2008

PBL Peeper Documentation

Page 16 of 111

Browse Page

The purpose of the browse page is to view what portions make up each object and to view the contents of those portions. The left panel is a tree of PBLs, objects and their portions. The right panel displays the contents of the portion selected in the left panel. The up arrow will move both panels to the ancestor of the currently selected object, if one is available. The down arrow operates similarly to a browser's "Forward" button, returning the panels to the descendant portion only if the currently displayed portion was arrived at by pressing the ancestor/up arrow button. When an object is selected, its comments appear in the microhelp line. Objects may have a second icon to qualify its definition (e.g. object u_dw may have both a user object icon and a DataWindow icon). Available menu items PRINT [CTRL-P] Print will bring up a selection list of options.

June 18, 2008

PBL Peeper Documentation

Page 17 of 111

Print object/portions contents

Will produce a printout of the object/portion currently selected in the left panel, plus any portions beneath it in the tree (for example, if a PBL is selected, a print out for all objects in the PBL will be produced). A dialog for print parameters, including the print destination such as Printer or Rich Text Window, will be produced. See also the PRINT OPTIONS WINDOW documentation. Prints the tree (left panel) as currently displayed. Prints a subtree of the tree (left panel) from the currently selected item. The QUICKFIND for this treeview works the same as the standard QUICKFIND , except that before searching, PBLs are populated with object lists if they havent been already. This ensures that all object names are available for QUICKFIND . When focus is on the treeview (left panel), the standard user interface in the upper right corner appears. When focus is on the right panel, quickfind searches for a match of the selected text.

Print entire tree Print tree from selected item QUICKFIND

Available alternate mouse button menu items Left panel FIND ... QuickFind Find in this object Find elsewhere COPY Name Qualified Name Prototype Subtree Contents Title/Contents Copies the name of the current element to the clipboard. Copies the name, qualified from the PBL name to the current element, to the clipboard. If the current element is a script, copies the script prototype. Copies the text representation of the current subtree to the clipboard Copies the contents of the object to the clipboard. Copies the name and the contents of the object, separated by two line feeds, to the clipboard. Activates the QUICKFIND interface. Search for one or more strings in the selected object. Search for the name of the selected item in other objects.

June 18, 2008

PBL Peeper Documentation

Page 18 of 111

GO TO DATA SET COLUMN GO TO DEFAULT DW PRINT Entity

Jumps from the DataWindow column to the corresponding data set column. If a design time default dataobject has been assigned, focus is moved to that DataWindow object, if found. Print will bring up a selection list of options. Will produce a printout of the object/portion currently selected in the left panel, plus any portions beneath it in the tree (for example, if a PBL is selected, a print out for all objects in the PBL will be produced). A dialog for print parameters, including the print destination such as Printer or Rich Text Window, will be produced. See also the PRINT OPTIONS WINDOW documentation. Prints the tree (left panel) as currently displayed. Prints a subtree of the tree (left panel) from the currently selected item.

Tree Subtree

June 18, 2008

PBL Peeper Documentation

Page 19 of 111

Lists Page
The lists display objects, controls, scripts, DataWindow controls, DataWindow columns or external functions and related attributes. Lists can be filtered and sorted. More information on each entity can be displayed on request. When a list is displayed, its columns are automatically sized to be wide enough to only show the data contained in the column (see PREFERENCES WINDOW , Width Style). To build your own report using the data collected in these pages, use the File / Save As menu item to save the data, and the File / Save Syntax menu item to save the DataWindow syntax. Importing the saved DataWindow syntax into PowerBuilder will allow you to view the external data source format to see how the data is stored. Building another DataWindow with the same external data source definition will allow you to import the saved data.

Available menu items SORT Displays a dialogue to sort available data. The type of dialog displayed is dependent on the selection in the PREFERENCES WINDOW . Displays a dialogue to filter available data. The type of dialog displayed is dependent on the selection in the PREFERENCES WINDOW . Searches from the current point on the list for a substring in a specified column. Resumes the previous find from the current row using the previous settings. Based on the objects represented in the unfiltered portion of the list, an Object Filter will be generated. This Object Filter will use an internal ID to represent the objects. Based on the objects represented in the rows selected on the list, an Object Filter will be generated. This Object Filter will use an internal ID to represent the objects.

FILTER

FIND [CTRL-F] FIND NEXT [F3] OBJECT LIST SET OBJECT FILTER FROM LIST OBJECT LIST SET OBJECT FILTER FROM SELECTED

June 18, 2008

PBL Peeper Documentation

Page 20 of 111

Containers

The Containers list displays a list of PowerBuilder objects containers and their attributes. While an object container in PowerBuilder is usually a PowerBuilder Library (PBL), in PBL Peeper it can also be a file system folder containing object exports. An object container count is available at the bottom of the list. Fields CONTAINER PATH COMMENT CONTAINER TYPE LAST MODIFIED The name of the object container. The fully pathed name of the container The comment of the PBL. (Not applicable to folders PBL or folder. The date of the last modification of the container.

June 18, 2008

PBL Peeper Documentation

Page 21 of 111

Available menu items SAVE AS PRINT [CTRL-P] Saves the contents of the DataWindow to a file. Prints the list DataWindow on the page.

June 18, 2008

PBL Peeper Documentation

Page 22 of 111

Objects

The Objects list displays a list of PowerBuilder objects and their attributes. In this case, object is defined as a class, and/or an object that one would see in a library list in PowerBuilders library painter. An object count and sums of numeric columns (e.g. size and source size) of the visible objects are available at the bottom of the list. Fields OBJECT PBL The name of the object. The name of the PBL containing the object. The path of the filename is not included unless it is required to uniquely identify the PBL in the current application. The comments associated with the object. The PowerBuilder type of the object (e.g. window).

COMMENTS TYPE

June 18, 2008

PBL Peeper Documentation

Page 23 of 111

DATE TIME Available menu items SAVE AS Save list (DataWindow) Export selected objects PRINT [CTRL-P] Print selected objects' contents Print list of objects SHOW Ancestor information Duplicates only / All objects

The last compiled date / time stamp on the object.

Saves the contents of the DataWindow to a file. Exports objects corresponding to the selected rows to individual export files. Displays a list of print options. For each object selected produces a full printout in the same style as the BROWSE PAGE S object print. See also the PRINT OPTIONS WINDOW documentation. Prints the list DataWindow on the page. Displays a list of options to show additional details in the list. Shows the objects ancestor and UserObject type. Duplicates only will show only objects where there are two or more objects with the same name. The next time the SHOW item is select, the option to reset this filter, All objects, will be displayed instead of Duplicates only. Indicates which user objects are autoinstantiate. Shows the number of physical lines in the source (export) of an object Shows the size (in characters) of the object export. Shows the data source type (Select, Procedure, External) and the DataWindow presentation style (Grid, RichText, etc...). Shows the count of how many times a selected string is found in each object.

Autoinstantiate Object line count Source Size DataWindow attributes Find Count...

June 18, 2008

PBL Peeper Documentation

Page 24 of 111

Attributes...

Brings up a dialog to enter a set of attributes. The attributes are displayed in the list. If resolving of attributes is requested, the ancestor objects will be searched if the attribute is not overridden in a particular object. If resolving is not requested, only overridden attributes will display.

June 18, 2008

PBL Peeper Documentation

Page 25 of 111

Scripts

The Scripts subpage displays a list of scripts that are contained in PowerBuilder objects and the scripts attributes. Fields SCRIPT OWNER OBJECT PBL The name of the script. The name of the control that the script belongs to. The name of the object containing the script. The name of the PBL containing the object. The path of the filename is not included unless it is required to uniquely identify the PBL in the current application. The full definition of the script, including parameter list and return type.

DEFINITION

June 18, 2008

PBL Peeper Documentation

Page 26 of 111

SIZE TYPE SCOPE GHOST

The size of the source of the script, in bytes. The type of script: event or function. The scope of the function: public, private or protected. When resolve level is set to Scripts (see PREFERENCES window), indicates whether the function or event is listed because there is script in this object for that method (GHOST is No) or because the function or event is inherited from an ancestor (GHOST is Yes). The scripts owners system type (e.g. window, command button).

OWNER TYPE

Available menu items PRINT [CTRL-P] Print selected scripts' contents Print list of scripts SHOW Extended Displays a list of print options. Produces a printout for all scripts selected. See also the PRINT OPTIONS WINDOW documentation. Prints the list DataWindow on the page. Displays a list of options to show additional details in the list. Shows several fields relating to whether or not the script extends or overrides an ancestor script. The following are the fields that are shown: For events, indicates whether the event is extended or overridden. (This field no longer tries to indicate whether or not the script has an ancestor.) Indicates whether or not the script has an implemented ancestor. If the script has only empty ancestor scripts, the field indicates No. For events, shows whether the event is a system defined event or a custom defined event. For custom defined events, indicates whether the owner or one of its ancestors defines the event.

EXTENDED

SCRIPTED ANCESTOR EVENT TYPE CUSTOM DEFINITION

June 18, 2008

PBL Peeper Documentation

Page 27 of 111

OWNER HAS ANCESTOR

Indicates whether or not the object or control that owns the script has a non-system ancestor. (This is a factor in determining whether or not a script could potentially have an ancestor Shows the count of physical lines in the script. Shows the number of arguments the script takes. Searches each script for a specified string or strings and lists the count of each one in a column.

Line Count Argument Count Find Count...

June 18, 2008

PBL Peeper Documentation

Page 28 of 111

Controls

The Controls list displays a list of controls (or other subclasses) that are contained in PowerBuilder objects (or classes) and their attributes. In PBL Peeper 7 or greater, this includes embedded non-visual object subclasses. Fields CONTROL CONTAINERS The name of the control. The names of the controls that contain the given control. If more than one control contains the given control, the control names are separated by a ` character. The name of the object containing the control.

OBJECT

June 18, 2008

PBL Peeper Documentation

Page 29 of 111

PBL

The name of the PBL containing the object. The path of the filename is not included unless it is required to uniquely identify the PBL in the current application. The name of the controls ancestor. When resolve level is set to Controls or Scripts (see PREFERENCES window), indicates whether the control is listed because the control is either declared or modified in that object (GHOST is No) or because the control is inherited from an ancestor (GHOST is Yes).

ANCESTOR GHOST

Available menu items PRINT [CTRL-P] Print selected controls' contents Print list of controls SHOW Ancestor information Attributes... Displays a list of print options. Produces a printout of attributes for all controls selected. See also the PRINT OPTIONS WINDOW documentation. Prints the list DataWindow on the page. Displays a list of options to show additional details in the list. Shows the controls object type. Brings up a dialog to enter a set of attributes. The attributes are displayed in the list. If resolving of attributes is requested, the ancestor controls will be searched if the attribute is not overridden in a particular object. If resolving is not requested, only overridden attributes will display.

June 18, 2008

PBL Peeper Documentation

Page 30 of 111

DataWindow Controls

The DataWindow Controls list displays a list of controls found in all DataWindows and the DataWindow controls attributes. Fields CONTROL OBJECT PBL The name of the DataWindow control. The name of the DataWindow. The name of the PBL containing the control. The path of the filename is not included unless it is required to uniquely identify the PBL in the current application. The type of DataWindow control (e.g. column, text, compute). The edit style of the control (e.g. checkbox, editmask).

TYPE STYLE

June 18, 2008

PBL Peeper Documentation

Page 31 of 111

Available menu items PRINT [CTRL-P] SHOW Data set column name Column data type SELECT column Prints the list DataWindow on the page. Displays a list of options to show additional details in the list. For column controls, the name of the column in the data set that is associated to the control. For column controls, the data type in PowerBuilder nomenclature of the column associated with the control. For column controls, the expression in the SQL SELECT statement that represents the column in the data set that is associated with the control. Brings up a dialog to enter a set of attributes. The attributes are displayed in the list. If resolving of attributes is requested, the DataWindow will be created and a Describe() performed against it. If resolving is not requested, only attributes explicitly set in the export will display. Attributes cannot be gathered on unnamed DataWindow objects.

Attributes...

June 18, 2008

PBL Peeper Documentation

Page 32 of 111

DataWindow Columns

The DataWindow Columns list displays a list of data set columns found in all DataWindows and the DataWindow columns attributes. Fields COLUMN NAME OBJECT PBL The name of the DataWindow column. The name of the DataWindow. The name of the PBL containing the column. The path of the filename is not included unless it is required to uniquely identify the PBL in the current application. The sequence within the data set of the column. (Column numbers can be used for many DataWindow functions in PowerScript.)

COL #

June 18, 2008

PBL Peeper Documentation

Page 33 of 111

DB NAME DATA TYPE UPDATEABLE WHERE CLAUSE KEY

The DBName attribute of the column. PowerBuilder uses this name internally. The columns data type in PowerBuilder terms. An indicator that shows if the DataWindow includes the column in its Update specifications. An indicator that shows if the DataWindow uses the column in building the WHERE clause for UPDATE statements. An indicator that shows whether or not the DataWindow considers the column to be a key column with respect to updates. When key columns are changed in an existing row, the DataWindow may issue either an UPDATE or a DELETE and INSERT, depending on a setting in the DataWindow.

Available menu items PRINT [CTRL-P] SHOW SELECT column Prints the list DataWindow on the page. Displays a list of options to show additional details in the list. The expression in the SQL SELECT statement that represents the column in the data. In the case of UNIONs, the column from the first SELECT is shown. Shows the UI columns that are linked to this column as a data source. (Does not include references to this column in expressions.) Brings up a dialog to enter a set of attributes. The attributes are displayed in the list. If resolving of attributes is requested, the DataWindow will be created and a Describe() performed against it. If resolving is not requested, only attributes explicitly set in the export will display. Attributes cannot be gathered on unnamed DataWindow objects.

UI Elements

Attributes...

June 18, 2008

PBL Peeper Documentation

Page 34 of 111

External Functions

The External Functions list displays a list of all external functions found in the application. Fields FUNCTION OBJECT PBL The name of the external function. The name of the object containing the external function declaration. The name of the PBL containing the object. The path of the filename is not included unless it is required to uniquely identify the PBL in the current application. Function or subroutine, depending on whether the external function returns a value or not. The data type of the external functions return value.

FUNCTION TYPE RETURN TYPE

June 18, 2008

PBL Peeper Documentation

Page 35 of 111

LIBRARY ALIAS FOR PROTOTYPE ANSI

The name of the external library containing the external function. The alias for the external function. The complete external function prototype. Flag reflecting the ANSI flag in the Alias clause of the prototype.

Available menu items PRINT [CTRL-P] Prints the list DataWindow on the page.

June 18, 2008

PBL Peeper Documentation

Page 36 of 111

Find Page

The purpose of this page is to find occurrences of one or more strings. The results, with requested context, are displayed in a rich text window, or in a DataWindow list window. The page is made up of two panels, top and bottom. The purpose of the top panel is to enter one or more items to search for, as well as parameters specific to each individual item. The purpose of the bottom panel is to enter overall parameters for the search.

Available menu items OBJECT FILTER Allows a definition of a subset of objects within the application to be searched. This definition is with a DataWindow filter expression. Fields available for the filter are the same as initially available from the OBJECT LIST. When an object filter is active, the menu item will be checked and the toolbar button will be depressed.

June 18, 2008

PBL Peeper Documentation

Page 37 of 111

Top Panel Fields CONTAINING MATCH TYPE Character by Character Match() Expression The string to search for. Determines how the CONTAINING field is to be used to identify string matches in scripts and portions. Matches using the exact contents of the CONTAINING field. Compares the expression in the CONTAINING field against physical lines in the portion, using the Powerscript Match() function. Because of the nature of this option, it will ignore Whole Word Only, Ignore Comments and Ignore Quotes options. Match expression characters for the start and end of a string (^ and $) will be matched to the start and/or end of physical lines in the script. If checked, matches cannot be substring of another word or identifier. This is defined as the character before and the character after the matched string are not characters that are valid characters for a PowerBuilder identifier or variable. If checked, matches the CONTAINING field by matching as specified by the MATCH TYPE, but ignoring case.

WHOLE WORD ONLY

CASE INSENSITIVE

Available menu items ADD ROW INSERT ROW DELETE ROW CLEAR ROWS Adds a row to the bottom of the list of search criteria. (Note: Order of search items is inconsequential.) Inserts a row before the currently selected row of search criteria. Deletes the currently selected row. Removes all rows.

June 18, 2008

PBL Peeper Documentation

Page 38 of 111

Bottom Panel Fields PORTION TYPES Identifies which set of portions are to be searched. This is used to restrict the search only to portions that are desired, such as scripts only. Functions and events only. Functions, events, instance variable declarations, shared variable declarations, global variable declarations. DataWindow objects only. All objects, all portion types. Include in output matches that are found in comments. Excluding matches contained in comments slows the search, as the context of each match has to be evaluated with respect to comments. Include in output matches that are found in quotes. Excluding matches contained in quotes slows the search, as the context of each match has to be evaluated with respect to quotes. Identifies the desired output when a match is found. The name of the object, identified with its PBL name, is output. This is the fastest output type, as the object does not have to be indexed when a match is found. If this option is selected, the PORTION TYPES field is ignored and only the existence of the string within the object is verified. The PBL, object and script or portion names are output. The PBL, object, script name and contents of the scripts or portions are output. When DATA WINDOW OUTPUT is checked, this option will default to Context Lines, since DataWindows dont display multi-page scripts well.

Scripts Scripts & Variables DW Objects All INCLUDE COMMENTS

INCLUDE QUOTES

OUTPUT TYPE Object Name

Script Name Entire Script

June 18, 2008

PBL Peeper Documentation

Page 39 of 111

Context Lines

The PBL, object, script name and the context lines around the matches are output. When this output type is selected, a field for number of context lines becomes available. Entering zero in this field will output the code line that the match is found in, including portions of code lines extended with the ampersand (This does not work with matches found in SQL statements). Entering a non-zero number will output the physical line containing the match, plus the specified number of physical lines before and after the matching line. This is the slowest output type, as the context has to be determined, and multiple contexts have to be merged if overlapping. Determines where extra page breaks are inserted into the output. No extra page breaks are inserted. Only page breaks that the rich text edit field puts in because of the volume of text appear. Page breaks are inserted whenever output for a new object starts. Page breaks are inserted whenever output for a new script starts. When directing output to rich text, found elements that are using Character By Character will be bolded, if the text is shown. This may slow output processing somewhat, but will make matches easier to find in the output, especially when showing Entire Script or a number of Context Lines. This will direct the output of the Find to a DataWindow, with regular Sort, Filter and Find functionality. In addition, you can link back to the BROWSE page through the BROWSE toolbar button or menu item, and can generate Object Filters based on the list. Options specific to rich text, like BOLD MATCHES or PAGE BREAKS are ignored. Checking this will search for all instances of the search targets, and provide an item by item count summary. The level of detail of the counts will depend on the OUTPUT TYPE. When DATA WINDOW OUTPUT is checked, and OUTPUT TYPE is Context Lines, this option does not produce any results, although the DATA WINDOW OUTPUT option provides some of its own counting natively.

PAGE BREAKS None Between Objects Between Scripts BOLD MATCHES

DATA WINDOW OUTPUT

COUNT OCCURRENCES

June 18, 2008

PBL Peeper Documentation

Page 40 of 111

SUPPRESS ZEROES

When the count of a search target is zero, the count is not reported when COUNT OCCURRENCES is checked.

June 18, 2008

PBL Peeper Documentation

Page 41 of 111

Reports Page

The Reports page will produce one or more reports based on the current application. The reports will be output to individual rich text or DataWindow windows. To select the report for output, simply check the box. The Go button or menu item will initiate the processing of all the checked reports. Any parameters that any of the reports required will be prompted for before any report generation starts. The OBJECT FILTER will be respected for reports that specify in the description. Available Reports Application Print Prints all the objects in the application. The Print Options dialog is provided to define elements of the printed objects and the print destination. The OBJECT FILTER will be respected if defined.

June 18, 2008

PBL Peeper Documentation

Page 42 of 111

Comments Extract

Dumps all comments from each script and variable declarations. Each script starts with a script name title at the top of a new page. The OBJECT FILTER will be respected if defined. Lists in a DataWindow all database columns used in an application, grouped by table, and indicates where they are used. The OBJECT FILTER will be respected if defined. Lists where all DataWindow objects are used. Includes a search for simple dynamic assignment. Also lists the DataWindow objects whose usage cant be identified. Lists the SQL and the column data types for each DataWindow. The report will first give you the option of selecting a database profile. This database profile, if selected, will be used to evaluate the DataWindow internal format of SQL. The OBJECT FILTER will be respected if defined. Converts DataWindow data sets to variable definitions. (This supports creation of Custom Classes to assign or retrieve rows of data with dot notation.) Lists all the expressions found for various attributes in DataWindows. Lists all the embedded SQL in scripts. The OBJECT FILTER will be respected if defined. Lists the inheritance trees of windows, menus, nonvisual classes (user objects) and visual classes (user objects). The visual classes tree optionally includes all controls or other subclasses (such as embedded non-visual) that are inherited from the user object classes. If controls are included in the report, then a list of system inherited controls are included. For all DataWindows, builds a set of of_Register() statements needed for the PFC MultiTable DataWindow Service. The OBJECT FILTER will be respected if defined. Lists objects and the other objects that they reference. The algorithm is simply searching for object names. The report also produces a list of objects that are unreferenced. References from objects in the unreferenced list are removed from the references list, and the list division is re-evaluated. This is done recursively until the two sets dont change.

Database Column Usage

DataWindow Object Usage

DataWindow SQL

DataWindow to Variables

DWObject Expressions Embedded SQL Extract Inheritance

MultiTable Registry Stmts

Object Cross-Reference

June 18, 2008

PBL Peeper Documentation

Page 43 of 111

Orphaned ItemChanged PBR Builder Plus

Report columns in ItemChanged events with non-visible columns or columns with no UI presence. Builds a simple PBR based on assigned attributes (does not discover attributes assigned dynamically in scripts). It produces a PBR based on a conservative approach, including all graphics detected in all objects and all DataWindows. It also produces script that will force the inclusion of all windows and user objects into the executable. Takes all DataWindow SQL and evaluates it against the selected database. If it fails, the error is reported. An option exists to suppress output for success SQL compiles, showing only DataWindows that have problem SQL. The OBJECT FILTER will be respected if defined.

Verify DW SQL

June 18, 2008

PBL Peeper Documentation

Page 44 of 111

Trace Page

PowerBuilder provides a tracing tool for determining where your application has executed (search for PBDEBUG in the PowerBuilder online manuals). It produces a text file with a line for every instruction executed. While this provides invaluable information, the file is cumbersome and awkward to read. The trace page converts this trace file into a tree view in the left panel, displaying and loading into memory only what you request (these trace files can become over 100M in size very quickly, while the portion you want to review may represent a very small portion of that). The right panel displays the script corresponding to the line of the trace file selected in the tree view. If the selected item in the treeview indicates a line number, a line in the script viewer in the right panel is highlighted. This page is available without selecting any PBLs. Without selecting PBLs, the trace file is loaded into the treeview but no scripts are displayed. Loading too many items into the treeview can be a problem and cause PBL Peeper to crash. This can happen, for example, when the problem you are identifying is caused by an infinite loop, and

June 18, 2008

PBL Peeper Documentation

Page 45 of 111

the trace file has millions of executed lines for one function. If a threshold (set in PREFERENCES) is passed, a prompt will give you the option of continuing or not. If the load is continued, the prompt will be presented every time that number of additional lines is being loaded. To additionally minimize the quantity of information displayed, you can tell PBL Peeper to skip the lines in the DBG file that indicate which individual lines have been executed (see PREFERENCES). The binary profiling/trace files cannot be read into this page. Available Menu Items DELETE ROWS Discards lines from the trace file for further searching. Lines can be discarded either before or after the currently selected item. In both cases, evaluation is done relative to the root level parent of the currently selected item. Searches for a specified substring in the trace file from the currently selected item in the trace treeview (left panel). Once found, the portion of the trace file required to display the match are loaded. Resumes the previous find from the current position using the previous settings. Loads a new trace file

FIND [CTRL-F]

FIND NEXT [F3] GO [CTRL-G] or OPEN SHOW Alternate script

If available, offers a selection of overloaded scripts (scripts with the same name) to display in the script viewer (right panel) instead of the script PBL Peeper has selected. Shows only the call stack of the currently selected item in the trace treeview (left panel). See also the TRACE CALL STACK WINDOW .

Current call stack

June 18, 2008

PBL Peeper Documentation

Page 46 of 111

Call stacks matching...

Prompts for a value to search for. Then, a window will display all lines containing a match for the entered string, plus the call stacks for those lines. Call stacks that overlap will be merged, giving a clearer picture of where the matching lines were executed relative to each other. See also the TRACE CALL STACK WINDOW .

Non-standard trace lines PRINT [CTRL-P] Print entire tree Print tree from selected item

Shows lines that dont usually show up in trace files. This will find any unexpected messages. Very rarely, error messages that dont show up anywhere else are logged here. Shows a list of print options. Prints the tree. Prints a subtree of the tree from the currently selected item.

June 18, 2008

PBL Peeper Documentation

Page 47 of 111

Trace Call Stack Window

This window displays the results of SHOW / CURRENT CALL STACK and SHOW / CALL STACKS MATCHING .... This shows selective portions of the currently loaded trace file, with highlighted items marked with a red check mark. Double clicking on an item in this window highlights that item in the requesting TRACE PAGE , bringing up its script as appropriate. Controls COPY SAVE AS PRINT OK CANCEL Copies text of tree content to clipboard Saves the contents of the tree to an ASCII text file. Prints the contents of the tree on this window. Returns to the TRACE PAGE , highlighting on the TRACE PAGE the item that is currently selected on this window. Returns to the TRACE PAGE , not changing the highlighted item.

June 18, 2008

PBL Peeper Documentation

Page 48 of 111

Exports Page
The first subpage represents what was the original function of what became PBL Peeper. The opportunity provided by the mass export and import is the power to use standard text oriented tools to make mass changes to objects. The OBJECT FILTER will be respected if defined. The files saved will be in ANSI or Unicode, depending on the type of PBLs selected. If a mix of PBLs have been selected, PBL Peeper will prompt for the file type to use. Import functionality has been disabled until future releases.

June 18, 2008

PBL Peeper Documentation

Page 49 of 111

Mass

The purpose of the Mass page is to deal with a full set of exports for the entire application. Export is for producing an export file for all objects in the current application. Import will be disabled until a future release.

Available menu items OBJECT FILTER Allows a definition of a subset of objects within the application to be exported. This definition is with a DataWindow filter expression. Fields available for the filter are the same as initially available from the OBJECT LIST. When an object filter is active, the menu item will be checked and the toolbar button will be depressed. Initiates the export, import, or the export and then the import, as selected.

GO

June 18, 2008

PBL Peeper Documentation

Page 50 of 111

Fields EXPORT EXPORT DESTINATION Selects exporting of all objects in the current application to files. Specifies the base directory for export files. If SUBDIRS is not selected, the export files will be placed in this directory. Files Objects.txt and PBLs.txt will be placed in this directory, which are used for subsequent imports. If populated, object files will be named using the same names as a previous mass export in the specified directory If selected, new objects will be exported with sequential numbers for file names instead of using object names (serial numbers are appended when duplicate names are detected). If selected, subdirectories will be created below the EXPORT DESTINATION using the names of the PBLs. Export files will be placed in the subdirectory corresponding to the objects PBL. Disabled until a future release. Selects importing of a series of export files into new PBLs. IMPORT SOURCE MAKE IMPORT SOURCE SAME AS EXPORT DESTINATION IMPORT DESTINATION MAKE IMPORT DESTINATION SAME AS IMPORT SOURCE Specifies the base directory for import files. Specifies that the base directory for import files be the same as the export destination. This is useful when bootstrapping the current application into a new set of PBLs. Specifies the destination directory for the new PBLs. Specifies that the destination directory for the new PBLs be the same as the directory containing the source files.

EXPORT SYNCHRONIZATION USE SERIAL NUMBERS

SUBDIRS

IMPORT

June 18, 2008

PBL Peeper Documentation

Page 51 of 111

Process Page
This page and its subpages provide a means of making changes throughout the application. Available menu items OBJECT FILTER Allows a definition of a subset of objects within the application to be processed. This definition is with a DataWindow filter expression. Fields available for the filter are the same as initially available from the OBJECT LIST. When an object filter is active, the menu item will be checked and the toolbar button will be depressed. Initiates script processors for all subpages.

GO [CTRL-G] Fields COMPILE

Disabled until a future release. When this option is checked, PBL Peeper will try to compile changed objects into the current set of PBLs. This option should be selected only if PBL Peepers PowerBuilder version matches the version of the PBLs PowerBuilder down to the build. When this option is checked, export files are created for changed objects. These can be reviewed before importing with PowerBuilder. The files saved will be in ANSI or Unicode, depending on the type of PBLs selected. If a mix of PBLs have been selected, PBL Peeper will prompt for the file type to use.

EXPORT

June 18, 2008

PBL Peeper Documentation

Page 52 of 111

Replace

The purpose of the Replace subpage is to provide global search and replace functionality. Fields SEARCH FOR REPLACE WITH MATCH CASE WHOLE WORD ONLY The string to search for to be replaced. The string to replace the match with. If checked, matches the SEARCH FOR text by matching character for character, including case. If checked, matches of SEARCH FOR text cannot be substring of another word or identifier. This is defined as the character before and the character after the matched string are not characters that are valid characters for a PowerBuilder identifier or variable.

June 18, 2008

PBL Peeper Documentation

Page 53 of 111

IGNORE COMMENTS

If checked, ignores matches of SEARCH FOR text that are found in comments. Excluding matches contained in comments slows the search, as the context of each match has to be evaluated with respect to comments. If checked, ignores matches of SEARCH FOR text that are found in quotes. Excluding matches contained in quotes slows the search, as the context of each match has to be evaluated with respect to quotes. Search and replace is done against scripts and variable declaration portions. Search and replace is done against SQL in DataWindows. If a replace is required, the resultant SQL will be stored in the DataWindow in syntax format, regardless of whether it was in graphical format before. Extreme caution is advised when using this option. Developers without extensive knowledge of object internals are discouraged from using this option. This will search and replace through all portions of all objects.

IGNORE QUOTES

SCRIPTS & VARIABLES DATA WINDOW SQL

UNIVERSAL

June 18, 2008

PBL Peeper Documentation

Page 54 of 111

Remove

This script processor removes lines of code that contain matches to supplied strings. The removal can be either with comment markings, or with physical removal from the script. Fields REMOVE CODE LINES CONTAINING MATCH CASE WHOLE WORD ONLY The string to search for a match. If checked, matches the CONTAINING text by matching character for character, including case. Matches cannot be substring of another word or identifier. This is defined as the character before and the character after the matched string are not characters that are valid characters for a PowerBuilder identifier or variable.

June 18, 2008

PBL Peeper Documentation

Page 55 of 111

IGNORE QUOTES

Ignore matches that are found in quotes. Excluding matches contained in quotes slows the search, as the context of each match has to be evaluated with respect to quotes. Identifies the method to remove code lines that contain matching strings. Adds comment markings so that the code line will be ignored by PowerBuilder. Physically removes the code lines from the scripts.

CODE LINE REMOVAL ACTION Comment Remove

June 18, 2008

PBL Peeper Documentation

Page 56 of 111

Format

This formats scripts with standard indentation using tabs. Other features may be added to this page in the future.

June 18, 2008

PBL Peeper Documentation

Page 57 of 111

Other

This page provides a place for other script processors. To select a script processor, check the box beside it. Available script processors GetUpdateStatus() Converter Name Unnamed DW Controls PBMCustom event converter Replaces GetUpdateStatus() parameters with appropriate event parameters. Assigns generated names to DataWindow controls that have no names. Useful when developers forget to assign names, but frameworks require names on all objects. Replaces PBM_Custom## events with unassigned events, so no parameters are required when using new event calling syntax.

June 18, 2008

PBL Peeper Documentation

Page 58 of 111

SetActionCode(#) converter Synchronize DataWindow Data Sets Synchronize DataWindow Edit.Limit

Replace SetActionCode(##) with RETURN ## Synchronizes the data types in the DataWindows' data sets with the database. This is useful if data types in the database have changed since DataWindows have been created. Synchronizes any non-zero edit.limit attribute in DataWindow char columns to the length of the data element.

June 18, 2008

PBL Peeper Documentation

Page 59 of 111

Compare Page
Comparison of PowerBuilder objects cannot be achieved by comparing exports of objects, as the sequence of scripts and controls is not fixed. As a result, comparisons have to be done on a portion by portion basis. This is what the first two comparison pages do. They leverage the functionality of the DOS utility FC in order to compare portions.

Common options SHOW NAMES ONLY When this option is checked, if a difference is recognize, only the name of the object/portion is included in the output. If the option is unchecked, the name is listed as a header, and a comparison is included below. When checked, only scripts and global, shared and instance variable portions are compared. This will exclude system portions and attribute definitions. Leading spaces and tabs are stripped off for the comparison when this option is checked. Blanks lines are removed before the comparison when this option is checked. The function prototype is excluded from the comparison when this option is checked. When checked, comments are removed from the portion before it is compared. With this option, objects modified dates are compared before evaluating the objects. If the dates match, no indexing or comparison is done on the objects. With this option, objects sizes are compared before evaluating the objects. If the sizes match, no indexing or comparison is done on the objects.

SCRIPTS/VARIABLES ONLY

IGNORE HORIZONTAL SPACING IGNORE VERTICAL SPACING IGNORE HEADER/PROTOTYPE IGNORE COMMENTS IGNORE OBJECT WHEN MODIFIED DATES MATCH IGNORE OBJECT WHEN SIZES MATCH

June 18, 2008

PBL Peeper Documentation

Page 60 of 111

Object Compare

This page compares one object in the current application to another in the current application. After selecting an object from the list, the Select Old and Select New buttons select the two object to compare. The distinction between old and new determine whether portions are considered added or deleted when found in one object and not the other.

June 18, 2008

PBL Peeper Documentation

Page 61 of 111

App Compare

This page will compare two versions of an application. Select the old version of the application in the same manner as the PBLs page. The output will list any deleted or added objects, controls or scripts. All other objects will be listed as changed and their contents shown if SHOW NAMES ONLY is unchecked.

Available menu items OBJECT FILTER Allows a definition of a subset of objects within the application to be compared. This definition is with a DataWindow filter expression. Fields available for the filter are the same as initially available from the OBJECT LIST. When an object filter is active, the menu item will be checked and the toolbar button will be depressed.

June 18, 2008

PBL Peeper Documentation

Page 62 of 111

DataWindow Compare

This page will compare the data sets of two DataWindows. This is useful in testing the potential success of functions that share or transfer data sets or portions of data sets, like ShareData() and RowsCopy(). After selecting the two DataWindows from the lists presented after the SELECT DATA WINDOW # button is pressed, the data sets will be shown side by side. The MATCH column indicates the degree of the match between parallel elements of the data set. Columns that match in data type, but not in length, will be labeled with Length in the MATCH column, and will be highlighted in yellow (some functions will pass for these discrepancies, but other problems may arise). Columns that do not match data types will be labeled Data type, and will be highlighted in red. Columns that have no match in the other data set will be labeled Data set length, and will be highlighted in red. The display will also include a line at the bottom that describes the Overall Status result of the comparison of the DataWindows, showing the worst problem identified.

June 18, 2008

PBL Peeper Documentation

Page 63 of 111

Print Options Window

This window is used by the various options that print objects, portions, or sets of objects. It defines the contents and the destination of the output. Fields OBJECTS Attributes System Portions Ancestor List Tree/Show Controls These options will dictate what is printed if an object is being printed. If checked, prints the objects attributes that were overridden within this object. Shows system portions such as Forward Declarations and Global Declarations If checked, prints the objects attributes that were defined in the ancestor objects. If checked, produces a tree indicating the contents of the object, including any contained controls. Display of inherited controls depends on the resolution setting (see PREFERENCES). If checked, includes in the above tree a list of scripts contained in the object. Display of inherited scripts depends on the resolution setting (see PREFERENCES).

Tree/Show Scripts

June 18, 2008

PBL Peeper Documentation

Page 64 of 111

CONTROLS

If checked, the output will include all controls and subclasses (such as embedded classes or NVOs), according to the selected options below. If unchecked, controls and scripts will be left out of the output, with the exception of the objects tree if that option is selected. If checked, the output will include the attributes portion of the control indicating all attributes that have been overridden for the control. If the resolve level is high enough, this option will control whether ghosted controls (controls inherited but had no attributes overridden within this object) are displayed or not. This checkbox has no effect if the resolve level is not Controls or Scripts. (See PREFERENCES WINDOW for details.) If checked, the output includes the list of ancestors for the control. This list will have a higher level of detail if the resolve level is either Controls or Scripts. (See PREFERENCES WINDOW for details.) If checked, the output lists attributes overridden by ancestors in addition to attributes overridden within this object. If checked, produces a tree indicating the contents of the control, including any contained controls. Display of inherited controls depends on the resolution setting (see PREFERENCES). If checked, includes in the above tree a list of scripts contained in the control. Display of inherited scripts depends on the resolution setting (see PREFERENCES). If checked, the output will include all scripts according to the selected options below. If unchecked, scripts will be left out of the output, with the exception of the objects or controls tree if those options are selected. If checked, a line to indicate if the script overrides or extends its ancestor is included. If the script has no ancestor, nothing is included. If checked, also outputs the ancestors scripts. The header to each ancestor script indicates if the script extends or overrides the previous ancestor.

Attributes

Show Ghosts

Ancestor List

Attribute Ancestors Tree/Show Controls

Tree/Show Scripts

SCRIPTS/VARIABLES

Override/Extend Indicator Script Ancestors

June 18, 2008

PBL Peeper Documentation

Page 65 of 111

Show Ghosts

If the resolve level is high enough, this option will control whether ghosted scripts (scripts inherited but had no code within this object) are displayed or not. This checkbox has no effect if the resolve level is not Scripts. (See PREFERENCES WINDOW for details.)

DATA WINDOW OBJECTS SQL When checked, the SQL will be output for DataWindow objects. A database connection is required if this option is checked. If checked, the data set will be output. Column names and data types are included.

Data Set OUTPUT Target Rich Text Window Print WordPerfect Word Base Font Size

Determines the target of the output. The standard window which uses the PowerBuilder rich text control, used for output throughout PBL Peeper. Sends the output directly to the current printer, or as specified through the last call to PRINTER SETUP . Sends output to a WordPerfect window (requires WordPerfect to be installed). Sends output to a Word window (requires Word to be installed). All variations on font size used within the output are based on a percentage of a base font. Changing this base font size will proportionally change the font used throughout the output.

June 18, 2008

PBL Peeper Documentation

Page 66 of 111

Preferences Window

This window is accessed by the Tools / Preferences menu item. This window customizes the way PBL Peeper behaves. These values are saved between runs of PBL Peeper. Fields LONG PROCESSES Determines how PBL Peeper responds to long processes. All of the attributes affecting behavior after a long process include the minimum time in seconds the process must take before the behavior is initiated. For example, the Beep is set and the minimum time is set to 10, PBL Peeper will beep when the process is finished if the process takes at least 10 seconds. Sounds a standard Windows beep after processes that take more than the minimum time. Produces a message box after processes that take more than the minimum time.

Beep After Message After

June 18, 2008

PBL Peeper Documentation

Page 67 of 111

Focus After Warning Before

Brings PBL Peeper to the top of all windows after processes that take more than the minimum time. In anticipation of a process that ordinarily takes a significant amount of time, a message will be produced, giving the user the option of canceling the selected action. Since screen I/O is slow, the progress meter can cause a performance bottleneck. Unchecking this option will remove the progress meter. Sets the minimal additional percentage a process must complete before updating the progress meter on the status bar. A lower number will provide more user feedback; a higher number will reduce the performance impact of providing user feedback. When an item is selected in the Browser Page, if this item is checked PBL Peeper will immediately try to determine if an ancestor exists, and disable the ancestor button immediately. If this item is unchecked, if PBL Peeper doesnt already know if an ancestor exists, the button will remain enabled until the user clicks it. If the user clicks the ancestor button when no ancestor exists, the button will become disabled and there will be no change in the display. When this value is non-zero, the trace page keeps track of how many children it is loading to a single trace item. If the value is x, for every x children, the user is prompted to continue or not. This avoids loading traces of infinite loops and running out of memory. If checked, the TRACE page will skip over numbered line executions when loading the trace file. For any window that uses the DataWindow sort functionality (e.g. the List subpages), determines which style of sort dialog is supplied. The list corresponds to those made available by PFC. The sort window that PowerBuilder provides. A simple drag and drop style sort window. A window that allows selection with a drop down of only one column to sort by.

SHOW PROGRESS METER

MIN. PROGRESS INCR.

IDENTIFY ANCESTORS

TRACE LOAD LIMIT

SKIP TRACE LINES SORT STYLE

PBs Sort Drag & Drop Simple

June 18, 2008

PBL Peeper Documentation

Page 68 of 111

DropDownListBox FILTER STYLE

A window that allows selection with drop downs of one or more columns to sort by. For any window that uses the DataWindow filter functionality (e.g. the List subpages), determines which style of filter dialog is supplied. The list corresponds to those made available by PFC. The filter window that PowerBuilder provides. A filter window that provides a tabbed interface to help build the filter expression. A filter window that builds expressions with drop down lists. For any grid DataWindow, PBL Peeper adjusts the width of the columns so that none of the data is hidden. The different algorithms produce differing accuracies with differing performance. Does no column width adjustments. Reviews all rows where the column being adjusted contains a value that matches the maximum number of characters in a field. Reviews the width of all rows for the column being adjusted. Reviews the width of only the first row that contains a value that matches the maximum number of characters in a field. Reviews all rows where the column being adjusted contains a value that is within 15% of the maximum number of characters in a field. If checked, displays a tip on the operation of PBL Peeper on every splash window. Normally, PBL Peepers splash window stays open until it is finished intial processing. This will force PBL Peeper to stay open for a minimum time (in seconds), so that the tip can be read.

PBs Filter Extended Simple WIDTH STYLE

None Express

Exhaustive Simple Margined

TIP OF THE DAY Min Time

June 18, 2008

PBL Peeper Documentation

Page 69 of 111

RESOLVE STYLE

Determines to what degree an objects ancestry influences its representation within PBL Peeper and in the Browser Page. Change in the Resolve Style makes significant changes in the means PBL Peeper can be used and in performance. When portions are ghosted in the Browser, they appear with a white mask. Only portions that are represented in the export of an object are represented. This is the fastest option. When portions are identified whose parent tree is not clearly identified by the portions within the object, ancestors are indexed until a representation of the parent tree can be identified. Ghosted portions are added to the representation of the object to clarify its relevance to the object. (E.g. Often inherited menus will contain scripted Clicked events, while their parent menu items will not be referenced at all. In the browser, a series of unparented Clicked events is ambiguous. Resolving orphans would create ghosts of menu items to parent all the Clicked events.) All controls inherited from ancestors are ghosted. All controls and scripts from ancestors are ghosted. Include ghosted portions in the List Page. (See RESOLVE STYLE) If one of the sub-options is checked, for any control that has a DataWindow object associated with it (DataWindow control, embedded datastore, drop-down DataWindow, nested report), elements of the default DataWindow (the DataWindow assigned at design time) are ghosted below the control. Control or user interface elements are ghosted below DataWindow associated controls. As in a DataWindow, they are grouped by band. DataWindow table or data set elements are ghosted below DataWindow associated controls.

None

Orphans

Controls Scripts LIST GHOSTS RESOLVE DWS

DW Controls

DW Table

June 18, 2008

PBL Peeper Documentation

Page 70 of 111

DERIVE SYSTEM EVENT DEFNS

A bug up to PowerBuilder 7.0.3 causes PBL Peeper to blow up when exiting if metaclass objects are used to access certain ScriptDefinitions. This functionality was used to load full system event definitions, such as Event retrieveend (long rowcount) returns integer instead of Event retrieveend. Probably the main benefit of this is for documentation generation. If you dont use this functionality, turn it off and the failure when leaving PBL Peeper should go away. By default, to keep memory usage down, PBL Peeper typically does not keep source loaded in memory. As a result, the source has to be read in from the disk every time it is needed. Checking this option improves performance, at the cost of memory usage.

KEEP OBJECT SOURCE IN MEMORY

June 18, 2008

PBL Peeper Documentation

Page 71 of 111

PSR Viewer

The purpose of this sheet is to view PSR or SRD files, or to view DataWindow based output from a PBL Peeper function. Available menu items OPEN SAVE AS IMPORT Opens a Powersoft Report (PSR) or DataWindow export (SRD) file into the PSR viewer sheet. Saves DataWindow data contents to file. Imports a previously saved set of data into the current DataWindow (only DataWindows used for data entry).

June 18, 2008

PBL Peeper Documentation

Page 72 of 111

SAVE SYNTAX

Saves the current DataWindow syntax to a file so that the DataWindow can be reproduced and saved DataWindow contents can be imported. Prints DataWindow contents. Toggles the print preview mode of the DataWindow. Displays the page setup dialog to select settings for printing. Reverses the last data editing, when applicable. Cuts the currently selected text or data to the clipboard. Copies the currently selected text or data to the clipboard. Pastes into the current field. Removes selected text from the current field.

PRINT [CTRL-P] PRINT PREVIEW PAGE SETUP UNDO [CTRL-Z] CUT [CTRL-X] COPY [CTRL-C] PASTE [CTRL-V] CLEAR

SELECT ALL [CTRL-A] Selects all the text in the current field. BACK FORWARD QUICKFIND A history of movements among rows is maintained. These move back and forward along this history list in the same way these work in an Internet browser. An edit field opens over the header above the column that currently has focus. Based on what is typed in this field, current selection moves to the first row where that column matches the entered string. The search looks with the following priority: exact match prefix match substring match Pressing Enter or losing focus from the edit field will leave focus on the found row. Pressing Esc will return to the original row. Prompts for a row number, and scrolls to the entered row. Magnification control. Based on the objects represented in the unfiltered portion of the list, an Object Filter will be generated. This Object Filter will use an internal ID to represent the objects. This is only available when links back to a PBL Peeper sheet have been provided.

GO TO LINE [CTRL-SHIFT-G] ZOOM OBJECT LIST SET OBJECT FILTER FROM LIST

June 18, 2008

PBL Peeper Documentation

Page 73 of 111

OBJECT LIST SET OBJECT FILTER FROM SELECTED

Based on the objects represented in the rows selected on the list, an Object Filter will be generated. This Object Filter will use an internal ID to represent the objects. This is only available when links back to a PBL Peeper sheet have been provided.

June 18, 2008

PBL Peeper Documentation

Page 74 of 111

RTF Viewer

The purpose of this sheet is to view and edit rich text and text files, or to view textual output from PBL Peeper functions. Available menu items OPEN SAVE AS PRINT [CTRL-P] PRINT PREVIEW UNDO [CTRL-Z] Opens a text or rich text file into the RTF sheet. Saves rich text window contents to file as either text or rich text, depending on the file extension. Prints the rich text window contents. Displays a preview of the print. Reverses the last data editing, when applicable.

June 18, 2008

PBL Peeper Documentation

Page 75 of 111

CUT [CTRL-X] COPY [CTRL-C] COPY RICHTEXT PASTE [CTRL-V] CLEAR

Cuts the currently selected text to the clipboard. Copies the currently selected text to the clipboard. Copies the currently selected text in both text and rich text formats to the clipboard. Pastes into the document. Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document. FIND [CTRL-F] FIND NEXT [F3] FIRST PRIOR NEXT LAST Finds a string in the rich text window contents. Resumes the previous find from the current position using the previous settings. Moves to the first page. Moves to the previous page. Moves to the next page. Moves to the last page.

June 18, 2008

PBL Peeper Documentation

Page 76 of 111

SQL Formatter

The purpose of this sheet is to format SQL into a more readable format. This is useful for reading generated SQL, such as SQL passed into the SQLPreview events. It is available as a menu item under the Tools menu.

Fields SOURCE SQL FORMATTED SQL The data entry field where the unformatted SQL can be pasted or entered. The field where the formatted SQL is displayed.

June 18, 2008

PBL Peeper Documentation

Page 77 of 111

Controls CONVERT CLIPBOARD Formats the SQL and displays it. Formats the SQL, displays it and places a copy on the clipboard.

Available menu items SAVE AS PRINT [CTRL-P] UNDO [CTRL-Z] CUT [CTRL-X] COPY [CTRL-C] PASTE [CTRL-V] CLEAR Saves results to a text file. Prints the results. Reverses the last data editing, when applicable. Cuts the currently selected text to the clipboard. Copies the currently selected text to the clipboard. Pastes into the source. Removes selected text from the source.

SELECT ALL [CTRL-A] Selects all the text.

June 18, 2008

PBL Peeper Documentation

Page 78 of 111

Script Formatter

The purpose of this sheet is to format PowerScript scripts into a more readable format. It is available as a menu item under the Tools menu.

Fields SOURCE SCRIPT FORMATTED SCRIPT The data entry field where the unformatted script can be pasted or entered. The field where the formatted script is displayed.

June 18, 2008

PBL Peeper Documentation

Page 79 of 111

Controls CONVERT CLIPBOARD Formats the script and displays it. Formats the script, displays it and places a copy on the clipboard.

Available menu items SAVE AS PRINT [CTRL-P] UNDO [CTRL-Z] CUT [CTRL-X] COPY [CTRL-C] PASTE [CTRL-V] CLEAR Saves results to a text file. Prints the results. Reverses the last data editing, when applicable. Cuts the currently selected text to the clipboard. Copies the currently selected text to the clipboard. Pastes into the document. Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

June 18, 2008

PBL Peeper Documentation

Page 80 of 111

Stringer

The purpose of this sheet is to format a string into a quoted string that can be assigned to a string variable.

Fields SOURCE STRING FORMATTED STRING The data entry field where the unformatted SQL can be pasted or entered. The field where the formatted SQL is displayed.

June 18, 2008

PBL Peeper Documentation

Page 81 of 111

Controls CONVERT STYLE As Is Trimmed WRAPPED TO CONTROL SKIP BLANK LINES APPEND CHARACTER None Blank ~r~n CONVERT CLIPBOARD Determines how individual lines are to be dealt with before they are quoted. Leading and trailing whitespace is left in tact. Leading and trailing whitespace is removed. If checked, wraps the string to the size of the control. If checked, does not include blank lines in the string. Determines which character is appended to the string before it is quoted. No character is appended. A blank is appended. A carriage return and line feed (or end of line) are appended. Formats the string and displays it. Formats the string, displays it and places a copy on the clipboard.

Available menu items SAVE AS PRINT [CTRL-P] UNDO [CTRL-Z] CUT [CTRL-X] COPY [CTRL-C] PASTE [CTRL-V] CLEAR Saves results to a text file. Prints the results. Reverses the last data editing, when applicable. Cuts the currently selected text to the clipboard. Copies the currently selected text to the clipboard. Pastes into the document. Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

June 18, 2008

PBL Peeper Documentation

Page 82 of 111

SQL Parser

The purpose of this sheet is to parse a given SQL statement and identify the tables and columns used. Sets of tables and columns can be accumulated for several consecutively processed SQL statements. It is available as a menu item under the Tools menu.

Fields SOURCE SQL TABLES/COLUMNS The data entry field where the SQL statement can be pasted or entered. The list where the tables and columns are displayed.

June 18, 2008

PBL Peeper Documentation

Page 83 of 111

Controls PARSE REPLACE APPEND Parses the SQL and displays the resulting list of tables and columns. When PARSE is started, the existing elements of the TABLES/COLUMNS list is removed. When PARSE is started, the results are added to the existing list in the TABLE/COLUMNS control.

Available menu items SAVE AS PRINT [CTRL-P] UNDO [CTRL-Z] CUT [CTRL-X] COPY [CTRL-C] PASTE [CTRL-V] CLEAR Saves results of the TABLES/COLUMNS list. Prints the results. Reverses the last data editing, when applicable. Cuts the currently selected text to the clipboard. Copies the currently selected text to the clipboard. Pastes into the document. Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

June 18, 2008

PBL Peeper Documentation

Page 84 of 111

Command Line Parameters


Command line parameters can be supplied to modify PBL Peepers start up behaviour. Command line parameters can be supplied via Windows Run command dialog or via shortcut properties. Please see Windows documentation for full information on how to supply applications with command line parameters. See the Applied PBL Peeper chapter for details on how to use these parameters to launch PBL Peeper from Windows Explorer.

Application Start
/WIN:InitWindow Automatically loads the specified window on start. Default value is PBLPeeper when this parameter is not specified, or when an incorrect value is supplied to this parameter. Acceptable values are: PBLPeeper SQLFormatter SQLParser ScriptFormatter Stringer PSRViewer RTFViewer None

PBL Peeper Start


Application Contents /PBVER:x Identifies the current version of PowerBuilder to be used to determine the application identify. If omitted, the latest version of PowerBuilder found will be used as the current version. Automatically loads the current application, target or workspace as defined by PowerBuilder for the current PowerBuilder version. When not specified, the parameter defaults to the current application. For PowerBuilder 8 and forward, when the application is specified, the last run application in the current workspace is loaded. Automatically switches to the Browse page, indexing PBL directories, unless /INITPAGE is specified.

/CURRENT [:{WORKSPACE | TARGET | APPLICATION}]A

June 18, 2008

PBL Peeper Documentation

Page 85 of 111

/APP:xyzA

Loads the application with the name. If more than one application with the name xyz are defined in the PB.INI file, the one that is either current or last defined is used. Searches the PB.INI of the current version of PowerBuilder only. In PowerBuilder 8 and forward, appropriate registry entries, workspace and target files are searched. Automatically switches to the Browse page, indexing PBL directories, unless /INITPAGE is specified. Loads the application associated with target file. Automatically switches to the Browse page, indexing PBL directories, unless /INITPAGE is specified. Loads all PowerBuilder applications associated with workspace file. Automatically switches to the Browse page, indexing PBL directories, unless /INITPAGE is specified. Loads the PBL or PBLs listed. Wildcards are accepted. The supplied PBL names should be fully pathed. Automatically switches to the Browse page, indexing PBL directories, unless /INITPAGE is specified. Loads the first application found that has the supplied PBL in its library list. Searches the PB.INI of the current version of PowerBuilder only. In PowerBuilder 8 and forward, appropriate registry entries, workspace and target files are searched. If this search fails to load an application, all PBLs from the same directory as PBLName will be loaded. Automatically switches to the Browse page, indexing PBL directories, unless /INITPAGE is specified. Loads the folder as an export container (acts the same as a PBL) if any *.SR* files are found. Used with /PBL or /EXPORTS, searches subdirectories beneath the one specified for matching files or folders.

/TARGET:TargetFileName A

/WORKSPACE:Workspace FileNameA /PBL:PBLName1[,PBLNam e2...]A

/PBLAPP:PBLNameA

/EXPORTS:FolderNameA /S

June 18, 2008

PBL Peeper Documentation

Page 86 of 111

Initial Behaviour /INITPAGE:pageB Used in conjunction with /CURRENT, /APP, /PBL or /PBLAPP. When the app specified in the command line parameter is loaded, the application moves to the specified page of the tab on the main window. Valid values are: Browse Lists Find Reports Trace Exports Process Compare Loads the DBG file specified in the filename parameter. The Trace page is automatically selected. May be used with in conjunction with any other parameters that load an application, but if none is provided, the DBG file will be shown in the treeview without source code shown in parallel. For the application specified by another parameter, all the objects in all PBLs prefixed by one of the expr are indexed. Loads applications from a PB.INI file other than the one found in the same directory as the PowerBuilder executable.

/DBG:filenameB

/INDEX:expr[,expr2...] /PBINI:file1[,file2...]

Tool Windows Start


/LOADCLIPBOARDC Loads a value from the clipboard on start up. The default action is automatically initiated. Applicable when the initial window is SQLFormatter, ScriptFormatter or Stringer. Loads the contents of the specified file on start up. The default action, if applicable, is automatically initiated. Applicable when the initial window is SQLFormatter, ScriptFormatter, Stringer, PSRViewer or RTFViewer. Saves the result of the default action to the clipboard. Valid only with /LOADCLIPBOARD or /LOADFILE. Applicable when the initial window is SQLFormatter, ScriptFormatter or Stringer. Saves the result of the default action to the specified file. Valid only with /LOADCLIPBOARD or /LOADFILE. Applicable when the initial window is SQLFormatter, ScriptFormatter or Stringer.

/LOADFILE:FileNameC

/SAVECLIPBOARDD

/SAVEFILE:FileNameD

June 18, 2008

PBL Peeper Documentation

Page 87 of 111

/AUTOCLOSE

If parameters /LOADCLIPBOARD or /LOADFILE and /SAVECLIPBOARD or /SAVEFILE are successful, PBL Peeper is automatically closed down. Applicable when the initial window is SQLFormatter, ScriptFormatter or Stringer.

It should be noted that options with identical superscripts are mutually exclusive.

File or Directory Parameter


If only a file name is passed to PBL Peeper, the parameter will be mapped based on the file extension as follows: Extension PBL PBT PBW SR* TXT, RTF PSR SQL Mapping /PBLAPP:%1 /TARGET:%1 /WORKSPACE:%1 /EXPORTS:%1 /WIN:RTFViewer /LOADFILE:%1 /WIN:PSRViewer /LOADFILE:%1 /WIN:SQLFormatter /LOADFILE:%1

If only a folder name is passed to PBL Peeper, the parameter will be mapped to /EXPORTS.

June 18, 2008

PBL Peeper Documentation

Page 88 of 111

Applied PBL Peeper


How do I check for memory leaks?
Using the Find Page, search for both Create and Destroy in the same pass. Ensure that Destroys are executed for all Creates.

How do I migrate my application back from PowerBuilder 9 to PowerBuilder 8?


Create an empty directory. Load your application into PBL Peeper 9. Go to the Export Page and the Mass Export subpage. Export the application to that empty directory. Exit PBL Peeper 9. Edit all exports to remove any PowerBuilder 9 specific code, such as HTMLDW specifications in DataWindows. Load any application in the PBLs Page of PBL Peeper 8. Use a tool like PowerGen (http://www.ecrane.com) To Bootstrap Import the exports into PBLs. (People back migrating to PowerBuilder 9 or later have the option of using ORCAScript to bootstrap the PBLs. Library Painter becomes problematic when loading cross-dependent or circularly dependent objects.) Go to PowerBuilder 8 and run a full regeneration of the new PBLs.

How do I check that all objects are built based on my class library?
Load the application. Go to the Lists Page, the Objects subpage. Run the VIEW / SHOW menu item and select Ancestor Information. Set the filter to Lower (Ancestor) = Lower (Type). The objects shown should only be the class library objects. Repeat the same process on the Controls subpage, or produce the Inheritance report and include controls, reviewing the System Inherited Controls section at the end. Overriding scripts that are inherited from your class library can defeat your ability to implement universal logic in the ancestors. Scripts that override the ancestor without calling the ancestor anywhere in its script should be reviewed as to why the override was done, and the framework should be evaluated to determine if the functionality being avoided should be configurable from the descendant. To get a list of these scripts, go to the SCRIPTS LIST subpage, and select SHOW ... / EXTENDED . A filter that looks something like this should give you a list of scripts that should be reviewed for internal calls to the super event/function: (Type = Function AND Scripted_Ancestor = Yes) OR (Type = Event AND Extended = Overridden AND ( (Event_Type = System AND Owner_Has_Ancestor = Yes) OR (Event_Type = Custom AND Custom_Defn = Ancestor) ) )

June 18, 2008

PBL Peeper Documentation

Page 89 of 111

How do I ensure that GUI standards have been kept?


To check simple attribute-based GUI standards (e.g. font face, font height, colour), go to the appropriate subpage (Objects, Controls or DW Objects) on the Lists page. Run the VIEW / SHOW menu item and select Attributes, selecting the attribute(s) to check. Sort by the attribute to review, and look for any items that do not meet the standard. To check complex GUI standards (e.g. distance between controls), go to the appropriate subpage (Objects or Controls) on the Lists page. Run the VIEW / SHOW menu item and select Attributes, selecting the attribute(s) to check. Export the data and the syntax. Import the syntax to review the DataWindows table structure. Then build an external DataWindow with identical table structure that includes additional groupings, computed columns, etc... that will be necessary to determine GUI standard compliance. Import the data exported from PBL Peeper and review.

I want to browse an object, but I dont know what PBL its in.
Go to the Lists page, the Objects subpage. Use the EDIT / QUICKFIND function (with focus in the OBJECT column) or the EDIT / FIND function to locate the object in the list. Use the VIEW / BROWSER function to switch to that object on the BROWSE PAGE (this menu item is also available on the toolbar, using the same icon as the BROWSE PAGE ). Or, go to the BROWSE PAGE and use the EDIT / QUICKFIND function (with focus on the treeview). Use the UP function to move to the PBL, or check the microhelp to see the qualified object name, including PBL name.

I want to review all the DataWindow Clicked (or other) scripts.


Go to the Lists page, the Scripts subpage (be prepared to wait as it indexes all objects containing scripts). Select the VIEW / SHOW menu item, and select Owner Type from the list. Sort and filter as appropriate. To review within PBL Peeper, select from the list successive scripts to review and select the VIEW / BROWSER menu item (or the corresponding toolbar item). To review all the scripts at once, or to review outside of PBL Peeper, select all the rows for the scripts to review, and select the FILE / PRINT menu item, selecting Print selected scripts contents from the list. Select the OUTPUT TARGET as RICH TEXT WINDOW . This will produce a rich text window containing the scripts you want to review. These can be searched online, or saved or printed for later review.

My PowerBuilder application GPFs.


Run your application with PBDebug turned on (search your manuals for how this works). Be warned that your application will run quite slowly for this, and may produce a rather large trace file. Load your application into PBL Peeper. Go to the Trace page and load the trace file. Select the VIEW / LAST menu item (or toolbar icon). This will take you to the last line your application executed before it GPFd. Selecting VIEW / SHOW ... / CURRENT CALL STACK will give you the context from which the last function was called.

June 18, 2008

PBL Peeper Documentation

Page 90 of 111

How do I use PBL Peeper for producing reports on my system?


The type of reports you want will determine how you use PBL Peeper for reporting. In the REPORTS PAGE , using the Application Print report is a good start. The resolve type will significantly influence the type of information this conveys (see PREFERENCES). Those wanting to include the contents of objects in their documentation can use Rich Text Window as the OUTPUT TARGET. On the LISTS PAGE , several lists can be used as produced immediately. The VIEW / SHOW menu item gives opportunity to add extra information to the lists, including any PowerBuilder attribute (e.g. X, Y, Width, Height) for objects, controls and DataWindow objects. If the format of the lists is unsuitable, or additional groupings or calculated fields are desired, exporting the data and syntax can be exported for later customization. The REPORTS PAGE may also include reports suitable for system documentation.

Can I produce system metrics from PBL Peeper?


On the LISTS PAGE , sums and counts are always included at the bottom of every list. The VIEW / SHOW menu item also shows information useful in collecting statistics, such as script line count or object line count. For ad-hoc reporting of metrics, these lists can be filtered to produce statistics (e.g. filter the OBJECTS list on TYPE to get a count of windows). For reproducible reports, export the syntax and data from a basic list (without using the SHOW option to display additional information), and produce a report with appropriate groupings and computed fields with identical data structure to the list DataWindow. Import the exported data whenever metrics are required.

I want to move an object to another application, but I dont know what other objects it needs.
The LISTS PAGE , REFERENCES subpage provides this information. Select the object in the left panel, with ANCESTORS, REFERENCES and CASCADING all checked. The resulting set of objects in the right pane, if copied over to the other application, will allow for a clean regen without ancestor missing errors or reference missing errors.

I want to find how many times a function is being called during runtime for a certain task.
Produce a text debug trace of a sample application run using PowerBuilders PBDEBUG functionality. Start PBL Peeper with the application and load the trace file into the TRACE PAGE . Use the VIEW / SHOW menu item and select Call stacks matching.... In the window that pops up, enter the name of the function and press FIND . The window that is produced will show all instances in the trace file where that function was called, including the call stack that produced the call to that function.

June 18, 2008

PBL Peeper Documentation

Page 91 of 111

How do I see all the instance variables?


Using the Find Page, search for type variables (the internal header for instance variables in exports) in character-by-character mode, searching All portion types, outputting the entire script/portion. Similar methods can be used for shared variables and object structures.

How do I launch PBL Peeper from the source PBLs in Windows Explorer (file associations)?
You can associate PBL Peeper with PBLs and assign actions to them that occur if you double click them or bring up their context menu. The following should get you started in the right direction. It is based on what I did on a Win98SE system; see your OS documentation for details. In Windows Explorer, VIEW / FOLDER OPTIONS.... / FILE TYPES Assuming theres no existing definition for PBL, press NEW TYPE Press CHANGE ICON... and select the icon you want to associate with PBLs (I browsed to the PowerBuilder executable and associated the PowerBuilder icon) Put PowerBuilder Library in DESCRIPTION OF TYPE Under actions, select NEW ... Put Open PBLs App in ACTION; put "C:\Program Files\Techno-kitten\PBL Peeper\pblpeeper.exe" /pblapp:%1 in APPLICATION USED TO PERFORM ACTION (the path to the PBL Peeper executable is, of course, specific to your installation); press OK Optionally, repeat for Open PBL using the /pbl:%1 parameter Optionally, repeat for Find in PBLs App, using the /initpage:find /pblapp:%1 parameters (this loads the app to the FIND page much more quickly) Optionally, select one for default using SET DEFAULT Similar steps can be done for PBT files and PBW files, with the /target and /workspace command line parameters. Assuming theres no existing definition for DBG, press NEW TYPE Select appropriate descriptions and icons Under actions, select NEW ... Put Open with current app in ACTION; put "C:\Program Files\Techno-kitten\PBL Peeper\pblpeeper.exe" /current /initpage:trace /dbg:%1 in APPLICATION USED TO PERFORM ACTION (the path to the PBL Peeper executable is, of course, specific to your installation); press OK Optionally, set this action as the default

June 18, 2008

PBL Peeper Documentation

Page 92 of 111

Now, when you double click a PBL or DBG, or select the appropriate context menu, you will automatically launch PBL Peeper. See COMMAND LINE PARAMETERS for details on how these parameters work.

How do I search / review an object and its ancestors?


To most exhaustively search an object and its ancestors, set resolve levels to the highest levels: scripts and optionally DataWindow tables and controls. Go to either the BROWSE page or the LISTS / OBJECTS page and print the object contents to a rich text window. When selecting print parameters, be sure to check: ATTRIBUTE ANCESTORS, SCRIPT ANCESTORS, SCRIPT CONTENTS: ALL and both SHOW GHOSTS. The resultant rich text window can be used with its FIND functionality.

How do I selectively search and replace?


This method is granular only to the object level. Go to the FIND page. Enter the search parameters. Select DATA WINDOW OUTPUT. In the output, select the rows (Ctrl-Click and Shift-Click) for the objects in which you want the target items replaced. Select EDIT / OBJECT FILTER / SET OBJECT FILTER FROM SELECTED . Go to the PROCESS page and your search and replace will be restricted to the objects specified by the object filter you just created.

Can I use Script or SQL formatting from the PowerBuilder IDE?


In the PowerBuilder IDE, custom icons can be added to the toolbar to call external programs. Set up a custom icon to format scripts, provide a command line similar to this: "C:\Program Files\Techno-kitten\PBL Peeper\pblpeeper.exe" /win:scriptformatter /loadclipboard /saveclipboard /autoclose Then, while developing, Select All and Copy from the script painter, press your custom icon, and when PBL Peeper disappears, Paste. To create a toolbar icon for SQL formatting, use SQLFormatter as the window parameter.

How do I create a class hierarchy diagram in Visio?


While PowerDesigner will reverse engineer your PBLs and create a class hierarchy diagram, you may need to do the same thing with Visio, depending on the available tool set. To accomplish this (details may vary between Visio versions): Load the LISTS / OBJECTS page Go to the menu and select VIEW / SHOW ... / ANCESTOR INFORMATION For each object type of userobject, window and menu (and optionally for various types of user objects) Select VIEW / FILTER and set the filter to type = the selected object type Select FILE / SAVE AS... and save the list as Text with Headers Inconsistently, Visio requires a line in the text file defining the top level entity (the object type). To create this, copy one of the lines

June 18, 2008

PBL Peeper Documentation

Page 93 of 111

of text for an object and replace the object name and ancestor fields with something appropriate In Visio, select FILE / NEW / ORGANIZATION CHART / ORGANIZATION CHART WIZARD Load the file Set the NAME field to ObjectName Set the REPORTS TO field to Ancestor Optionally, add PBLName and Comments to the DISPLAYED FIELDS Specify the option to take control over how much data is displayed on each page (I prefer putting everything on one Visio page, and tiling onto multiple sheets of paper at printing.)

How do I compare specific attributes between versions?


Sometimes a full comparison of applications versions produces too much data; sometimes you need to compare specific sets of data. If you can view a set of attributes in a List, you can compare them between versions. Loading each version in turn, load the data into a List, then FILE / SAVE AS / SQL to create SQL to load the data into a temporary table for each version. (Depending on the DBMS youre using, you may need to tweak the SQL that creates the table.) Then you can compare attributes using standard SQL.

How do I search with boolean tests (e.g. create datastore AND (NOT settransobject))?
This type of search can be done only on an object level (i.e. test for presence or absence of string anywhere inside any single object) or on a script level (i.e. test for presence or absence of string anywhere inside any single script). On the LISTS / OBJECTS page or the LISTS / SCRIPTS page, use the menu item VIEW / SHOW (or the corresponding toolbar item) and select FIND COUNT.... Enter the strings you want to search for, and start the find function by pressing OK. This will produce columns with a find count for each object or script, one column for each search item. Select the menu item VIEW / FILTER, and create a filter expression based on the results of the find (e.g. count_create_datastore > 0 AND count_settransobject = 0").

June 18, 2008

PBL Peeper Documentation

Page 94 of 111

Frequently Asked Questions


What does PBL Peeper cost?
PBL Peeper is charityware. Download it and use it as you see fit. The version you download is not crippled or limited in any way. If you get to the end of a project, and PBL Peeper has helped you accomplish your goals, please make a charitable donation. I suggest a donation to one of the following types of charity: helps endangered or disadvantaged animals (e.g. World Wildlife Fund, Humane Society, SPCA) helps people in crisis (e.g. Red Cross disaster relief, Salvation Army, local food banks) In terms of amount, Id suggest a small percentage of a result of any PowerBuilder project where PBL Peeper helped you be successful. For individuals, this would be based on what you were paid over the course of the project. For project teams, this would be based on a small proportion of the software budget. Dropping me a note through the web site would be very encouraging.

My PBL Peeper is a beta version. Where can I find a gold version?


There is no version of PBL Peeper that is not labeled beta. That label is there to remind users that there are no guarantees when using PBL Peeper, and that functionality should be considered unreliable. This is one of the side effects of the product being free. (Hint: If I didnt think that it worked under at least the circumstances that Ive tested it in, I wouldnt release it or use it in my consulting practice.) Consider this the predecessor to the Google model.

How can I make PBL Peeper run faster?


Since PBL Peeper is reading through object exports, parsing them apart, and sometimes having to dig through ancestor chains, it can be slow. However, once an object is indexed, that index persists in memory. As a result, the more you use PBL Peeper in a given session, the less it will have to index. Since these calculations are done once, youre better off with a static copy of the application. If the application changes, youre going to have to select FILE / REFRESH APP (CTRL-SHIFT-R). You can look at the command line parameters for options of loading applications and indexing them on application start. You can also look at options in the Preferences window. While the defaults represent what I think is a balance between functionality and performance, Ive tried to give control to you in several areas. Ill continue to add controllable preferences, so if you upgrade, check back in the Preferences window. One key place to look is the Resolve level. While a lower resolve level, or none, is a better performer, anything less than Orphans can cause confusion. While other Resolve levels provide different insights into objects, Orphans is the recommended level with respect to performance.

June 18, 2008

PBL Peeper Documentation

Page 95 of 111

Can I get the source code for PBL Peeper?


In a word, no. There are several obstacles to releasing source code, including: the source code is largely undocumented, and Im far too lazy to get it done (its amazing this is here!!) customizations of PBL Peeper are where I hope to make some profit from the construction of PBL Peeper. Anyone wanting a custom version should contact me through my web site. Most popular customizations involve mass custom automated changes to existing applications.

Where do I check for the latest version or news on PBL Peeper?


Sequels Sandbox is home for PBL Peeper. Sequels Sandbox can be found at http://www.techno-kitten.com. You can also sign up for a mailing list using the Feedback form on the site.

Ive got a bug to report, comment etc.... Where can I send a note to Sequel?
There is a feedback page on the PBL Peeper web site (see above for the URL). Because of the free and unsupported nature of PBL Peeper, I cant guarantee responses.

Does PBL Peeper use metaclass functionality?


Since PBL Peeper was built before PowerBuilder 6, it is not based on metaclass functionality. It instead relies on reading the export of an object, and splitting it up into portions. Since metaclass functionality depends on being able to instantiate the class definition, and PBL Peeper users are not constrained to load all related PBLs in an application, metaclass definition loading has a legitimate opportunity to fail.

Why PBL Peeper?


When trying to develop a cat-oriented name for the utility, my mind wandered to a universal (at least North American wide) common culture for my generation: cartoons. And in that wandering, a line stuck in my mind: I tawt I taw a peeping tom-cat!! And thats one of the primary things the utility does: peeps into PowerBuilder libraries without opening them. For lack of further genius, the name stuck.

What is that thing on the cats head?


After Sequel began answer questions with Terry Voth in the Powersoft forums (originally on the Microsoft Network, then back to Compuserve, and finally on the Internet), some members of TeamPowersoft (now TeamSybase) took it upon themselves to give her an honourary induction into the Team (Sybase has yet to develop an official policy regarding feline Team members). The symbol of the Team has always been the propeller beanie. The problem is, cat-sized propeller beanies are hard to come by. Team member John Strano and his wife Su constructed a propeller beanie substitute, reportedly pilfering parts from a teddy bear and a toy plane. The induction ceremony was held in a bar at the Powersoft User Conference in Orlando (1994). The ceremony was done in absentia, since

June 18, 2008

PBL Peeper Documentation

Page 96 of 111

Sequel doesnt have her tattoos required to enter the United States (Terry, however, does).

June 18, 2008

PBL Peeper Documentation

Page 97 of 111

Known Issues
The following are the known issues as of the last documentation update (usually, the last major version). Please consult the ReadMe.txt for the latest details. PBL Peeper also wont correctly export the binary portion associated COM controls. The DW Columns list doesnt deal with SQL UNIONs, and only examines the first element of the UNION. PowerBuilder on NT has a bug in the MultiLineEdit that trashes the tab indices. For now, the workaround is to use the default tab stops of 8 characters. Trace Page does not handle the binary, profiling type of trace files; only the PBDEBUG style trace files. Not every PBL Peeper functionality works well when the Orphans setting is None. Testing on this setting is minimal, since it is significantly less useful in well designed systems. Unbalanced quoted parentheses can cause problems in the parsing algorithms of DataWindows. SQL parsing algorithms are as good as they are. They may choke on your SQL, and some invalid SQL has caused it to crash or hang. I expect that code containing Unicode strings may cause problems, although I havent had an opportunity to test this yet.

PowerBuilder Version Conflicts and ORCA


Because of ORCA issues causing conflicts between a PowerBuilder application and the installed IDE (ORCA isn't recommended by Sybase for use by PowerBuilder applications), ORCA functionality has been deprecated. Do not upgrade if you rely on this functionality.

June 18, 2008

PBL Peeper Documentation

Page 98 of 111

Tip of the Day List


The Tip of the Day displays on the splash screen when you start PBL Peeper. However, if it goes by too fast for you to read (you can control the minimum time it shows in the Preferences window), you can come here to read it again. From the PBLs Page, select the set of PBLs you want to work against from the list of available PBLs on the left. To select, use drag and drop, double click or press Enter. You can select individual PBLs, entire PBL sets from applications, directory subtrees or drives. The selected PBLs will appear in the right listview. To change some of the behaviours of PBL Peeper, go to the Tools / Preferences menu item. The most significant settings in this window relate to the Resolve settings. The Resolve level changes significantly both the performance of the tool and the ways in which it can be used. Resolve Level: None Setting the Resolve Level to None will mean that the browser will only show portions that are contained in the export of the object being viewed. This may cause ambiguity, as sometimes the context of a script (ie. the control which it relates to) has to be derived from its ancestor. Resolve Level: Orphans Setting the Resolve Level to Orphans will create ghosts of controls required to identify the true context of a script. For example, a ghost of a command button may be generated to clarify the context of a Clicked script. Resolve Level: Controls Setting the Resolve Level to Controls will create ghosts for all controls inherited from ancestors that weren't modified in the current object and would otherwise be not recognized as present. This Resolve Level requires that all ancestors be indexed. Resolve Level: Scripts Setting the Resolve Level to Scripts will create ghosts for all controls and scripts inherited from ancestors that weren't modified in the current object and would otherwise be not recognized as present. This Resolve Level requires that all ancestors be indexed.

June 18, 2008

PBL Peeper Documentation

Page 99 of 111

Resolve DataWindows: DW Tables Turning this option on will create ghosts of the table definition for controls that have a default DataWindow object defined, such as DataWindow controls, datastores, drop down DataWindow columns and nested reports. This is helpful when developing or troubleshooting on an object, to see what columns are available.

Resolve DataWindows: DW Controls Turning this option on will create ghosts of the user interface controls, grouped by band, for controls that have a default DataWindow object defined, such as DataWindow controls, datastores, drop down DataWindow columns and nested reports. This is helpful visualizing the real user interface.

If scripts or portions don't look parsed properly (e.g. starts in the middle), odds are the object has changed. Since PBL Peeper caches the object indexing, it is now grabbing the wrong substring. Select File / Refresh App from the menu. On the Browse Page, use the menu item View / Expand to expand the entire sub-tree beneath the currently selected item. This is particularly useful for DataWindows and objects with embedded classes, like windows with tabs. On the Browse Page, use the menu item View / Collapse to close all expanded treeview items. Copy is available from more than just script / portion viewer panes and output richtext windows. The Lists Pages all support copying. Treeviews and listviews will copy the current item's label to the clipboard. This can help while working in the development environment, copying scripts or object names into PowerBuilder

Watch for the changing enabled status of menu items and toolbar buttons. These are enabled or disabled as focus moves from control to control, indicating which functions are supported. To identify which line an application is GPFing on, run with PowerBuilder's PBDebug option. In the PBDebug Trace Page, select the View / Last menu item to move to the last line.

June 18, 2008

PBL Peeper Documentation

Page 100 of 111

To build custom reports based on data collected in the Lists Pages, use the File / Save Syntax menu item so that you can see the definition of the data set. Then use the File / Save As menu item to save the data (DBF recommended). In PowerBuilder, import the saved syntax or build an external DataWindow based on the saved syntax's data set, and import the data. Using this approach, you can add headers, footers, dates and page numbers to any DataWindow report.

To customize any rich text report, simply use the File / Save As menu item to save the report to a file. Then, load the RTF file into a word processor. Using this approach, you can add headers, footers, dates and page numbers to any rich text report with most standard word processors.

To customize any DataWindow report or list, simply do one of the following: Use File / Save As to save the DataWindow as a Powersoft Report (PSR). If you have InfoMaker loaded on your system, double-clicking the PSR file in Explorer should launch InfoMaker load the PSR in preview mode. Go to design mode to make any modifications such as headers, footers, page numbers, etc.... Use File / Save Syntax and File / Save As to save the DataWindow's syntax and data (preferable data format is DBF). In PowerBuilder, import the SRD file, open the resultant DataWindow, customize in design mode and, in preview mode, import the data.

Watch microhelp for hints on what the control with current focus is for. There is a small field on the microhelp line between the clock and the meter. This displays a number that indicates: line number in script / portion viewers row number in DataWindows page number in rich text output windows

There is an icon on the toolbar which corresponds to the icon on the Browse tabpage. This will switch you back to the Browse Page from anywhere. On pages where a current object, portion, control or script can be identified, the browser will be switched to that item.

June 18, 2008

PBL Peeper Documentation

Page 101 of 111

If you want to manipulate objects yourself, you can use the Mass Export subpage on the Exports Page. After manipulating the resultant export files, the Mass Import subpage will produce a new set of PBLs. On all grid style lists, the columns will automatically adjust their width so that data will not be truncated, nor will they show extra space. Lists are ready to print without concern for ambiguous, truncated data. This behaviour can be controlled on the Preferences window, defining the type of autosizing algorithm to use, or turning off the service completely. On all lists, counts are shown at the bottom. The main count counts the number of items in the list. The object count, on all Lists but the Object List, shows the number of distinct objects represented in the list. The counts reflect the current state of the list, including filter. The Go To Line, available in script / portion viewers as well as in DataWindows, uses the same shortcut as the PowerBuilder development environment: Ctrl-Shift-G. When defining a PBL set for PBL Peeper to work on, you can select any set of PBLs, not just a set that defines a PowerBuilder application. However, not selecting a set of PBLs that matches a single PowerBuilder application could result in problems with the following: identifying the type of control identifying the ancestor resolving and ghosting controls (this may leave orphaned scripts, e.g. a clicked script that in an ancestor belongs to a command button, but PBL Peeper has no way of identifying that) the Process page will be unavailable

To speed finds, get only the output you need. In descending priority of performance: object name script name/entire script context lines = 0 context lines > 0

June 18, 2008

PBL Peeper Documentation

Page 102 of 111

To speed finds, get only the detail of match you need. Don't use case insensitive if you don't have to. When using Match() expressions, context lines will slow down the process significantly. From the Lists / Objects page, use the View / Show menu item (or the plus window icon) to show: Ancestor information: Shows additional columns of information about the objects that can only be derived by determining the ancestors

From the Lists / Objects page, use the View / Show menu item (or the plus window icon) to show: Duplicates only: Show objects with duplicate names

From the Lists / Objects page, use the View / Show menu item (or the plus window icon) to show: Autoinstantiate: Derives and displays whether custom class objects are autoinstantiate

From the Lists / Objects page, use the View / Show menu item (or the plus window icon) to show: Object Line Count: Counts the number of lines in the export of the object.

From the Lists / Objects page, use the View / Show menu item (or the plus window icon) to show: DataWindow Attributes: Shows the data source type and presentation type for DataWindows.

From the Lists / Objects page, use the View / Show menu item (or the plus window icon) to show: Attributes: Select any additional PB attributes to display (e.g. backcolor)

From the Lists / Scripts page, use the View / Show menu item (or the plus window icon) to show: Extended: Indicator whether, if the script has an ancestor, whether it is extended or overridden

June 18, 2008

PBL Peeper Documentation

Page 103 of 111

From the Lists / Scripts page, use the View / Show menu item (or the plus window icon) to show: Line Count: The number of physical lines in the script

From the Lists / Scripts page, use the View / Show menu item (or the plus window icon) to show: Argument Count: The number of arguments in the function or event prototype

From the Lists / Controls page, use the View / Show menu item (or the plus window icon) to show: Ancestor information: Shows additional columns of information about the controls that can only be derived by determing the ancestors

From the Lists / Controls page, use the View / Show menu item (or the plus window icon) to show: Attributes: Select any additional PB attributes to display (e.g. fontfamily)

From the Lists / DW Controls page, use the View / Show menu item (or the plus window icon) to show: Data set column name: The name of the data set's column that corresponds to column objects

From the Lists / DW Controls page, use the View / Show menu item (or the plus window icon) to show: Column data type: The data type of the data set's column that corresponds to column objects

From the Lists / DW Controls page, use the View / Show menu item (or the plus window icon) to show: SELECT column: The SQL expression associated with the data set's column that corresponds to column objects

From the Lists / DW Controls page, use the View / Show menu item (or the plus window icon) to show: Attributes: Select any additional PB attributes to display (e.g. font.face)

June 18, 2008

PBL Peeper Documentation

Page 104 of 111

From the Lists / DW Columns page, use the View / Show menu (or the plus window icon) to show: SELECT column: Shows the SQL expression associated with a column, as well as the owner, table and column associated if only one is used

From the Lists / DW Columns page, use the View / Show menu (or the plus window icon) to show: Attributes: Select any additional PB attributes to display

To search within a specific object, on the Browse page, right click on the object and select Find / Find in this Object. You will be presented with a user interface to enter one or more search terms. The output will follow the options set on the Find page. The Browse page lets you view the contents of objects view whether a script has an ancestor and whether it is extended or overridden jump back to ancestor scripts and return print object contents or subportions of objects

All Lists subpages let you sort filter find jump to the Browse page to see the selected item's contents

June 18, 2008

PBL Peeper Documentation

Page 105 of 111

The Objects List subpage shows all classes in your application. This is equivalent to what you'd see in a PBL in the Library Painter. Fields listed include: object name PBL object comments object size (source and binary) object source size (size of export) last compiled date

The Scripts List subpage shows all events and functions. Fields listed include: script name owner (object or control which this script belongs to) object PBL definition or prototype (includes list of parameters and their types, and the return value) size (bytes) type (event or function) scope (public, private or protected) ghost indicator (shows whether or not code is implemented for this script in this object, or if it is just being shown because of inheritance)

June 18, 2008

PBL Peeper Documentation

Page 106 of 111

The Controls List subpage shows all subclasses in your application. This includes all controls on visual objects, and also all embedded non-visual objects in PB7 or greater. Fields listed include: control name containers (e.g. if a DataWindow is hosted inside a tab object and tabpage) object PBL immediate ancestor ghost indicator (shows whether or not attributes are declared for this control in this object, or if it is just being shown because of inheritance)

The DW Controls List subpage shows all the user interface objects declared on your DataWindows, such as text, columns, bitmaps, etc.... Fields listed include: DataWindow control name object (the DataWindow) PBL object type (e.g. column, text, line...) style (e.g. dropdownlistbox, radiobutton...)

June 18, 2008

PBL Peeper Documentation

Page 107 of 111

The DW Columns List subpage shows all the DataWindows' data set columns for all DataWindows. This can be used to compare data sets for functions that share data sets across DataWindows, such as ShareData() and RowsCopy(). Fields listed include: column name object (DataWindow) PBL column number the DB Name assigned to the column by PB column's data type some of the DataWindow's Update properties, including updateable flag inclusion in WHERE clause flag key column flag

The Find page searches your source code for you. It can: search for multiple strings in one pass of the code, merging the results into a single output search for normal strings (character by character) or regular-type expressions (as defined by PB's Match() function) choose to include or ignore matches found in comments or quotes include various levels of detail when a match is found, from just an object name to an entire script to just the line of code where it was found

Application Print Report: Prints all the objects in the application, using the same routines as Browser's object print. Options are the same as the object print as well. If you run the output to a rich text window, it can be imported to a word processor later for addition of page numbers, screen prints, etc....

June 18, 2008

PBL Peeper Documentation

Page 108 of 111

Comments Extract Report: Extracts comments from all scripts. This can provide an overview of all scripts if they are documented inline.

DataWindow SQL Report: Lists SQL in all DataWindows. This will also show if they are procedures or external DataWindows. The data set's data types are shown as well. A connection to the database is required for this report.

Database Column Usage Report: Identifies where database columns are used. Both DataWindow SQL and embedded SQL are evaluated. When found in DataWindow SQL, the dataobject is listed. When found in embedded SQL, the script is listed.

DataWindow Object Usage Report: Indicates where identifiable usages of DataWindow objects exist. Only dataobject attributes for DataWindows and datastores, and explicit hard coded data object assignments in scripts are included.

Embedded SQL Extract Report: Extracts all embedded SQL in scripts.

Inheritance Report: Inheritance report on objects. When generated at the object level, this produces the same result as PowerBuilder's Object Browser. When generated at the control level, it will additionally show the inheritance of controls. This will give you a full picture of where user objects are used.

MultiTable Registry Statements Report: Generates of_Register () statements for the PFC Multi-Table update service. This simply creates one statement for each table involved in the SQL statement, listing its columns. Key columns have to be added manually.

June 18, 2008

PBL Peeper Documentation

Page 109 of 111

PBR Builder Plus Report: Builds PBR contents and other components for building a single EXE. The PBR elements (for graphics, DataWindows) and script inserts (for windows, user objects) ensures that all objects are included in the executable. This is the single EXE equivalent of marking all PBLs for PBD generation to make sure all objects are included in the distribution.

Verify DW SQL Report: Verifies DataWindow SQL against the database by executing a PREPARE statement with the SQL. This will spot any DataWindow errors due to changes in the database. This will not prompt for parameters, as other DataWindow SQL verifiers will. This report requires a transaction object.

The Trace page lets you view a PBDEBUG trace file in a treeview format, side by side with the related code. This lets you: find where an application is fatally ending view the call stack for any given point find where certain functions are called, including optionally viewing all calls and their call stacks in a single view

Searching and replacing with the Universal option checked is highly dangerous, especially if you aren't familiar with the structure and contents of object exports. Accidentally replacing a keyword or attribute name will make the object unusable. Searching and replacing on DataWindow SQL means that the original text being used is the SQL as you'd see it in the syntax preview in the DataWindow painter. You will not be operating against the SQL the way it is stored in the DataWindow (e.g. ...table(customer)...). Any changed results are stored in syntax mode, not graphic mode. The Remove processor is ideal to get rid of debugging function calls before releasing to production. If Show Names Only is checked, Compare will only list the portion names that are identified as different. If unchecked, FC (DOS File Compare) will be used to compare the two versions. Comparing objects takes a significant amount of time, especially if options to ignore elements are checked. To avoid comparing objects that are likely the same, use the options Ignore Object when Modified Date/Times Match and Ignore Object When Sizes Match.

June 18, 2008

PBL Peeper Documentation

Page 110 of 111

The Object Filter allows you to filter which objects are acted upon. The Object Filter is defined by a filter expression that is evaluated against an internal object list. Filters cannot be given criteria below the object level (e.g. script = 'clicked' cannot be used). Changing the columns available in the Lists / Objects page with View / Show... doesn't impact the columns available to the Object Filter. When the Object Filter is set, the menu item is checked and the toolbar item appears depressed. This gives you a visual indicator that a filter is set. When QuickFind starts searching, it will look for: an exact match for the entered string a match of the substring of the first characters of the string a match for any substring

System Documentation: The first stop for system documentation should be the Application Print on the Reports page. It will print everything in the application. Suppressing details like contents of scripts will make the volume more manageable. The options available in this report are the same as with the Print from the Browse page.

System Documentation: One element of system documentation could be a print of the system tree from the Browse page. Use View / Expand at the PBL level for each PBL. Then File / Print / Print Entire Tree. The resolve level will significant change the nature of this report.

System Documentation: Lists in some form can be used in system documentation. If not used as is, the syntax and data can be exported and used with a custom DataWindow.

System Documentation: Various reports on the Report page have differing value for system documentation. The Inheritance report is basic information that should be included in all documentation. Including controls in the inheritance structure is helpful by showing where user objects are used (or not used).

In most DataWindows or treeviews, you can use the View / Back and View / Forward toolbar buttons to move through the history of movements between rows/treeview items.

June 18, 2008

PBL Peeper Documentation

Page 111 of 111

If you see a 3D raised header on a display only grid DataWindow, odds are that it has click/sort capability.

Das könnte Ihnen auch gefallen