Add Program Flow to SQR with UltraEdit

Posted by: Brent Martin in PeopleTools

Tagged in: Untagged 

Brent Martin

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:

 

Trackback(0)
Comments (2)Add Comment
0
...
written by Nagaraj, September 16, 2009
I am using Ultra Edit 10.10a When I do this i get a special character (?) in Begin-Procedure like
Begin-Procedure SQLError?
#DEBUGF show 'Procedure: SQLError?'

Is there a way to suppress this.

Thanks
Nagaraj
Brent Martin
RE: Special character
written by Brent Martin, September 16, 2009
I can't recreate the problem on my side. I'm using Ultra Edit version 12.20b though. I'm wondering if IDM might have fixed a few bugs since version 10.

Write comment

security code
Write the displayed characters


busy