Passing parameters from shell script to OWB process flow

Hi all,
I am running OWB process flow (using the template script provided by oracle) and i want to pass two date parameters as shown below:
sqlplus -s $SQL_USER/$SQL_PWD@$ORACLE_SID @$HOME_DIR/src/vmc_oem_exec_script.sql OWB_OWNER VMC_POST_DW_PF_LOC_SIT PROCESS VMC_NM1_PORT_MAIN "," "P_DATE_FROM=$DATE_FROM,P_DATE_TO=$DATE_TO"
How do i catch those values in process flow and pass those to mappings in Process flow?
Do i need to create PF variables with same names or any name will do?
Thanks in advance

This document is explaining how to pass data between activities in process flow.
I am passing parameters from a shell script.
Any ideas,how to pass parameters from shell script and then initialize the process flow variables based on those values and then pass them further to mappings.
Thanks

Similar Messages

  • (urgent)how to run the sqlldr script in owb process flow?

    dear all:
    In my oracle warehouse ,i have to load much *.dat file
    into database with sqlldr in owb process flow. In owb process flow, I use the external process to run the sqlldr file with following configuration:
    1:======external process==========
    command : /app/ftpfile/sqlldr2.sh
    parameter list:
    success_threshold:0
    script:
    ================================
    2:create a file location in FILE LOCATION node:
    =============
    ODS_LOCAL_LOC
    =============
    3: in the runtime repository i register the location
    ============
    user name: oracle (for the sqlldr should run in oracle user)
    password : oracle
    host name: localhost
    root path: /app/ftpfile/
    ============
    4:configure the process flow
    ============
    path settings
    working locations:ods_local_loc
    ============
    after deploy them success in runtime repository,
    i run it ,it show me error following:
    ==========
    SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12545: Connect failed because target host or object does not exist
    ===========
    please help me!
    with best regard!

    Hello,
    our developers were getting this error code just the other day. They are using "sqlplus_exec_template" script to initiate these things. In our case, I had to do two thing:
    1) Modify their "initiator" script (the one that connects to runtime access user, and then calls "template") - it has to use tns connectivity "user/passwd@service_name"
    2) Create TNS entry (server side) for the "service_name" above.
    Now these SQL*LOADER mappings run successfully.
    Alex.

  • How to execute SQL scripts using OWB Process flows ?

    Hi,
    I have some SQL Scripts. I have to execute them using OWB Process flows.
    Can i get any document or link which helps me in achieving this?
    Thanks in Advance,
    SriGP

    Sutirtha,
    Thank you very much. I really appreciate all of your responses.
    I have one more question ( Sorry for flooding you with lot of questions :) )
    How to capture the errors which occured inside the SQL Scripts.
    My scenario is like this. I have two sql scripts Script_1.sql and Script2.sql namely. I would like to put dependency on the execution of the scripts.
    If Script_1.sql executes succesfully without any errors, then EXECUTE Script_2.sql
    else if Script_1.sql execution contains errors then DON'T EXECUTE Script_2.sql
    As of now, i observed that the Process flow shows Success State even if there is an error in the sql script execution. Because of which i was not able to put dependency on the execution of the scripts.
    I think i can do it by tweaking(changing) the code inside the SQL Scripts, like logging the errors in some log table and reading it before the next script execution.
    But the restriction is, I Should not touch/change the existing SQL Scripts.
    Do we have any mechanism in the ProcessFlows to identify the SQL Errors that occurred during execution of SQL Scripts ?
    Please suggest any idea on this. It will be great if you can help in this.
    Thanks in advance,
    SriGP.

  • Passing variables from shell script to separate sqlplus script

    Hi, I am having issues passing variables to a separate sqlplus script invoked by the shell script, e.g.
    #!/bin/sh
    DB_NAME=TEST
    PWD1=PA55W0rd
    echo exit | sqlplus / as sysdba @${DB_NAME}.sql ${DB_NAME} $PWD1 >> ${DB_NAME}.sql
    exit 0
    The script picks up the $DB_NAME variable fine, and therefore invokes the required sql script.
    However, when I pass the variable $PWD1 to the sql script I get an error.
    The script creates a database link:
    create or replace procedure new.link
    is
    begin
    execute immediate 'create database link TEST
    connect to TESTSCH identified by '$PWD1'
    using ''TEST''';
    end;
    exec new.link;
    output is:
    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at "NEW.LINK", line 4
    ORA-06512: at line 1
    any help appreciated!
    Edited by: 969765 on Apr 5, 2013 4:24 AM

    969765 wrote:
    that is a pretty unhelpful comment, this is actually my LAST resort I have looked up all the documentation etc.This is what I did...
    I went to the documentation:
    http://www.oracle.com/pls/db112/homepage
    I searched for "sqlplus" which gave me this documentation (under "SQL*plus program syntax")...
    http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_three.htm#i1169374
    I read the syntax:
    SQLPLUS [ [Options] [Logon|/NOLOG] [Start] ]and the subsequent information:
    >
    where Start has the following syntax:
      @{url|file_name[.ext]} [arg ...]and "Start" was hyperlinked, so I clicked on it, which took me to the section...
    >
    Start
    @} [arg ...]
    Specifies the name of a script and arguments to run. The script can be called from the local file system or from a web server.
    SQL*Plus passes the arguments to the script as if executing the file using the SQL*Plus START command. If no file suffix (file extension) is specified, the suffix defined by the SET SUFFIX command is used. The default suffix is .sql.
    See the START command for more information.
    >
    and here the "START" was hyperlinked, so I clicked on that...
    and hey presto, I ended up here:
    http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve044.htm#BACJJHDA
    ... where the arguments are described...
    >
    arg ...
    Data items you wish to pass to parameters in the script. If you enter one or more arguments, SQL*Plus substitutes the values into the parameters (&1, &2, and so forth) in the script. The first argument replaces each occurrence of &1, the second replaces each occurrence of &2, and so on.
    >
    ... clearly explaining that SQL*Plus substitutes the substitution variables &1, &2 etc. in the script with the passed in arguments.
    Your script was including a Unix style substitution, not an SQL*Plus script substitution, so that's seems to be the most likely cause of your problem.
    And still you haven't come back to say whether it's worked for you or not... leaving others guessing as to whether you still need help.

  • Passing password from shell script to Java

    Hi there,
    I have a shell script which has user id and password stored in variables. I call a java program from this shell script. I tried accessing this environment variable from java using system.getproperty and java is not getting the values. I have used export USERID PASSWORD
    and java classname to call it.
    I do not want to pass it as arguments because of security reasons. can anybody help me please.
    Thanks a bunch.

    Hi there,
    I have a shell script which has user id and
    password stored in variables. I call a javaprogram
    from this shell script. I tried accessing this
    environment variable from java using
    system.getproperty and java is not getting the
    values. I have used export USERID PASSWORD
    nd java classname to call it.
    Presumably you are using one of the newer java
    versions.
    Questions
    1. What statements are you using to set, export and
    run java?
    2. What shell are you using?
    3. How are you accessing the vars in java?
    I do not want to pass it as arguments because of
    security reasons. can anybody help me please.
    That is nonsensical. Putting it in env vars exposes
    it more than passing it as args.Thanks for replying jschell.
    1. I am using newer version java 1.5
    2. shell scripts gets it's variables from oracle reports through webservices.
    3. to run java i use java javaclassname3. I used EXPORT variablename and in java called system.getproperty(variablename)But system.getproperty is getting a null.
    And the decision about not passing it as args was made by our client. They think it's not safe to pass password.
    are they wrong??
    Please help me.

  • Passing parameters from mapping to mapping with in process flows

    I am new to OWB and i would appreciate if any one can suggest me on how to solve the issue i have.
    I am trying to pass a parameter from one mapping to another mapping.
    ex: key need to be passed
    start ----->A--->B--->C----->END
    B needs to pass the key to mapping C
    In B i have mapping Out put parameter and in C i have a mapping input parameter.
    In process flow palatte i could see Key as OUT and in C properties i could bind it to Key .
    but i try to deploy this mapping i am getting error below
    PF_PKG Create Error
    RPE-02040: Internal error: KEY cannot be converted to a constant value. Please correct the value. If the problem persists then please contact Oracle Support with the stack trace and details on how to reproduce it.
    TEST_PFCreate INFORMATIONAL
    RPE-02071: Deployment has been aborted due to a previously reported critial error.
    please suggest me how to pass parameters between mappings with in a process flow.

    Hi
    You have to use process flow variables. So the output of map A, say parameter P would bind to variable V and then the input of map B, say Q would bind to variable V. In this way you can push parameters from one activity to the other. Although the UI lets you bind B.Q to A.P, it should not, I think there is a bug reported on this.
    Cheers
    David

  • Execute Shell Script from OWB Process Flow

    I am trying to execute a Shell Script from a User Defined activity of OWB Process Flow. As I have not done such things earlier
    I need to know:
    1. Where I will put the Shell Script (move_file.sh)?
    2. What are the values in need to enter in the external process parameters (such as Command, Script, Result Code, Parameter List, Sucess Threshold etc)
    Please reply this thread. It would be a big help for me and probably for others as well.
    Kind Regards
    Zakir
    Message was edited by:
    Zakir

    Check this out,.
    http://download-uk.oracle.com/docs/cd/B31080_01/doc/owb.102/b28223/ref_processflows.htm#i1173362
    And answer to your question1, the shell script should be on the unix server.
    Regards

  • How can I pass parameters from one process flow to another process flow?

    How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
    Thanks in advance,
    Kishan

    Hi Kishan,
    Please post this question to the Warehouse Builder forum:
    Warehouse Builder
    Thanks, Mark

  • Problem while calling concsub from shell script

    Hi All,
    I am facing problem when I am trying to run CONCSUB utility from shell script.The same works well when I try it from command line.The only prob I am facing from shell script is assigning values to temporary variables.
    This is how my script looks
    #!/bin/bash
    export PARM5="$5"
    export PARM6="$6"
    export PARM7="$7"
    echo "INTPARM5=\"$PARM5\""
    echo "INTPARM6=\"$PARM6\""
    echo "INTPARM7=\"$PARM7\""
    echo $FND_TOP/bin/CONCSUB $1 ONT 'Order Management Super User, Vision Operations (USA)' $3 WAIT=Y CONCURRENT ONT $PROGRAM "$INTPARM5" "$INTPARM6" "$INTPARM7"When I try to run the above shell based concurrent program it doesn't pass the parameters as expected and it errors out saying "Wrong number of arguments to call the procedure"
    I tried my luck from some of the previous posts ({thread:id=2360776} ),but to vain
    If anyone has any ideas,please suggest!!
    Thanks in advance!!
    Edited by: sandy on May 4, 2013 12:54 PM

    Here are your proofs
    Proocedure
       PROCEDURE abc(--p_errbuf            OUT   VARCHAR2,
                                                --p_errcode           OUT   VARCHAR2,
                                 p_order_no          IN    NUMBER DEFAULT NULL,
                                                p_customer_id       IN    NUMBER DEFAULT NULL,
                                 p_name              IN    VARCHAR2 DEFAULT NULL
          IS
                    v_cname    VARCHAR2(200);
               v_ordered_date DATE;
               v_order_number  NUMBER;
              v_order_type    VARCHAR2(200);
    BEGIN
                fnd_file.put_line(fnd_file.output, 'Begin Execution');
       SELECT DISTINCT ac.customer_name,
                    d.ordered_date ordered_date,
                    d.order_number order_number,
                    x.NAME order_type
            INTO   v_cname
               ,v_ordered_date
               ,v_order_number
               ,v_order_type
               FROM oe_order_headers_all d,
                    oe_transaction_types_tl x,
                    wsh_delivery_details b,
                    wsh_delivery_assignments c
                    ,ar_customers ac
              WHERE 1 = 1
                AND ac.customer_id = b.customer_id
                AND d.order_type_id = x.transaction_type_id
                AND x.LANGUAGE = 'US'
                AND b.released_status = 'B'
                AND b.source_header_id = d.header_id
                AND c.delivery_detail_id = b.delivery_detail_id
                AND d.order_number=NVL(p_order_no,d.order_number)
                AND ac.customer_id = NVL(p_customer_id,ac.customer_id)
             AND x.name=NVL(p_name,x.name)
                AND NOT EXISTS (SELECT 1
                                FROM wsh_delivery_details b
                               WHERE 1 = 1
                                      AND b.released_status != 'B'
                                      AND b.source_header_id = d.header_id)
                                       --BETWEEN ('1213794') and ('1213797'))
                AND rownum<2;
            INSERT INTO xxc_temp(customer_name,ordered_date,order_number,order_type) VALUES(v_cname,v_ordered_date,v_order_number,v_order_type);
            COMMIT;
             fnd_file.put_line(fnd_file.output, 'Order Number is' || v_order_number);
             fnd_file.put_line(fnd_file.output, 'Order Type is'   || v_order_type);
       END;Script
    #!/bin/bash
    set -x
    export PARM5="$5" 
    export PARM6="$6"
    export PARM7="$7"
    sqlplus -s $1 <<EOF
    set head off feed off serverout on size 1000000
    exec abc('$PARM5','$PARM6','$PARM7');
    exit
    EOFNow when I run the 'XX Order Detail CSV Report' I get the below log and no Output
    +---------------------------------------------------------------------------+
    Application Object Library: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXKES_PDF_TRANSFER module: XX Order Detail CSV Report
    +---------------------------------------------------------------------------+
    Current system time is 06-MAY-2013 05:05:56
    +---------------------------------------------------------------------------+
    + export PARM5=66432
    + PARM5=66432
    + export PARM6=
    + PARM6=
    + export PARM7=Mixed
    + PARM7=Mixed
    + sqlplus -s APPS/APPS
    +---------------------------------------------------------------------------+
    Executing request completion options...
    Output file size:
    0
    +------------- 1) PRINT   -------------+
    Disabling requested Output Post Processing.  Nothing to process.  The output of the request is zero byte.
    +--------------------------------------+
    Finished executing request completion options.
    +---------------------------------------------------------------------------+
    Concurrent request completed successfully
    Current system time is 06-MAY-2013 05:05:56
    +---------------------------------------------------------------------------+After the concurrent program executed I queried the table xxc_temp and here you see the data
    SQL> select * from xxc_temp;
    CUSTOMER_NAME
    ORDERED_D ORDER_NUMBER ORDER_TYPE
    A. C. Networks
    18-FEB-13        66432 MixedMy procedure fetches the data fro given set of i/p parameters but it doesn't give o/p coz it's a host based conc program.Please advise if there's a way to get the o/p in a host based conc program
    Thanks!!

  • Launch OWB Process Flow via shell

    Hi all,
    I need to know in wich way I can launch an OWB Process Flow via unix shell.
    Could someone drop me the syntax, please?
    Thanks in advance
    Steve

    Hi Steve
    See this prost here;
    sqlplus_exec_template.sql
    essentially .. use sqlplus and the script sqlplus_exec_template passing the parameters.
    Cheers
    David

  • Please help to call oracle procedure with out paramter from shell script

    Hi
    I want to call a process with out parameter from shell script. I am calling process in shell script in below way
    function Process_loads {
    ( echo 'set serveroutput on size 1000000 arraysize 1'
    echo "set pagesize 0 term on verify off feedback off echo off"
    echo "BEGIN"
    echo " dbms_output.put_line('Before Calling The package'); "
    echo " x ( '$1', '$2', '$2', '$4', '$5', '$error_code'); "
    echo " dbms_output.put_line('After Calling The package'); "
    echo "EXCEPTION "
    echo " WHEN OTHERS THEN "
    echo " dbms_output.put_line('BIN_LOAD_ERROR' || SQLERRM); "
    echo " ROLLBACK;"
    echo "END;"
    echo "/" ) | sqlplus -s $USER/$PASSWORD@$SID
    Here $error_code is out paramter. All varaibles passed in process are declared with export command.
    When executing .sh it gives below error
    "sh ERROR at line 3: ORA-06550: line 3, column 99: PLS-00363: expression '' cannot be used as an assignment target ORA-06550: line 3, column 3: PL/SQL: Statement ignored".
    Please help to get rid from this error or please suggest how to call a oracle procedure with out paramter from unix shell script.
    Thanks in advance

    You can try this:
    From sql*plus
    SQL> ed
      1  create or replace procedure my_proc(p_id in int, p_result out int)
      2  as
      3  begin
      4  select 10 * p_id
      5  into p_result
      6  from dual;
      7* end my_proc;
    SQL> /
    Procedure created.
    SQL> set serveroutput on
    SQL> declare
      2  v_r int;
      3  begin
      4  my_proc(10,v_r);
      5  dbms_output.put_line(v_r);
      6  end;
      7  /
    100
    PL/SQL procedure successfully completed.
    from bash:
    testproc.sh:
    #!/bin/bash
    (echo 'set serveroutput on';
    echo 'declare';
    echo 'v_r int;';
    echo 'begin';
    echo 'my_proc(10,v_r);';
    echo 'dbms_output.put_line(v_r);'
    echo 'end;';
    echo '/';) | sqlplus -s u1/u1
    Console:
    oracle@mob-ubuntu:~$ chmod u+x testproc.sh
    oracle@mob-ubuntu:~$ ./testproc.sh
    100
    PL/SQL procedure successfully completed.With kind regards
    Krystian Zieja

  • How to run shell script using External Process in Process Flow?

    Hi,
    We can run external process using Process flow.
    I would like to run shell script as external process in Process flow.
    Could any one please explain it?
    Thanks and regards
    Gowtham Sen.

    HI,
    As you said I tried this case. I got the following error. The script is running successfully while I tested at unix command prompt.
    The error is as follows..
    tarting Execution PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: wc: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Sep 29 22:57:39 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    Completing Task PFPS_SMPL_RUNSHELL
    Completing Execution PFPS_SMPL_RUNSHELL
    My scenario is---
    I am trying to return a file name from one shell script. I created a external process for that. After completion of this process, I am running another script which takes that file name and trying to create a external table. The both scripts are runnning successfully. But while I am trying to run using process flow, its not coming.
    And I am not getting the way to catch the output of external process and pass it as parameter as another external process.
    Any suggestions are welcome.
    Thanks and regards
    Gowtham Sen.

  • Call a Graphical Calc view with input Parameters from a Script Based Calc View

    Hi All.
    I am trying to call a graphical calculation view with input parameters from a script based calculation view as below but getting syntax error:
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                 WITH PARAMETERS  ('PLACEHOLDER' = ('$$IP_START_DATE$$',:START_DATE),
                                     'PLACEHOLDER' = ('$$IP_END_DATE$$',:END_DATE));
    START_DATE  and END_DATE are input parameters of the script based calculation view.
    Can anyone please help me with the correct syntax for accomplishing this?
    Thanks,
    Goutham

    Hi Gautham,
    One more option  what i would like you to try is the below option , here i have just changed the order of passing nothing else.
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                   ('PLACEHOLDER' = ('$$IP_END_DATE$$','$$END_DATE$$'),
                                  'PLACEHOLDER' = ('$$IP_START_DATE$$','$$START_DATE$$'))
    Regards,
    Vinoth

  • Accept input from Shell script in sql*plus

    Hey! Guys..
    i need the following info.
    I am running a shell script from sql*plus. I need to accept a value from shell script into my .sql file.
    thanks..
    Harsh.

    prompt for input, pass to another shell
    # contract_status_prompt.sh
    read udate?"Enter week-ending date in format dd-mmm-yyyy: "
    contract_status_update.sh $udate >$FDWLOG/current/contractstatusupdate`date +%d%h%y`.log
    echo `date`
    # End contract_status_prompt.sh
    Read the variable passed and use in SQLPlus:
    # contract_status_update.sh
    echo "Running contract_status.sh"
    echo "create records for contract_status"
    echo `date`
    echo " "
    echo " date used is "; print $1
    echo " "
    sqlplus <<exit
    @$FDWSQL/sqlparms
    set time on
    prompt *** Set contract_status_period ***
    update contract_status_period
    set period_date = '$1';
    commit;
    exit
    etc.

  • Calling a java code from shell script.

    Hi all,
    I want to access a method of java class from a unix shell script.basiacally I want to know how to access a java code from a shell scriptt.If anybody has any info on this , kindly revert back to me.
    Rgds,
    Satya

    Hi,
    Suppose I hv a main() method.
    Then how to access that class from Shell Script.
    Can u send me the piece os compiling and running process for it.
    Rgds,
    Satya

Maybe you are looking for

  • How can i set up a distribtuion group on mail for iPhone?

    Hello, I was able to set up a distribution group on my "icloud.com" account.  I used my contacts and created a group and then went to my mail and was able to send it to that group. My next step is to do that on my iPhone 5.  I see the group under the

  • Labview freeze when accessing a custom menu with data on the clipboard

    This one has got me stumped:  When selecting a custom menu item with data on the clipboard the GUI freezes.  Freezes are longer for more data and longer for older versions of Labview.  I wrote the test code, attached, but the example "Menu Selection

  • How do i create a mask for an application?

    Hello. I pulled out an flex app out of Flash catalyst, and it has several "fx:designLayer"s containing images that slide off the stage. I'd like to hide the images going outside the stage borders with a mask. I tried:    <s:mask>     <s:Group id="mas

  • Document is being distributed - changes are not possible

    Dear Guru's I have an issue when making a quotation transaction. After i saved the quotation transaction, i would like to change the window into edit mode. So i have to click the display or change button and then after i click that button, there is a

  • How do i only sync the songs that are ticked??

    i used to be able to just have the songs in my library on my ipod that have a tick next to them, now it won't let me and i don't know how to make it so that this can happen again