gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Re. Small Cobol changes for MVS compatibility


From: Roger While
Subject: [open-cobol-list] Re. Small Cobol changes for MVS compatibility
Date: Mon Nov 15 13:01:03 2004

David, I'm fairly OK with 1 and 2.
But definitely not with 3.
I was always mystified by the way compilers jumped through
hoops to supposedly adhere to the nonsense 85 standard.
In the 2002 standard, things are absolutely clear.
If you say ==<space>TEXT<space>== BY
==<space>TEXT2<space>== , then 2002 states that
this is EXACTLY what will be searched for and EXACTLY what
will be replaced.
The only extra processing is :
"Each occurrence of a separator comma, semicolon, or space in pseudo-text-1 or in the library text is considered to be a single space. Each sequence of one or more space separators is considered to be
a single space."

In fact, because of the 85 confusion, MicroFocus says this :
"(ANS85) If certain conventions are followed in library text, parts of names, for example the prefix portion of data-names, can be changed with the REPLACING phrase. To use this type of "partial word replacement" the portion of the words to be modified must be enclosed in one of the following ways:
In pairs of left and right parentheses. For example, (ABC)
Within colons. For example :XYZ: "

So, regardless of what Open Cobol does or does not do, I would change
your copy statements to be unambiguous. In my opinion, putting spaces at the end of pseudo-text and expecting the compiler to know what you mean is asking for trouble. Take out the trailing space at the end of pseudo-text-1 and -2, and then you have a prog that
should compile with any standard (theoretically) .

Roger




reply via email to

[Prev in Thread] Current Thread [Next in Thread]