gnucobol-users
[Top][All Lists]
Advanced

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

RE: [open-cobol-list] 2002/85 syntax question


From: Bill Klein
Subject: RE: [open-cobol-list] 2002/85 syntax question
Date: Mon Mar 7 11:14:27 2005

Before you fix this one, let me show you the REALLY hard one <G> (valid as
MF extension to '85 Standard and required in '02 Standard).

Call "ABC"
  On Exception
      Display whatever
    Not On Exception
 ....

If "whatever" is a SCREEN NAME, then the NOT ON EXCEPTION must be matched
with the DISPLAY; if, on the other hand, it is NOT a screen-name, then it
must be matched with the CALL.  

  "Syntactically nearest possible statement"  

requires knowing LOTS about the previous statement(s).

> -----Original Message-----
> From: Roger While [mailto:address@hidden 
> Sent: Monday, March 07, 2005 11:53 AM
> To: Bill Klein
> Subject: RE: [open-cobol-list] 2002/85 syntax question
> 
> I thought you might say that :-)
> Although 14.2.2.2 is still unclear to me.
> Yes, the ubiquitous NOT causes the problem.
> Hmm, Any Bison profi's out there who might
> take a look at this ?
> 
> Roger
> 
> 
> 
> >My first reply may have missed your point.
> >
> >   "Not on"
> >
> >is NOT a valid "conditional" indicator for either CALL or 
> ADD.  You *must*
> >read another word in, i.e.
> >    "Not On Exception"
> >        vs
> >    "Not On Size Error"
> >
> >It would be NON-conforming to require the programmer to add 
> an END-ADD
> >"just" because you did not want to have to distinguish 
> between the two.
> >
> >
> > > -----Original Message-----
> > > From: address@hidden
> > > [mailto:address@hidden On
> > > Behalf Of Roger While
> > > Sent: Monday, March 07, 2005 7:58 AM
> > > To: Bill Klein
> > > Cc: address@hidden
> > > Subject: [open-cobol-list] 2002/85 syntax question
> > >
> > > Bill, can you clarify this :
> > >
> > > CALL "XYZ"
> > >    ON EXCEPTION
> > >        ADD something TO somethingelse
> > >    NOT ON EXCEPTION
> > >         do something else
> > > END-CALL.
> > >
> > > Problem here is that the "NOT ON" is a possible
> > > conditional (SIZE ERROR) for the "ADD".
> > > This turns up in the NIST tests (specifically IC222A).
> > >
> > > The syntax in itself is clear but I am unsure about
> > > the interpretation in 2002. After reading 14.4, I am
> > > still unclear about statement termination. In other words,
> > > in the syntax above should we necessarily have an "END-ADD" ?
> > >
> > > Incidentally, OC borks on this.
> > >
> > > Roger
> 
> 
> 




reply via email to

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