[Top][All Lists]

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

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

From: Bill Klein
Subject: RE: [open-cobol-list] Re. Small Cobol changes for MVS compatibility
Date: Mon Nov 15 14:26:07 2004

  You couldn't be MORE mistaken about what the '02 Standard says (and this
IS consistent with the '85 Standard) when you say,

"If you say ==<space>TEXT<space>== BY
> ==<space>TEXT2<space>== , then 2002 states that
> this is EXACTLY what will be searched for"

See: GR10(a) on page 34 which states, (in part),

"The leftmost library text-word that is not a separator comma or a separator
semicolon is the first text-word used for comparison."

In other words,


DOES match

  ==, . text-word==

and also matches


(all spaces and non-spaces and equivalent separators) are treated as
IRRELEVANT before the first text-word.

It *is* true that the '85 Standard (and the '02) Standard BOTH state that
when a match is found, that you MUST put all of pseudo-text-2 (the stuff
after the BY) into the resulting text.  

This is why I indicated that *if* the current implementation is NOT placing
spaces in the resulting text (when they appear in pseudo-text-2) that is

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On 
> Behalf Of Roger While
> Sent: Monday, November 15, 2004 2:59 PM
> To: address@hidden
> Subject: [open-cobol-list] Re. Small Cobol changes for MVS 
> compatibility
> 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
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC.
> _______________________________________________
> open-cobol-list mailing list
> address@hidden

reply via email to

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