Hi,
We are planning to switch from COBOL V4 to V6.4 in due time.
We have found that the INVDATA option of COBOL V6.4 mimics the V4 behaviour and
plan to use it when 6.4 compiled modules throw error when invalid data is
present.
One such test was to check the 0 length and negative length moves as in the
following:
DISPLAY 'Substrings with a length shorter than 1'
DISPLAY "Positive Lange"
MOVE +5 TO ZW-START
MOVE +4 TO ZW-LENGTH
DISPLAY ZW-TEXT(ZW-START:ZW-LENGTH)
DISPLAY "Lange Null"
MOVE +5 TO ZW-START
MOVE +0 TO ZW-LENGTH
DISPLAY ZW-TEXT(ZW-START:ZW-LENGTH)
DISPLAY "Negative Lange"
MOVE +5 TO ZW-START
MOVE -1 TO ZW-LENGTH
DISPLAY ZW-TEXT(ZW-START:ZW-LENGTH)
DISPLAY "The End"
STOP RUN.
This code ran ok when compiled with COBOL V4 but did not work well with COBOL
V6.4 with INVDATA option.
The error thrown was:
IGZ0073S A non-positive reference modification length value of 0 on line 000052
ZW-TEXT.
If any of you have already experienced this and have an explanation or a
solution, I would be grateful if you could share that.
Thanks in advance,
Best regards
Prasanth Sukumaran Nair
ITERGO Informationstechnologie GmbH
Development Tools and Application Security
Referent
Überseering 45
22297 Hamburg
Phone +49 40 6376-2402
[email protected]
Chairman of the Supervisory Board: Robin Johnson
Executive Management: Mario Krause (Chairman),
Michael Liebe, Tony Cameron McCarthy, Caroline Meister, Jens Parthe, Rui Valente
Registered Office: Düsseldorf, Commercial Register: District Court Düsseldorf,
HRB 37996
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN