Plsql 这段代码是用Pl/Sql编写的吗?如果不是,那么它是什么语言?

Plsql 这段代码是用Pl/Sql编写的吗?如果不是,那么它是什么语言?,plsql,avaloq-script,Plsql,Avaloq Script,我遇到了这个代码。。。这是Pl/Sql吗?你认为是什么 [Script 1.0] script package up is import native def_1; procedure p( i_g text ) is l_txt text; begin with mem_m(idx) as msg do with book_aud(evt_id) as book do

我遇到了这个代码。。。这是Pl/Sql吗?你认为是什么

[Script 1.0]

    script package up is
    import native def_1;

     procedure p(

     i_g text
     )
     is

     l_txt text;
     begin



      with mem_m(idx) as msg do
        with book_aud(evt_id) as book do
          book.upd_pkt(
          evt_nr => i__nr
          ,ref_nr => msg.h.id
          ,account_nr => msg.h.id
          ,status => '1'
         );
        end with;
      end with;

     end p; 
我对进口感到惊讶,并以

这不是完整的代码。它是它的简化版。 它还包含熟悉的元素,例如:

   c_max constant number := 95;
    c_VE_BA constant text := 'A07000'; 
    -- comment

     if i_mt is null then
     return rpad('/',16);
     else
     if i_id = zconst_.c_JPY then
     l_fmt := '9999999999999999';
     else
     l_fmt := '9999999999999D99';
     end if;
     end if;

case i_typ_id
 when def_typ.contr then
 l_zuonr := zfx2.c_avqt;
 when def_typ.fx then
 l_zuonr := zfx2.c_avqd;
 when def_typ.fxswap then
 l_zuonr := zfx2.c_avqd;
 when def_typ.forex then
 l_zuonr := zfx2.c_avqd;
 when def_typ.xfer then
 l_zuonr := zfx2.c_avqd;
 when def_typ.intr then
 l_zuonr := zfx2.c_avqt;
 else
 assert(false,'Meta Typ');
 end case;
它看起来像是Pl/Sql的扩展。 根据回复和我自己的研究,我猜是Avaloq+PL/Sql。
我联系了Avaloq,我仍在等待正式答复。

我能想到的唯一一种带有“
with…end with
”语法的语言是visual basic。这可能是VB的某种脚本形式吗?

它看起来像是瑞士银行使用的脚本,虽然网上几乎没有关于它的内容,但我找到了一个与您的示例中的条款完全匹配的脚本

Avaloq脚本,Avaloq银行 系统的脚本语言,方便 输入特定的业务逻辑。这个 数据的结构,可以 通过Avaloq脚本访问的是 在DDIC(数据字典)中定义, 使得不必知道数据 存储结构

我肯定不是这样

我知道这并不能直接回答你的问题,但我建议你浏览一下清单。它可能列在这里。有几种不同编程语言的程序示例可能很难100%识别语言除非有人碰巧认出它并找到“指纹”来证明语言。。。你有更多的例子可以发布吗


我不认为这是一种函数式语言。了解这一点可能有助于缩小搜索范围。

是的,这是avaloq脚本。这是一种pl/sql预编译器,您应该能够在真正的pl/sql代码所在的位置找到一个名为s#up的包。

它肯定是Avaloq脚本。代码段是一个脚本包,由Avaloq编译器编译成PL/SQL。Avaloq脚本的要点是不允许直接访问数据库,并使Avaloq产品的定制者使用Avaloq API。API是Avaloq脚本语言和一整套其他方法,如设置要加载的规则表或定义表单、报告、工作流等的特殊语法。通常允许在其他类型的源中使用Avaloq脚本片段

Avaloq脚本有许多PL/SQL元素,但也可以找到一些VB语言概念。下面是代码中的一些注释,让您了解代码的含义

[Script 1.0]                      -- Have not seen other than 1.0 version

script package up is              -- The PL/SQL package name is going to be s#up
import native def_1;              -- import native means a PL/SQL package named 
                                  -- def_1 can be used, without native it is
                                  -- another Avaloq script package

 procedure p(                     -- declares a procedure with the name "p"

 i_g text                         -- input variable i_g defined text. 
                                  -- in PL/SQL this becomes a VARCHAR2
 )
 is

 l_txt text;                      -- local variable VARCHAR2(4000) in PL/SQL
 begin



  with mem_m(idx) as msg do       -- mem_m is a DDIC (Data Dictionary)
                                  -- It actually is a kind of "class" with
                                  -- fields and methods
                                  -- "with" is like in VB to avoid writing
                                  -- mem_m(idx) all the time e.g. mem_m(idx).h.id
    with book_aud(evt_id) as book do  -- book_aud is another DDIC that it is not
                                      -- prefixed with mem implies this is not a
                                      -- in memory structure but direct access
                                      -- to a Oracle table book_aud with index
                                      -- evt_id which looks undefined to me and 
                                      -- should bring a compiler error
      book.upd_pkt(                   --  method call in the book_aud DDIC
      evt_nr => i__nr                 -- like in PL/SQL named parameters
      ,ref_nr => msg.h.id
      ,account_nr => msg.h.id
      ,status => '1'
     );
    end with;
  end with;

 end p; 

我也可以对上面的其他代码片段进行评论,但我认为您已经了解了一般概念。mem_m和book_aud都不是我正在使用的Avaloq版本中已知的DDIC,不知道你从哪里得到它。因为你的文章已经有很多年了,我想这是一个非常古老的Avaloq版本。

在我看来,这不像PL/SQL。我在这里看到的PL/SQL唯一的共同点是“开始”,我无法链接它。我提取了我认为合适的答案。当你回信时,你会将答案标记为已接受吗?:)我可以,但我没有得到官方消息来源的答复。虽然我想有90%的可能性你是对的。我认为这不是Plsql。如果您尝试使用TOAD(使用“create or Replace procedure p(…..)”)编译此文件,则会出现编译错误:“syntax error”在“with mem_m(idx)as msg do…”行上。Avaloq脚本不在该列表中:)我没有创建该列表。只是建议一种识别语言的方法。