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

时间:2022-07-21 00:17:30

I have encountered this code... Is this Pl/Sql? What do you think it is?

我遇到过这段代码......这是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; 

I am surprised by import and end with;

我很惊讶进口和结束;

It is not the full code. It is reduced version of it. It also contained familiar elements such as:

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

   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;

It looks like an extension of Pl/Sql. Based on the responses and my own research, I guess it is Avaloq+PL/Sql. I contacted Avaloq,I am still waiting for official answer.

它看起来像是Pl / Sql的扩展。根据回复和我自己的研究,我猜它是Avaloq + PL / Sql。我联系了Avaloq,我还在等待正式答复。

5 个解决方案

#1


It looks like Avaloq Script, used by (ahem) Swiss banks, and while there is very little about it online, I found a grammar which perfectly matches the terms in your samples.

它看起来像Avaloq脚本,由(ahem)瑞士银行使用,虽然在网上很少有,但我发现了一个与你的样本中的术语完全匹配的语法。

Avaloq Script, the Avaloq Banking System's script language, facilitates entering specific business logic. The structure of the data that can be accessed through Avaloq Script is defined in a DDIC (Data Dictionary), making it unnecessary to know the data storage structure.

Avaloq Script是Avaloq Banking System的脚本语言,有助于输入特定的业务逻辑。可以通过Avaloq脚本访问的数据结构在DDIC(数据字典)中定义,因此不必知道数据存储结构。

#2


yes it is avaloq script. its some kind of pl/sql pre compiler, you should be able to find a package called s#up where the real pl/sql code resides.

是的,它是avaloq脚本。它的某种pl / sql预编译器,您应该能够找到一个名为s#up的包,其中包含真正的pl / sql代码。

#3


It definitely is Avaloq Script. The code snippet is a script package that Avaloq compiler compiles into PL/SQL. The point of Avaloq Script is to disallow direct database access and make the customizer of the Avaloq product to use the Avaloq API instead. The API is the Avaloq script language and a whole array of other ways like setting up rule tables to be loaded or special syntax to define forms, reports, workflows etc. often allowing snippets of Avaloq script within that other kind of sources.

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

Avaloq script has many PL/SQL elements but also some VB language concepts can be found. Here are some comments in the code to give some idea what the code means.

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; 

I could also comment on the other code snippet above but I think you already get out the general concept. Neither mem_m nor book_aud is a known DDIC in the Avaloq version I am working with, wonder where you got it from. Since your post is many years old I suppose this was a very old Avaloq release.

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

#4


I'm sure that isn't PL/SQL.

我确定这不是PL / SQL。

I know this doesn't directly answer your question but I might suggest that you go though the list here. It might be listed in here. There are several examples of programs in different programming languages. It may be hard to 100% identify the language unless someone happens to recognize it and finds a "finger print" to prove the language... Do you have more examples you could post?

我知道这并没有直接回答你的问题,但我可能会建议你通过这里的列表。它可能会在这里列出。有几个不同编程语言的程序示例。可能很难100%识别语言,除非有人碰巧识别它并找到“指纹”来证明语言...你有更多的例子可以发布吗?

http://www.ntecs.de/old-hp/uu9r/lang/html/lang.en.html

I don't think that is a functional language. Knowing this might help narrow your search.

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

#5


The only language I can think of offhand that has "with...end with" syntax is visual basic. Could this be some scripting form of VB?

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

#1


It looks like Avaloq Script, used by (ahem) Swiss banks, and while there is very little about it online, I found a grammar which perfectly matches the terms in your samples.

它看起来像Avaloq脚本,由(ahem)瑞士银行使用,虽然在网上很少有,但我发现了一个与你的样本中的术语完全匹配的语法。

Avaloq Script, the Avaloq Banking System's script language, facilitates entering specific business logic. The structure of the data that can be accessed through Avaloq Script is defined in a DDIC (Data Dictionary), making it unnecessary to know the data storage structure.

Avaloq Script是Avaloq Banking System的脚本语言,有助于输入特定的业务逻辑。可以通过Avaloq脚本访问的数据结构在DDIC(数据字典)中定义,因此不必知道数据存储结构。

#2


yes it is avaloq script. its some kind of pl/sql pre compiler, you should be able to find a package called s#up where the real pl/sql code resides.

是的,它是avaloq脚本。它的某种pl / sql预编译器,您应该能够找到一个名为s#up的包,其中包含真正的pl / sql代码。

#3


It definitely is Avaloq Script. The code snippet is a script package that Avaloq compiler compiles into PL/SQL. The point of Avaloq Script is to disallow direct database access and make the customizer of the Avaloq product to use the Avaloq API instead. The API is the Avaloq script language and a whole array of other ways like setting up rule tables to be loaded or special syntax to define forms, reports, workflows etc. often allowing snippets of Avaloq script within that other kind of sources.

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

Avaloq script has many PL/SQL elements but also some VB language concepts can be found. Here are some comments in the code to give some idea what the code means.

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; 

I could also comment on the other code snippet above but I think you already get out the general concept. Neither mem_m nor book_aud is a known DDIC in the Avaloq version I am working with, wonder where you got it from. Since your post is many years old I suppose this was a very old Avaloq release.

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

#4


I'm sure that isn't PL/SQL.

我确定这不是PL / SQL。

I know this doesn't directly answer your question but I might suggest that you go though the list here. It might be listed in here. There are several examples of programs in different programming languages. It may be hard to 100% identify the language unless someone happens to recognize it and finds a "finger print" to prove the language... Do you have more examples you could post?

我知道这并没有直接回答你的问题,但我可能会建议你通过这里的列表。它可能会在这里列出。有几个不同编程语言的程序示例。可能很难100%识别语言,除非有人碰巧识别它并找到“指纹”来证明语言...你有更多的例子可以发布吗?

http://www.ntecs.de/old-hp/uu9r/lang/html/lang.en.html

I don't think that is a functional language. Knowing this might help narrow your search.

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

#5


The only language I can think of offhand that has "with...end with" syntax is visual basic. Could this be some scripting form of VB?

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