[Top][All Lists]

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

RE: RE: [open-cobol-list] mvs cobol namespace

From: William M. Klein
Subject: RE: RE: [open-cobol-list] mvs cobol namespace
Date: Thu Feb 5 14:59:55 2004

Then it seems to me that what the compiler should do is not CONVERT to
something that isn't coded in the "literal" - but instead should convert to
  "no-op" - always branch to ON EXCEPTION condition

*if* a literal is entered that can't be converted to (some- not all) C's.

I am certain that SOME C compilers must support other "things" - because IBM
C can call IBM COBOL programs with "@" "$" or "#" in the program-name.

P.S.  Another alternative would be to have the compiler convert the

   CALL "literal"
     to a
   Move "literal" to data-item
   CALL data-item

The bottom-line is that NO conversion should be made from the VALUE included
in the literal coded by the programmer.  If what they code is INVALID, then
it SHOULD cause either a compiler error OR a run-time "on exception". 

> -----Original Message-----
> From: David Korn [mailto:address@hidden 
> Sent: Thursday, February 05, 2004 4:37 PM
> To: address@hidden
> Cc: address@hidden
> Subject: Re: RE: [open-cobol-list] mvs cobol namespace
> > OK, what am I missing?
> You are missing the fact that
>        Call "literal"
> gets converts in C to
>       literal(args...)
> and that therefore only [A-Za-z0-9_] are legal in C and in addition $
> is legal in gcc and many other C compilers.  Since the program needs
> to compile, literal needs to be transformed into this set.
> > 
> > Why not do *NO* conversion for a 
> > 
> >    Call "literal"
> > 
> > statement and raise an "ON EXCEPTION" if the subprogram 
> isn't "found" when
> > you use the name exactly AS entered in the program?
> > 
> > Yes it is true that different compilers in different 
> operating systems *do*
> > some conversion, but why CONTINUE this "confusion" when you 
> aren't dealing
> > with those environments.
> > 
> > FYI,  the ISO 2002 Standard introduces an "IS EXTERNAL" 
> phrase to allow one
> > to specify a "known to the OS" name.  If programmers really 
> WANT to specify
> > an "odd" name, then that is what they should be using.
> > 
> > Micro Focus and CA-Realia are workstation "tools" intended to allow
> > mainframe programmers to DEVELOP on the Workstation, but 
> run production on
> > an IBM mainframe.  Therefore, they *must* provide mainframe 
> OS "emulation"
> > but I don't see that being the target of Open-COBOL.
> > 
> > Therefore, my STRONG recommendation is do *NO( conversion 
> for CALL "literal"
> > statements (or COPY "literal" statements).  USE what the 
> programmer enters.
> > If they want something different, then they should change 
> their source code.
> > 
> > P.S.  For example, Micro Focus supports 
> > 
> >     Call X"hex-literal"
> > 
> > statements.  If you do "conversions" for those, you will 
> have REAL problems.
> > 
> David Korn
> address@hidden

reply via email to

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