Is it possible to use a ODI variable in a procedure

I am trying to call an external java program from the operating system (MS-DOS) using a procedure. This is possible using the os.system("<command>") syntax - declaring a procedure to use Jython. However, I want to be able to pass two ODI variables to the java program. I do not seem able to do this, is it possible ?
I also tried calling the OS command from within a package - but again cannot get the OS command to pass the variables.
I would appreciate any help on this.

Thanks for your response.
I am still unable to do this.
Problem is the procedure is "Jython" and it does not know what the ODI variables are.
I basically have two variables source and target which need to be passed to a java procedure.
So I created two VARIABLES in ODI - source and target.
I then have a procedure with the command;
import os
import sys
cmd = "java ConvFile"
rc = os.system(cmd)
when this runs it does not pass the variables.
if you have
import os
import sys
cmd = "java ConvFile"+#Tax_Updates.SourceFile+#Tax_Updates.TargetFile
rc = os.system(cmd)
then it does not know what #Tax_Updates.SourceFile and #Tax_Updates.TargetFile are and so just passes them as strings.
If you still think it is possible or anyone esle knows can you elaborate a little on the solution.
Thanks
Nick

Similar Messages

  • Problem: Use an ODI variable in a Java Procedure

    Hi and thanks in advance,
    i need to use a project variable in a java procedure i've written. In particular i should read a file (and manage it...), but its name is stored in avariable called #fileName that i refresh each time.
    writing something like:
    <% FileInputStream fis = new FileInputStream(C:\\"+"#filename");
    etc.
    etc.
    %>
    doesn't work...
    How can i use the value of my ODI variable inside the Java code?
    Please, help me if you can...
    Thank you very much.

    Any Idea? Please, this question is blocking me...

  • How to use an ODI variable in an IKM?

    Hi,
    I am trying use the value of ODI variable in IKM SQL Incremental Update. The variable contains the count of error records. My problem is how to use the variable in the IKM. I am trying to use the variable in an If condition like:
    <%if(%>#COuntReprocessRec<%>0){%>
    I have declared the variable as Numeric.
    Thanks.

    Hi,
    For the below requirement follow the below steps.
    I have to execute the 'Insert of flow into I$ table' step of IKM, only if Error records are present in my source table. The IKM i am using is IKM SQL Incremental Update.
    Create a new step before 'Insert of flow into I$ table' step, i say "Check Error Record".
    Command on source
    Technology : <your source technology>
    Schema: Whichever schema points to ur source error table
    Command:
    select count(*) as row_count from <table_name>
    Command on Target
    Technology : Jython
    Command:
    CountData=#row_count
    if CountData>0:
    ##raise ' \n\nThere are error records in source error table'
    Thats it.
    This will stop the flow in case of error records persist in ur source table, else it allow the flow to next Insert I$ step.
    P.S: Replace ## with TAB.
    Thanks,
    Guru

  • Is it possible to use a Shared Variable within a Chart?

    I have a shared variable between a container report and a subreport called {@ResponseCount}:
    whileprintingrecords;
    shared numbervar Responses:= DistinctCount ({Survey_Response.RecipID})
    I placed the variable in the report footer and the value is passing correctly.  I would like to use this shared value in a chart; however, it is not even listed in the Chart Expert as an available field.  I was placing the chart in Report Footer b.
    I have also tried moving the variable value to the Report Header and placing the chart in the Report Footer, with the same result.
    I tried changing the variable to a global variable, thinking that I was using the incorrect scope, but that passed a zero value instead.
    Any suggestions would be welcome.  Thank you.

    Thank you for the response.  Though I almost gave up on this, I did find a way to access the shared variable after all.  I created a formula that simply called the variable formula.  For this example, I was using a shared variable to pull a value from my container report into my sub report for use in a chart.
    In my container report I created the shared variable {@Get_Responses}:
    whileprintingrecords;
    shared numbervar Responses:= DistinctCount ({Survey_Response.RecipID})
    In my sub report I created the formula to call the above variable {@Fetch_Responses}
    whileprintingrecords;
    shared numbervar Responses;
    Then, again in my sub report, I created a second formula to call the above formula {@ResponsesForChart}
    {@Fetch_Responses}
    This last formula was then available for use in the chart I needed to create.

  • Is it possible to use Global class variable in a  BAdi

    Hello Experts,
      I have a requirement wherein ,
             I need the Reference of the Class Object to be used in a BAdi. The class object is defined as a global variable.
    By any means can I use the reference variable inside the BAdi.
    thanks

    Hi Hari,
    U can access any objects or variables in BADI only if they are used as parameters in it.
    So please check whether that global object is declared as parameters in the corresponding BADI.
    If so, you can surely use it.
    Reward points if this is useful.
    Regards,
    kamalapriya

  • Is it possible to use iFS API within java stored procedure?

    question:
    is it possible to use the iFS API for file handling
    within a java stored procedure (which is invoced by a trigger)?
    is there an "elegant" workaround if it is not possible?
    problem:
    my java code using the iFS API works fine outside
    the java stored procedure
    but invoked via trigger as java stored procedure
    it throws following exception:
    IFS-20102: Unable to start service (IfsDefault)
    i am using:
    oracle 9.0.1
    oracle internet file system 9.0.1.1.0
    windows 2000
    thanks

    thanks for your help
    i looked through the applications developers guide
    the basics behind advanced queueing (as far as i understand) is:
    program A inserts a message into the queue - and program B gets message from the queue and processes it
    question 1:
    but what is the difference between advanced queuing and a queue i create by myself
    (simply with a database table) and let application B (which runs in a loop)
    check if the queue is filled
    or am i missing something important which makes advanced queuing more practicable for my problem?
    question 2:
    you wrote about advanced queuing support in iFS 9.0.3, but the newest version i found was iFS 9.0.2
    did you reffer to the advanced queuing mechanism in general or to a spezial queuing feature in iFS 9.0.3?
    thanks

  • Is it possible to use a form variable (in memory) as input to render pdf?

    Hi,
    I understand that the render to PDF service takes URI as input, but what if I have a xdp form modified and stored in memory, and would like to use that to render PDF, how can this be done?
    Thakns in advance.

    Hi Jasmine,
    Thanks for the tip. So, is this what I need to do?
    I have an xdp form in the repository, and xml data I generate from a custom component.
    1. render the pdf form (merge xdp (no data) with xml data)
    2. convert pdf back to xdp (this xdp now includes data) and stored as a document variable in memory
    3. manipulate the xdp (via custom component)
    4. render the pdf form by passing the xdp (from step 3) in a document variable type as part of the data parameter, leaving URL blank.
    5. write pdf to disk
    This would work right? Is there another way?
    Thanks in advance.

  • Is it possible to use parameters as variables in templates?

    Hi there,
    When you see a statement like the following in your template:
    <$defaultPageTitle=lc("wwNgEditFolder")$>
    Is there any way to replace lc("wwNgEditFolder") for something more dynamic? For instance, if I replaced the above with something like this:
    <$defaultPageTitle=myURLVariable$>
    and then use the url as follows:
    .../idc/idcplg?IdcService=MY_SERVICE&myURLVariable=mytitle
    Would that work? or what else can I do to dynamically give values to my page.
    Thanks!

    Any parameter you pass to a Service in the QueryString will be available to you as a variable in the template.

  • How to assign a value to ODI Variable using ODI Procedure

    Hi ,
    Is it possible to assign a value to a ODI Variable using ODI Procedure ?
    If it is possible how we can do that.
    BEGIN
    IF #Counter=1
    Then
    #Next_Increment:=#Counter+1;
    End if;
    END;
    In my example I have 2 ODI Variables #counter and #Next_increment.
    I am trying to assign VALUE TO A ODI VARIABLE #next_increment from another ODI Variable #counter.
    thanks
    prasanna

    Prasanna,
    I have a similar requirement where I need to assign values to ODI variables within a procedure. How do we make use of an ODI package to accomplish this ?
    Actually, I have a sequence of ODI steps, and there is a call to a procedure 'LOG ERROR' from every step which gets called in case error occurs in any step. I just need to identify from which step the error came.
    Please help.

  • How to use ODI procedures into a ODI variable

    Hi,
    I have the below condition
    select c1 from table where c1>#ODIVAR1 and use the output of this query in a variable to define the package flow
    If output=0 package flow goes as XXX
    else
    flow goes as YYY.
    So please suggest how to use a ODI variable to capture the procedures putput and use it in package flow in this case.
    Thanks,
    Naveen.

    Step1 . Refresh the variable in the package, which have this query select c1 from table where c1>#ODIVAR1
    Step2. Evaluate above variable (operator = , value 0 )
    Step 3. If true Package flow xxx , else false yyy
    Please close the thread once you get the required flow.

  • Using a java variable in jsp-Reports?

    Hello everyone,
    is it possible to use a java variable in the xml-definition of a report? Something like
    <%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
    <% String someSqlStatement="select * from emp"; %>
    <rw:report id="myReport">
    <rw:objects id="myObjects">
    <report DTDVersion="9000010" name="myReport">
    <data>
    <dataSource name="Q_1">
    <select>
    <![CDATA[
    <%= someSQLStatement %>
    ]]>
    </select>
    It won't work that way (as the string is not evaluated and inserted into the definition, but how could it be done? Would be great to modify the report programatically that way? Any ideas?
    TIA,
    Marcel Jantz

    To pass values to Reports, you should use the "parameters" attribute in the <rw:report> tag. In the above case you would have:
    <% String myParameters="p_someSqlStatement=select%20*%20from%20emp"; %>
    <rw:report id="myReport" parameters="<%= myParameters %>">
    <rw:objects id="myObjects">
    <report DTDVersion="9000010" name="myReport">
    <data>
    <dataSource name="Q_1">
    <select>
    <![CDATA[ &p_someSqlStatement ]]>
    </select>
    The body of the <rw:objects> tag isn't evaluated since the Reports Builder needs to be able to open and load the <rw:objects> tag. As the Reports builder doesn't run the .jsp on open, it only parses it, the <rw:objects> tag can't have values that need to be evaluated.

  • Getting result of a PLSQL in ODI Variable

    Hi experts
    I created a PLSQL Block in ODI Under the procedure.
    I have a variable which will get the result of a query/procedure inside my PL/Sql Block
    I need to assign this value to an odi Variable. Is this possible if so how...
    Please explain
    Any help is really appreciated.

    So, in fact I never experiment the way to define an ODI variable into a procedure,
    but maybe you can just duplicate part of your code which set your PL/SQL variable and put it in the refresh tab of your ODI variable ?
    If it's not possible for performance reason maybe you can try something like this in the repository (the work one I think)
    update snp_var_data
    set var_v = newvalue
    where var_name = scenario.var_name;
    But I never experiment it but it should be something like this.
    Let me know if it works.
    Best regards,
    Brice.

  • Using BASH environment variables in xCode build configuration

    Hi All,
    Is it possible to use BASH environment variables (exported from /etc/profile, for example) in xcode build settings?
    Specifically, I am exporting a "BOOST_HOME" variable, and would like to referencing this variable in "User Header Search Path", but the obvious $BOOST_HOME doesn't seem to work?
    Thanks,
    Andrew

    I don't know much about XCode -- but to set environment variables for GUI applications you need to edit ~/.MacOSX/environment.plist. There's a description here:
    http://wiki.lyx.org/Mac/Environment
    After editing that file I believe you have to logout and back in for the changes to take effect.
    I swear I saw a GUI app to help edit that file, but I can't find it now...

  • Is it possible to read Essbase Substitution variables from ODI?

    Is it possible to read Essbase Substitution variables from ODI?

    Hi,
    You can do it with custom code, if you have a read of a blog I wrote :- http://john-goodwin.blogspot.com/2009/11/odi-series-planning-11113-enhancements.html
    About half way through I go into reading essbase sub vars using the essbase java API.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • ODI Variable using Variables

    Does anyone know if it is possible to use a Variable inside of another variable??
    first variable is Current_Sysdate which the query is:
    Select sysdate
    from dual
    Second, I have a variable called Count_Rec: this is to count the records...
    The SQL that drives this is:
    Select count(r2.pn)
    from register r2, pol p2
    where p2.pdt =
    (select max(p3.pdt)
    from pol p3
    where p3.pn = p2.pn and
    p3.pdt = to_date('#Current_Sysdate', 'mm/dd/yyyy')) and
    r2.pn = p2.pn and
    r2.pdt = p2.pdt
    when i test this in ODI i get an error:
    Error while executing query
    ORA-01858: a non-numeric character was found where a numeric was expected.
    This is being caused by the "*** r3.pdt = to_date('#Current_Sysdate', 'mm/dd/yyyy')) and ***" line (I know this because if i remove this line it compiles completely)
    My question is ... is it possible to use a variable within another variable in ODI??? if so does anyone have an idea what i am doing wrong here???
    I realize i could just replace the #Current_Sysdate with sysdate but the idea is they may want to run this for a different date... it may not always be sysdate... so they wanted a variable in that spot...

    DUplicate post

Maybe you are looking for

  • Blocked invoices for SRM PO

    Dear All I have requirement in that i need to create blocked invoices for SRM PO's . I have created a PO in SRM portal . Now the invoice need to be done at R3 side but i am not aware how i can create a invoice for the SRM PO's . Any one help me on th

  • Older ipod and can't use screen for selections

    I have tried number time to reboot my older ipod and can't get it to where the screen will react to touch rebooting doesn t seem to help

  • Fields not visible from custom WIW Infoset

    Hello, a custom infoset version (ZZZHR_XX_PA_ESS) in ESS Who is who works with molga=15 to display user details, its manager details (starting form standard field syhr_a_p0001_af_omngr_nr) and assistant details. When used with both the WIW functon an

  • How do I deauthorize a device I've already sold?

    I currently have 4 devices authorized to my Apple ID: My MacBook, my iPhone, my iPod touch and my iPad. The problem is, I've copmletely wiped and logged out of all accounts on my iPad, and sold it. I'm not sure if it's still authorized to my Apple ID

  • Disable "Safe Mode with Networking in Windows 7"

    Hello, Does anyone know, how to disable "Safe Mode With Networking" option from Windows 7 boot menu? Kind Regards Kalle Reivilä