Thank you a lot for your efforts :-)
That’s strange, because the behavior occurs also on my colleague’s PC and with different versions of RDi.
To avoid any misunderstanding: This is only about how the RDi debugger displays the field contents.
So to me it is quite clear that inz won’t change anything.
The programs runs well and if I output the variables in a table the field is all *blanks like you would expect.
@Scott: I first run into it in a service program and it took me an hour to realize that the debugger was wrong - not my program. I wrote the test program to exclude side effects. I haved also checked it on our second machine.
In the Memory Monitor View, you see the whole field is x'40'. So I guess, it must be an RDi problem. (Mine is running on Windows 8.1)
Best,
Markus
Announcement
Collapse
No announcement yet.
Debugger Shows Wrong Content With Char(1024) Fields in RPG
Collapse
X
-
Originally posted by Ghost + View PostBest practice is to initalize your variables. That should stop the dirty data you see here.
Originally posted by Scholli2000 View PostEven if I assign a value to the variable, a wrong value will be shown in the debugger.
To me, it is an RDi problem. As I wrote, the problem doesn’t occur with a data type of char(1000)--or even char(1023).
The program runs fine, the real content of the variables is *blanks. Not their actual content is shown in the debugger.
In the following program, chrDummy1024 and chrDummy1024inz both are displayed with wrong content, while chrDummy1023, chrDummy1025 and chrDummy2048 are displayed correctly (in the latter case at least the first 1024 bytes are displayed correctly).
To test: Make sure you start a fresh job and ONLY run the above code (no other programs in the job.) Do you still get the problem?
Also, try it in a different debugger, such as the green-screen STRDBG. Same problem?
Leave a comment:
-
Originally posted by Scholli2000 View PostThank you, but did you test it?
I'm on RDI Version: 9.6.0.10 20210202_0642
Leave a comment:
-
Thank you, but did you test it?
Even if I assign a value to the variable, a wrong value will be shown in the debugger.
To me, it is an RDi problem. As I wrote, the problem doesn’t occur with a data type of char(1000)--or even char(1023).
The program runs fine, the real content of the variables is *blanks. Not their actual content is shown in the debugger.
In the following program, chrDummy1024 and chrDummy1024inz both are displayed with wrong content, while chrDummy1023, chrDummy1025 and chrDummy2048 are displayed correctly (in the latter case at least the first 1024 bytes are displayed correctly).
Code:**FREE ctl-opt main(atest1); dcl-proc atest1; // ---------------------------------------------------------------------------------- // Procedure Interface // ---------------------------------------------------------------------------------- dcl-pi atest1; end-pi; dcl-s chrDummy1023 char(1023); dcl-s chrDummy1024 char(1024); dcl-s chrDummy1024inz char(1024)inz; dcl-s chrDummy1025 char(1025); dcl-s chrDummy2048 char(2048); end-proc atest1;
Last edited by Scholli2000; September 29, 2021, 01:28 AM.
Leave a comment:
-
Best practice is to initalize your variables. That should stop the dirty data you see here.
dcl-s chrDummy char(1024) inz;
Leave a comment:
-
Debugger Shows Wrong Content With Char(1024) Fields in RPG
Hi all,
when debugging RPG, the RDi debugger seems to not show the actual memory when debugging char(1024) fields.
Changing the field to char(1000) makes the error disappear.
I’m on Version: 9.6.0.10.
Can someone reproduce this? I could by creating this program.
Code:**free ctl-opt main(atest1); dcl-proc atest1; // ---------------------------------------------------------------------------------- // Main // ---------------------------------------------------------------------------------- dcl-pi atest1; end-pi; dcl-s chrDummy char(1024); end-proc atest1;
Last edited by Scholli2000; September 28, 2021, 09:42 AM.Tags: None
Leave a comment: