[Info-vax] Oracle on VMS

Arne Vajhøj arne at vajhoej.dk
Tue Nov 29 22:02:02 EST 2016


On 11/22/2016 11:18 AM, Bill Gunshannon wrote:
> On 11/21/16 11:17 PM, Arne Vajhøj wrote:
>> On 11/20/2016 10:35 PM, Bill Gunshannon wrote:
>>> On 11/20/16 8:59 PM, Arne Vajhøj wrote:
>>>> On 11/20/2016 3:45 PM, Bill Gunshannon wrote:
>>>>> On 11/19/16 10:26 PM, Arne Vajhøj wrote:
>>>>>> And whether you want to implement the pre-compiler in Cobol?
>>>>>
>>>>> I have thought of that, too.  It has pluses and minuses but it is
>>>>> definitely doable.  I also have an example partial pre-compiler for
>>>>> C that is done in awk and yacc and the permission of the author to
>>>>> extend it or develop further along those lines.
>>>>
>>>> I don't think Cobol or Fortran would be the best languages
>>>> for the task.
>>>
>>> Actually, with the job being primarily reading simple records
>>> and writing simple records COBOL is probably ideal for the
>>> job.
>>
>> Hmm. I did not see the task as being primary reading and writing
>> records. But hey I have never written an embedded SQL precompiler,
>> so...
>
> Sure, you read the COBOL source file.  For most lines you merely
> write it back out again.  When you encounter an EXEC Block you
> have to parse it, figure out the correct COBOL to accomplish it,
> write that new COBOL out (usually leaving the EXEC Block there in
> the form of comments).
>
> Generating the new source file is easy in COBOL, figuring out what the
> new COBOL should be is where the devil hides.

And that where I feel that 90% of the code will be.

But it would be easy to verify. Just take the PgSQL C precompiler
source and see how many LOC of stdio stuff and how many LOC of
the devil.

Arne





More information about the Info-vax mailing list