[Info-vax] Other than Oracle, What MySQL/DBMS options are there for OpenVms?

Jan-Erik Söderholm jan-erik.soderholm at telia.com
Tue Mar 26 14:39:36 EDT 2019


Den 2019-03-26 kl. 18:12, skrev Arne Vajhøj:
> On 3/26/2019 10:53 AM, Jan-Erik Söderholm wrote:
>> Den 2019-03-26 kl. 15:30, skrev Arne Vajhøj:
>>> On 3/26/2019 10:18 AM, Jan-Erik Söderholm wrote:
>>>> Den 2019-03-26 kl. 03:23, skrev Arne Vajhøj:
>>>>> * stored procedures in other languages than SQL
>>>>
>>>> Yes.
>>>> "User-defined functions allow you to execute subprograms written either
>>>> in 3GL host languages (such as C or SQL Module language) or in the SQL
>>>> procedural language."
>>>
>>> So you can write an SP in C/whatever.
>>
>> Yes and no. "Stored Procedures" are written in SQL (as usual).
>>
>> *External* procedures/functions can be written in anything, Macro
>> is just fine. This procedure calls a Macro routine:
>>
>> create module CPMS_EVENT_SUBM_MODULE
>>
>>      procedure CPMS_EVENT_SUBM_PROC (
>>          in    :EVENT
>>              INTEGER)
>>      ;
>>    begin
>>      declare :stat integer;
>>      call zvsubmit2('CPMS_QUE',
>>                     'mk_com:MK_CPMS.com',
>>                     cast(:event as char(8)),
>>                     'N',
>>   Cancel            'Y',
>>                     'N',
>>                     'MK',
>>                     :stat);
>>    end;
>>
>> end module;
>>
>> And the external routine doesn't have to be written at all,
>> it can be a system service in VMS.
> 
> Interesting.
> 
> But it seems to be more external than the SP
> in other languages, that has access to the database
> context, can return result sets etc..
> 

Of course. But then you use stored procedures. What is pour point?

External procedures/functions are for the cases that are not
specifically database oriented, We use it to submit a batch job
by an "instert trigger" on a table. Actually the example above.

>>> Does RDB support returning multiple result sets or only a single result 
>>> set?
>>
>> You define what paramaters are "in" or "out".
>> We are not talking about "result sets" like a stream
>> of records here.
> 
> Typical SP's whether SQL or another language allow to
> return result sets.
> 
> But only some allow a SP to return multiple result sets.
> 

Well, your external procedure/function (in any language) can in
itself make a database attach and return a "result set" in some
table.


> Arne




More information about the Info-vax mailing list