tags:

views:

275

answers:

4

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

[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.

A: 

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?

skaffman
not likely, unless assignment is := in Visual Basic
Aftershock
+5  A: 

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 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.

crb
+1  A: 

I'm sure that isn't 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?

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.

Frank V
Avaloq Script is not on that list :)
crb
I didn't create the list. Just suggesting a method to identify the language.
Frank V
A: 

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.

christian