[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] discussion: implemention of truncation COBOL-WORD to 3
From: |
Thomas Biehler |
Subject: |
[open-cobol-list] discussion: implemention of truncation COBOL-WORD to 30 (31) chars ? |
Date: |
Tue Mar 30 07:11:16 2004 |
User-agent: |
KMail/1.4.3 |
Hi all,
i would like to know what the member of this mailinglist
think about a (automatic; implicit) truncation
of a to long COBOL-WORD (identifier ...)
to the maximal allowed length from the standard.
for the maximal allowed length of a COBOL-WORD see in the standard:
- ANSI INCITS 23-1985 (R2001) § 4.2.2.1 ==> 30 Characters
- ISO/IEC 2002(E) §8.3.1.1 ==> 31 Characters.
The truncation is Micro-Focus "normal" behavior (for the 1985 - standard!) .
(1006-E --> Error ---> automatic correctur ,
see the following excerpt from the error message guide )
Micro Focus:
======================================================
1006 COBOL word contains more than 30 characters. Word truncated
The name that you have specified is longer than 30 characters.
Your COBOL system treats this as a name consisting
of the first 30 characters of your original name
======================================================.
I have attached a patch to the current cvs-version from pplex.l
which truncates to 30 chars (1985 standard!) as a proof of concept.
I am porting a "MF-application", which contains a small amount
of to long identifiers. Changing the non-allowed identifiers / programs
would not generate big effort to me!
I could also change the MF-compiler configuration!
(=> CHANGE-MESSAGE ... 1006-E to 1006-S --> severe error!)
How the too long identifier come into existence ?
--> the "to long identifier" are generated from a database;
with a additional prefix they are to long!
I really want to know what other cobol users think about this.
(And perhaps needs, if anybody also port a "Micro-Focus Application")
You can see the attached patch is very small!
Easy to implement!
Should this behavior be implemented in open-cobol?
In a similar way? (with a warning ?)
As a MF-Cobol behavior only? (with a special configuration option ?!)
Or are there any good reasons against this?
(except the "nonconforming standard" argument)
Comments and suggestions are welcome!
Thomas
truncate_to_30_chars.diff
Description: Text Data
- [open-cobol-list] discussion: implemention of truncation COBOL-WORD to 30 (31) chars ?,
Thomas Biehler <=