Subject: | |
From: | |
Reply To: | Atwood, Tim (DVM) |
Date: | Fri, 30 May 2003 11:44:52 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Help. I desperately need someone to look at what is going wrong with a COBOL
code addition I am doing. It is probably one of those cases where I am blind
to something obvious. But I do not see what I am doing wrong or why this is
happening.
I add two simple MOVE statements and suddenly the program (XL Subroutine
"DYNAMIC") starts aborting with the following memory protection trap error:
**** INTERNAL TRAP
Data Memory Protection Trap
[VSM] Undecoded status.info = -37
ABORT: RM2040X.PUB.DVIPM
NM USER 5ac.00221030 rm2050$003$+$1974
NM PROG 399.000078b4 rm2040+$e84
The COBOL program itself is a huge legacy program (22,000 lines). But the
change I am making that causes the problem is really very simple. The lines
I am adding are:
* Set up for TAPPI
MOVE ZERO TO TAPPI-START-POS-CM.
MOVE CENT-DATE-SYSTEM TO TAPPI-DATE.
When these lines are commented out, the program works fine. When the comment
"*" are removed from the two MOVE statements, the memory protection error
occurs.
I have tried totally deleting the lines and re-typing them. In case I had
invisible control characters in there or some such Or a typo I simply was
not seeing. No change. Program still aborts.
A longer snippet of the code containing these lines follows. As you can see
the prior existing code has periods at the ends of the statements. In other
words, the statements are all "outer level". There is no possibility I can
see for dropping out of an IF statement, perform loop, etc.
...
MOVE 1 TO LB1-TAG-POS.
* Clear Core Tag buffer..
MOVE SPACES TO LABEL-STORAGE-DATA.
MOVE SPACES TO LABEL-STORAGE-TAG.
* Set up for TAPPI
MOVE ZERO TO TAPPI-START-POS-CM.
MOVE CENT-DATE-SYSTEM TO TAPPI-DATE.
PERFORM WITH TEST BEFORE
UNTIL (WS-POS = WS-NXT-AVL-POS)
*>> Clear Tag label values
MOVE SPACES TO WLB-BARC-DATA
WLB-ROLL-ID
WLB-WIDTH
...
The code before the change looks like:
...
MOVE 1 TO LB1-TAG-POS.
* Clear Core Tag buffer..
MOVE SPACES TO LABEL-STORAGE-DATA.
MOVE SPACES TO LABEL-STORAGE-TAG.
PERFORM WITH TEST BEFORE
UNTIL (WS-POS = WS-NXT-AVL-POS)
*>> Clear Tag label values
MOVE SPACES TO WLB-BARC-DATA
WLB-ROLL-ID
WLB-WIDTH
...
The working storage area being moved to looks is the following. Copied from
the compile listing as it is a Copylib member so the listing shows it best.
Please note simply adding this copy statement does not cause the problem.
The problem only occurs when the move statements are added.
...
01 LS-TRIM-ITEM-NO PIC X(2).
COPY TAPPI.
01 TAPPI-BASE-IPMST PIC X(08).
01 TAPPI-ACTION PIC X(02).
88 ASSIGN-TAPPI VALUE "AT".
88 DELETE-TAPPI VALUE "DT".
88 GET-TAPPI VALUE "GT".
01 TAPPI-MACHINE-ID PIC X(02).
88 TAPPI-PM-WINDER VALUE "01", "02", "03".
88 TAPPI-WINDER-1 VALUE "01".
88 TAPPI-WINDER-2 VALUE "02".
88 TAPPI-WINDER-3 VALUE "03".
88 TAPPI-REWINDER VALUE "RW".
88 TAPPI-FOLIO VALUE "F?".
88 TAPPI-TRIMMER VALUE "T?".
01 TAPPI-DATE.
05 TAPPI-YEAR PIC 9(04).
05 TAPPI-MONTH PIC 9(02).
05 TAPPI-DAY PIC 9(02).
01 TAPPI-START-POSITION PIC 9(04)V99.
01 TAPPI-SET-WIDTH PIC 9(04)V99.
01 TAPPI-DVM-ID PIC X(10).
01 TAPPI-ID PIC X(20).
01 TAPPI-RETURN-STATUS.
05 TAPPI-ERROR PIC S9(4) COMP.
88 TAPPI-OK VALUE ZER0.
88 TAPPI-BAD-ACTION VALUE -9999.
88 TAPPI-BAD-MACHINE VALUE -9998.
88 TAPPI-BAD-DATE VALUE -9997.
88 TAPPI-SEQ-NO-OVERFLOW VALUE -9996.
88 TAPPI-MISSING-CTL-VALUES VALUE -9995.
88 TAPPI-DUPLICATE-ID VALUE -9994.
88 TAPPI-NOT-FOUND VALUE -9993.
05 TAPPI-REST-OF-DB-STATUS PIC X(36).
01 TAPPI-WORK-FIELDS.
05 TAPPI-START-POS-CM PIC S9(5)V9(4) COMP.
PROCEDURE DIVISION USING
*------------------*
...
The only other variable involved is CENT-DATE-SYSTEM. It's definition is:
01 CURR-DATE-AND-TIME.
03 CENT-DATE-SYSTEM.
05 DATE-SYSTEM-C PIC 99.
05 DATE-SYSTEM.
10 DATE-SYSTEM-Y PIC 99.
10 DATE-SYSTEM-M PIC 99.
10 DATE-SYSTEM-D PIC 99.
03 TIME-SYSTEM.
05 TIME-SYSTEM-N PIC 9999.
Help! Does anyone have suggestions as to what the heck is going on here???
Thanks.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|