For Programmers: Free Programming Magazines  


Home > Archive > Cobol > November 2005 > >> IMP ESQL ...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author >> IMP ESQL ...
Herwig Huener

2005-11-24, 7:55 am

2005-11-14 14:50:00 MET

Ar this time, our ESQL-Precompiler learns to accept some
new Syntax of the newest COBOL-Standard. Among this
those directives (">> ...").

Nost of these directives can be safely ignored by the
precompiler, some (">> SOURCE FORMAT ...") must
be interpreted.

Now I want some directives to affect the ESQL-PreCompiler
only. For instance:
[color=darkred]

or whatever.

The Proper-COBOL-Compiler people told me that ist
is easy to ignore directives of the form ">> IMP ESQL ...".
But also, the PreCompiler could generate something like

*>> IMP ESQL YYDEBUG ON
*>> IMP ESQL YYDEBUG OFF
*>> IMP ESQL USE-ALTERNATE-DATA-MAPPING

which is fine with the COBOL-Compiler - but it is not
exactly what the user actually wrote.

Which way is preferable?

Herwig



William M. Klein

2005-11-25, 3:55 am

I would certainly go with


as

*>>IMP ESQL

*should* be treated as a comment (while the first should be "meaningful" to
the compiler/precompiler combination.

Remember, it is POSSIBLE for the programmer to actually code in

*>>IMP This is a comment

and you shouldn't have to distinguish that from the "meaningful"[color=darkred]

directives (IMHO) <G>

"Herwig Huener" <Herwig.Huener@fujitsu-siemens.com> wrote in message
news:dm4geu$l12$1@nntp.fujitsu-siemens.com...[color=darkred]
> 2005-11-14 14:50:00 MET
>
> Ar this time, our ESQL-Precompiler learns to accept some
> new Syntax of the newest COBOL-Standard. Among this
> those directives (">> ...").
>
> Nost of these directives can be safely ignored by the
> precompiler, some (">> SOURCE FORMAT ...") must
> be interpreted.
>
> Now I want some directives to affect the ESQL-PreCompiler
> only. For instance:
>
>
> or whatever.
>
> The Proper-COBOL-Compiler people told me that ist
> is easy to ignore directives of the form ">> IMP ESQL ...".
> But also, the PreCompiler could generate something like
>
> *>> IMP ESQL YYDEBUG ON
> *>> IMP ESQL YYDEBUG OFF
> *>> IMP ESQL USE-ALTERNATE-DATA-MAPPING
>
> which is fine with the COBOL-Compiler - but it is not
> exactly what the user actually wrote.
>
> Which way is preferable?
>
> Herwig
>
>
>



Herwig Huener

2005-11-25, 7:55 am

2005-11-25 12:44:21 MET

"William M. Klein" wrote:

>I would certainly go with
>
>
> as
>
> *>>IMP ESQL
>
> *should* be treated as a comment (while the first should be "meaningful"
> to the compiler/precompiler combination.
>
> Remember, it is POSSIBLE for the programmer to actually code in
>
> *>>IMP This is a comment
>
> and you shouldn't have to distinguish that from the "meaningful"
>
> directives (IMHO) <G>


We now discussed it at length.

The thing is: The COBOL compiler "sees" the output of the PreCompiler.
SQL-statements, for instance, are commented out, and a few
COBOL-statement are generated (communication with the database).
So, in a listing, there is a different stuff from what the programmer
actually wrote anyway. The ESQL-COBOL-programmer knows that.

In a strict sense, COBOL with embedded SQL is no COBOL. An
implementor can do what he likes.

This implies the solution of making ESQL-directives into a comment.

Only problem: different dirctives (" >> IMP ...") may mean different
things to different vendors. - But this is the case anyway, even
without a precompiler.

Well - the thing is not urgent - we sleep over it.

If need be, in office hours.

Herwig



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com