Forum Stats

  • 3,854,773 Users
  • 2,264,421 Discussions
  • 7,905,782 Comments

Discussions

Meaning of enclosures like <% %>, <@ @>, <%= %>

720780
720780 Member Posts: 19
edited Nov 18, 2009 3:33AM in Data Integrator
Hello guys,

do you please have a list of "enclosures" and its meaning that can be used in odi? What I know:

<% %> - from Oracle Technology to Java
<%= %> - from Oracle Technology to Java - expects java function to return its result as string to the code
<@ @&gt; - from Jython Technology to Java?

I will be glad if you explain more usages or show me more enclosures or point me at documentation where it's explained.

Thanks!
Antonin
Tagged:

Answers

  • JohnGoodwin
    JohnGoodwin Member Posts: 30,471 Blue Diamond
    Hi,

    This post should help :- 3877981

    Cheers

    John
    http://john-goodwin.blogspot.com/
    JohnGoodwin
  • 720780
    720780 Member Posts: 19
    edited Nov 18, 2009 3:33AM
    Hi John,

    thanks for your very correct and helpful post.

    I was trying to figure out when ODI Variables get substituted. I would expect this order:

    1) <%
    2) <?
    3) # variables substitution


    I did a test to verify that:

    Test1
    --VAR1, Default value: some_value_var1, Alphanumeric, Latest value
    --VAR2, Default value: some_value_var2, Alphanumeric, Latest value

    procedure option OPT1 with default value #VAR1
    -- step 1, JavaBeanShell technology:

    java.lang.String vJNam1 = "";
    java.lang.String vJNam2 = "<%=odiRef.getOption("OPT1")%>";
    java.lang.String vJNam3 = "#PRJ.VAR1";
    @&gt;

    throw new Exception("\n\n <@[email protected]&gt; \n\n <@[email protected]&gt; \n\n <@[email protected]&gt; \n\n");

    --Throws:
    #VAR1

    #PRJ.VAR1

    Test2
    --I added into the code:


    java.lang.String vJNam1 = "*#VAR1*";
    java.lang.String vJNam2 = "<%=odiRef.getOption("OPT1")%>";
    java.lang.String vJNam3 = "#PRJ.VAR1";
    @&gt;

    --Throws:
    some_value_var1

    some_value_var1

    some_value_var1

    Test3

    --I again changed variable name:

    java.lang.String vJNam1 = "*#VAR2*";
    java.lang.String vJNam2 = "<%=odiRef.getOption("OPT1")%>";
    java.lang.String vJNam3 = "#PISKOVISTE.VAR1";
    @&gt;

    --It throws:
    some_value_var2

    #VAR1

    #PRJ.VAR1

    Result
    I consider to be correct only Test2. Test1 and test3 i consider to be buggy. Do you please agree with me or do you have any explanation for this (to me strange) behavior? I use 10.1.3.5.

    Thanks!
    Antonin

    Edited by: Antonin on Nov 18, 2009 12:33 AM
This discussion has been closed.