Add Program Flow to SQR with UltraEdit
Posted by: Brent Martin in PeopleTools on Aug 11, 2009
Have you ever tried to debug an SQR and needed a way to know which procedures were being executed in which order? Well, here's an easy way to add show statements at the start of each procedure wrapped in a "#DEBUGF" tag so you can activate it with a -debugf on the command line:
Open the SQR in UltraEdit.
Click Advanced > Configuration. Then when the Configuration window appears Expand the Search menu and click Regular Expression Engine. Set the Legacy Regular Expression Engine to "Unix Style Regular Expressions." Click OK to confirm the change.
Click Search > Replace. The Replace dialog window will appear.
Enter the following Regular Expression in the Text field:
^[\s]*Begin-Procedure[\s]+([\S]+)$
Enter the following Regular Expression in the Replace With field:
Begin-Procedure \1^p#DEBUGF show 'Procedure: \1'
Check the "Regular expressions" check box.
Click the Replace All button.
I'm using Ultra Edit 12.20, so you may have to adjust this process accordingly.
Here's a short video to show how the process looks:


Begin-Procedure SQLError?
#DEBUGF show 'Procedure: SQLError?'
Is there a way to suppress this.
Thanks
Nagaraj