T.R | Title | User | Personal Name | Date | Lines |
---|
3234.1 | Is det-line-type really ''? | PACKED::BRAFFITT | | Thu Apr 24 1997 08:32 | 68 |
| > The abort is at line 7018. At that time det-line-type = " "
> so it should go to line #7020 and then to line #7023.
This is what you need to track down. If det-line-type = " " then
7018 should not be executed. I recommend that you put a DISPLAY
statement before line 7017 and after line 7017 to verify the contents
of det-line-type. Also compile /deb/noopt/check=decimal to make
debugging easier.
7017: IF DET-LINE-TYPE = 'CX ' OR 'CL '
->7018: MOVE DET-SAVE-LINE-NO-COMM TO RECPO-LINE
7019: ELSE
7020: MOVE DET-SAVE-LINE-NO TO RECPO-LINE
7021: END-IF.
Here's the program I tried.
IDENTIFICATION DIVISION.
PROGRAM-ID. C3234.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WSS.
05 det-line-type pic x(7).
05 det-save-line-no-comm pic 9(4).
05 det-save-line-no pic 9(4).
05 repco-line pic 9(4).
05 hold-loc pic 9(4).
05 hold-ponum pic 9(4).
05 recpo-loc-1 pic 9(4).
05 recpo-number pic 9(4).
05 recpo-line pic 9(4) comp.
PROCEDURE DIVISION.
P0. DISPLAY "***C3234***".
* The abort is at line 7018. At that time det-line-type = " "
* so it should go to line #7020 and then to line #7023.
*
* 7013: MOVE 0 TO RECPO-LINE.
* 7014: * get key information from smg-data.
* 7015: MOVE HOLD-LOC TO RECPO-LOC-1
* 7016: MOVE HOLD-PONUM TO RECPO-NUMBER
* 7017: IF DET-LINE-TYPE = 'CX ' OR 'CL '
*->7018: MOVE DET-SAVE-LINE-NO-COMM TO RECPO-LINE
* 7019: ELSE
* 7020: MOVE DET-SAVE-LINE-NO TO RECPO-LINE
* 7021: END-IF.
* 7022:
* 7023: READ RECPO-FILE INVALID KEY
MOVE SPACES TO WSS.
MOVE 0 TO HOLD-LOC.
MOVE 0 TO HOLD-PONUM.
MOVE 0 TO RECPO-LINE.
MOVE HOLD-LOC TO RECPO-LOC-1
MOVE HOLD-PONUM TO RECPO-NUMBER
MOVE 'CX' to DET-LINE-TYPE.
DISPLAY "** DET-LINE-TYPE: 1**" DET-LINE-TYPE "**"
IF DET-LINE-TYPE = 'CX ' OR 'CL '
DISPLAY "** DET-LINE-TYPE: 2**" DET-LINE-TYPE "**"
MOVE DET-SAVE-LINE-NO-COMM TO RECPO-LINE
ELSE
MOVE DET-SAVE-LINE-NO TO RECPO-LINE
END-IF.
DISPLAY "***END***".
STOP RUN.
|
3234.2 | det-line-type does = spaces | SWAM1::COHEN_RO | Ron Cohen: DTN 531-3742 | Thu Apr 24 1997 11:43 | 40 |
| The debug session in .0 was done using your suggestion in .1.
Following is another debug session. What seems to be happening is
that it is this time executing the else statement (det-line-type does
= spaces) at line 7023 but then executes the first part of the if
statement (line #7020) and aborts with an 'invalid decimal'.
My concern is that all the programs are aborting with invalid decimal
data when the /check=decimal switch is used.
det-line-type before if = **
**-------------------------------------------
7015: MOVE HOLD-LOC TO RECPO-LOC-1
7016: MOVE HOLD-PONUM TO RECPO-NUMBER
7017: display "det-line-type before if = **" det-line-type
"**"
7018: IF DET-LINE-TYPE = 'CX ' OR 'CL '
7019: display "det-line-type in if = **"
det-line-type "**"
->7020: MOVE DET-SAVE-LINE-NO-COMM TO RECPO-LINE
7021: ELSE
7022: display "det-line-type in else = **"
det-line-type "**"
7023: MOVE DET-SAVE-LINE-NO TO RECPO-LINE
7024: END-IF.
7025:
- OUT
-output-------------------------------------------------------------------
DET-SAVE-LINE-NO of POE00100\DETAIL-LINE: 10100
10100
0
stepped to POE00100\%LINE 7023
stepped to POE00100\%LINE 7023
stepped to POE00100\%LINE 7020
break on unhandled exception preceding POE00100\%LINE 7020
- PROMPT
-error-program-prompt--------------------------------------------------
DBG> Step
%SYSTEM-F-DECINV, decimal invalid operand, PC=B281ECD4, PS=007AAEB0
|
3234.3 | | QUARRY::neth | Craig Neth | Thu Apr 24 1997 12:15 | 5 |
| Well, the debugger could be fibbing about what line you are really
on.
What is in DET-SAVE-LINE-NO and DET-SAVE-LINE-NO-COMM. If both are non-numeric,
then it doesn't matter what the value of DET-LINE-TYPE is.
|
3234.4 | Both are numeric | SWAM1::COHEN_RO | Ron Cohen: DTN 531-3742 | Thu Apr 24 1997 12:31 | 3 |
| Det-save-line-no-comm = 0 / Det-save-line-no = 10100
These results are displayed in the bottom debug session in .0.
They both seem to be numeric.
|
3234.5 | Check variable values with DISPLAY before the IF | PACKED::BRAFFITT | | Thu Apr 24 1997 12:53 | 6 |
| > Det-save-line-no-comm = 0 / Det-save-line-no = 10100
> These results are displayed in the bottom debug session in .0.
> They both seem to be numeric.
Try doing DISPLAY WITH CONVERSION for both these variables before
the IF.
|
3234.6 | | WENDYL::BLATT | | Thu Apr 24 1997 15:06 | 8 |
| Caveat: notice also that the exception message states that the
exception is *preceding* %LINE xxxx.
Also you could do a /MAC/LIS and see where the TRAPs actually
are located.
The line numbers associated with the TRAP in the /MAC code listing
correspond to the stepping behavior in debugger.
|