I'm working on a Cobol application that is deployed on HP Nonstop. Debugging on the platform I came across the following situation:
IF LABELED-VALUE OF IN-VARIABLE-1 OF PARENT OF GRAND-PARENT THEN
MOVE IN-VARIABLE-2 OF PARENT OF GRAND-PARENT TO OUT-VARIABLE
ELSE
MOVE IN-VARIABLE-1 OF PARENT OF GRAND-PARENT TO OUT-VARIABLE
END-IF
When I evaluate the expression LABELED-VALUE OF IN-VARIABLE-1 OF PARENT OF GRAND-PARENT
my debugger tells me that the expression is TRUE
. Consequently OUT-VARIABLE
should have the respective value. But this is not the case; it has always the value IN-VARIABLE-1
and the logic always enters the ELSE
.
What I've tried so far:
- Adapt the condition of the
IF
to check for the specific value, likeIF IN-VARIABLE-1 OF PARENT OF GRAND-PARENT EQUAL ZERO THEN
(ZERO
is in fact the value ofLABELED-VALUE
) - It happens with my debugger that it displays an old version of the code but displays the execution line indicator for the most current version. This can result in the indicator being displayed in front of the wrong line. In order to avoid this I've made a change to a comment, recompiled, restarted the serverclass and reattached to the process. Doing so I in fact have obtained the most recent version of the source and I can therefore exclude this problem.
I am not a Cobol expert, though I thought that a simple IF
could be manageable, but no avail. Could someone please help me out?
Aucun commentaire:
Enregistrer un commentaire