But 7. Create a library. Remember the name of the library you create. You need it later when you call your first program. Replace yourlibrary in the instructions with the name of the library you created. Create a source file. Open the member in the editor. Open the member in SEU by using the "2" option. If you still want to use SEU, you have to exit with errors after you save your source.
Entering the RPG program statements in "fully-free" form. Type the following code. If you are using RDi, the editor shows you all the columns. If you are using SEU, the editor does not show you columns by default, so the first column you see is column 6. Use F19 to shift the code left so you can see column 1. If you are using SEU, exit the editor by using F3, and compile by using option If you are using PDM, you are already logged on. All the code must be free-form.
Edit your source again, and change it so instead of displaying 'Hello World', it tries to display a variable called "name". There have been times when I am debugging a multi-thousand line program when I find a line of code that can look something like:. I can see what value is in variable X. But my attempts to see what is in Const1 is met with:. The first thought that passes through my mind is that I wish the person who had written the program had used meaningful names when defining their variables and constants.
All I need to do is to add a RPG control option. Lines 3 and 4: I have defined two constants here. I start debug, and place a breakpoint at line 5. Now when I check the values on the constants I get:. After this is done, you'll also need to recompile the program or rebuild the service program that uses this module. Then set a breakpoint at the desired line in the module source. When a call to a bound procedure is made, you can switch the editor window to the module source and begin stepping through.
Evaluating Variables. While stepping through a running application, you can check the current value of any variable, array, data structure, or database field. The quickest way to do this is to simply hover the mouse cursor over the desired variable in the editor. The current value will be displayed in a tooltip.
Another method of evaluating variables is to use the Evaluate Window. This window allows you to evaluate complex expressions. The evaluate window can display the entire contents of an array or data structure.
It can even evaluate expressions with dynamic elements, such as MyArray Index. The Variables Snapshot Window allows you to look at the values of all program variables in a convenient tree structure.
Arrays and data structures are listed as expandable items in the window. You can click the plus symbol to expand the item and view the value of each array element or data structure subfield. The Variables Snapshot Window is updated with the new values each time you take a step through the source. The window can also be docked, if desired. Using Back-In-Time Debugging. The Back-In-Time Debugging Window allows you to step backwards through a program to view the values of variables at earlier stages in the execution of the program.
Each time you take a step through the program, a tick mark is added to the slider, and a history is kept of variable values at each step in the execution of the program. When the window is first displayed, the slider is set to Now.
0コメント