Techie Tuesday: Call Pest Control! Bugs are Plaguing my Report!

Debugging Your Report

For my last post in this series, we will focus on buggy reports, and how to overcome them. Programs are available for placing breakpoints in code in order to view values stored in local and global variables.

Magic Platforms: $DDC(A) or %Z.ddc(A,B,C)
Client Server Platforms: %Z.debug(A,B)

Magic Platforms

$DDC(A)

A = Name to display in the header section

%Z.ddc(A,B,C)

A = Name to display in the header section

B = optional argument that when specified the debugger will only launch when run on that device

C = optional argument that when specified the debugger will only launch for the specified user

Add $DDC(A) to the line where you would like to add a breakpoint. Whatever value is passed in as the argument A will display in the header.

1

The value that is passed as argument A will be displayed here:

2

From the DDC prompt you can:

  1. Look at the value stored in local variables by typing the name of the local variable and pressing the <Enter> key
  2. Look at values stored in global variables by utilizing the G utility (;%G(“”))
  3. Access the front end by typing ;%FEC(0) and pressing the <Enter> key
  4. Execute program calls by typing ; followed by the program name (with arguments).

Magic Platforms

%Z.DDC

  • Type ‘>’ to return the number of bytes used by all symbol tables, as well as the number of bytes available.
  • Type ‘ to copy the contents of the / prefix to your Windows clipboard.
  • Type ‘.’ to bring up the Node(s) prompt for viewing contents of prefixes.
  • Type ‘?’ to return all symbols in the current symbol table.
  • Type ‘??’ to return all symbols in all symbol tables.
  • Type the name of any symbol from the current symbol table to return the value of that symbol.
  • Execute program calls or other valid Magic expressions by typing ; followed by the program name (with arguments) or a valid Magic statement.
  • Press <Enter> to exit the breakpoint.

Client Server Platforms

%Z.debug(A,B)

A = Name to display in the header section

B = optional argument that when specified the debugger will only launch when run on that device. Specifying a device for the debug ensures that other users are not adversely affected if the debug call is left in the code

Add %Z.debug(A) to the line where you would like to add a breakpoint. The value that is passed as argument A will display in the header.

3

The value that is passed as argument A will be displayed here

4

From the breakpoint you can select one of the following options:

I  Inspect the current frame

P  Display open prefixes

H  Display the history

G  Inspect memory based temp

F  Go to specific frame

S  Show symbol table of current frame

<ESC>  Exit

At the breakpoint:

1.Enter G to access the G utility

2.Enter the prefix that you would like to view

Once done press <ESC> to exit the breakpoint and continue with the report.

5

 

I hope you have enjoyed this series for Techie Tuesday. Stay tuned to the IPeople blogs for more techie tricks and tips to get your flying through your work.

Jenny Blue

Jenny Blue

CEO at IPeople
Jenny Blue is co-founder and CEO of Interface People, LP and Consultant People, LP, which operate in a total of 48 US States, England, Ireland, Canada, and South Africa. In her role, Mrs. Blue provides leadership and vision to the company with the ultimate goal of improving patient care through technology. With over 16 years of experience in the programming and healthcare industries, her strong background provides solid direction to all departments, and sets the pace for outstanding innovation as IPeople continues to address the growing challenges and objectives in healthcare.
Jenny Blue

Latest posts by Jenny Blue (see all)

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *