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.

Similar Messages

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

  • Run shell script using Host Command

    How do I run Unix Shell Script using Host command?
    Please help me......

    Are you running the shell script from the same box as the forms are deployed in? If not, then HOST call will try to execute on the machine where the forms are hosted(App server).

  • 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

  • How to run expect script using SGD?

    Does any one know how I can run an expect script using the same executable SGD uses? I think the executable is /opt/tarantella/bin/bin/ttatcl, but it seems to be looking for an init file that I cannot find.
    Anyone tried this before?
    Thanks

    ttatcl is a TCL interpreter, the expect functionality is embedded into ttaexecpe and can't be used externally.
    Linux distributions usually include expect and you can find expect for Solaris here :
    http://www.sun.com/software/solaris/freeware/index.xml

  • How to run bash script using Calendar

    Hi folks.
    How can I run a bash script using Calendar?  I thought I had to park it in an AppleScript script which I could call, but that isn't really working.
    Any suggestions appreciated.
    Cheers

    Hi there.  Thanks for the reply.
    Some notes for the replies:
    - The shell script has no environment issues.  It's a straight mysqldump for a single database.
    - The AppleScript has the do shell script "path/to/script.sh" user name "root" password "wobblyhead" with administrator privileges
    - Calendar application can only recognize the .scptd and .scpt files, and not .app files.  Upon choosing my original .scpt file with the do shell script instruction, it just opens the file in AppleScript Editor. 
    So the file gets called, but for some reason, it just opens the file and won't run the file.  No options for choosing a format where it's actually run. 
    Not sure how to go about this. 
    Cheers

  • How to run WLST scripts using getopt in Eclipse, usin PyDev?

    There's probably several questions here, but perhaps they're all related.
    I have Eclipse 3.3.2, and the PyDev plugin, and WebLogic 9.2.2.
    I was able to create a simple PyDev project and "hello world" module, and execute it in Eclipse. I put "weblogic.jar" in the Jython interpreter list.
    Although I haven't tried any WLST functionality yet, I want to try loading the "getopt" module. I tried doing this on another project, way back in the 8.1.4 timeframe, and I even discovered a question I had asked about this ( [http://forums.bea.com/thread.jspa?threadID=600008087&start=0] ).
    The workaround Satyam describes there doesn't appear to apply in WL 9.2.2, and I'm also running on Windows, which apparently didn't have this problem back then.
    When I just try to do "import getopt", it just says there's no module by that name.

    Well, I've actually gotten past this. It was easy enough to append "$BEA_HOME/weblogic92/common/wlst/modules/jython-modules.jar/Lib" to sys.path. I've now got other problems, however. Running the scripts in Eclipse doesn't load the core WebLogic objects and methods, like "connect()". I can at least use PyDev to edit my code, but I have to run it outside of Eclipse.

  • 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 to run sql scripts using batch file for a web dynpro data dictionary

    Hi,
    I want to develop a sql script to be executed on the server alongwith the installation of a product to pre-populate web dynpro data dictionary tables required for the application.
    I further require to make the scripts independent of the database name,so that it can be run at any client environment.
    Your help will be appreciated and rewarded.

    See shoblock's answer
    call sql script from unix
    masterfile.sql:
    @file1 &1
    @file2 &2
    @file3 &3
    @file4 &4
    then just call the master script:
    sqlplus userid/password @masterfile <p1> <p2> <p3> <p4>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to pass video file name to run shell script

    Trying to make an automator script that will 1. Start a video capture, 2. Stop video capture, 3. Rename video, 4. Run Shell Script. Here is the shell script:
    for f in "$@"
    do
    echo "$f"
    /usr/bin/podcast --server my.podcast.server --user myself --pass mypass --submit --file $f --workflow "my workflow" --metadata /path/to/file
    done
    Question:
    Do I need to create a variable in the automator script to pass it to the script? If I need the variable do I also need to use both Set Value of Variable and Get Value of Variable? If I don't need a variable does $f need quotes around them?

    I'm not familiar with the terminal command /usr/bin/podcast so I don't know what it does but what i said is correct. to pass a file to this action you don't need any variables. the previous action in the workflow should output the video file you want to process, that's all. how you arrange that is up to you. it's clear that you have to fill in appropriate things in that shell script like " my workflow" and path to metadata. But if you have questions about how this shell action works you should ask people who made it.

  • SAP XI: How To Write Shell Script And use it in File Adapter On XI Server

    Hi,
    I want to split file at sender side in XI using Shell Script and then after i want to do
    Mapping.
    Can anyone tell me what exactly it means "write a script in UNIX shell on XI SERVER"?
    Regards,
    Akshay.

    Hi,
    You can execute a Unix script running in the XI server from the File communication channel. Ie. if you want to do something which was not part of XI adapter configuation , then you can make use of external unix script and you can execute those from the XI.
    For this, write a unix script and place in the XI OS level provided that path is accessible from PI Channel.
    E.g
    So u can use this in either Sender Channel to modify the data before it reaches into the Integration Server or in Receiver channel it is generally used to transfer the files into different location via Secure FTP
    SAP help: http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Blog:/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
    XI  can be in any OS.
    Hope this helps,
    Rgds,
    Moorthy

  • How to prevent Automator's "run shell script" to create fully decomposed forms of my strings ?

    I am using Automator's "run shell script" and I am seeing that it outputs fully decomposed forms of my strings.
    For example, when I set the action to "echo été" in a service (with "Replace selected text" activated) and run that into a Textwrangler window, I'll get fully decomposed forms that Textwrangler won't understand. But when I simply type that command into Terminal, I get my string in composed form.
    The problem is not the display issue, but the fact that if I want to run grep for example in "run shell script", I will not be able to find the proper strings since the forms are different.

    Originally I was using $@ to parse a string and get the result pasted by the service. That was a while ago. There, I noticed that some Japanese characters were messed up. Basically all the kana characters that come with voicing markers like が-ga (instead of か-ka) etc. I did not have the time to pursue that issue though.
    Then, last night, I found that a colleague of mine had tried to use $@ to feed to a local dictionary application called ding (http://ftp.tu-chemnitz.de/pub/Local/urz/ding/). His problem was with characters that had umlauts. After verifying how he wrote his action I remembered that I had similar issues with Japanese.
    Basically his command was "/path/to/ding $@"
    That's supposed to use the selected string as an argument to pass to ding, which will launch a Wish application where the string is used as the searched item.
    From Terminal, that works a treat. But the exact same line in Automator (with input as argument, not as stdin) messed the composition and the resulting string was not recognized by ding as a match to what it was supposed to match.
    So, I tried a few things to get to the core of the issue and found that a simple "echo [accented characters]" was enough to reproduce the difference in string handling between Automator and Terminal. That difference is also reproduced on a number of person's machines.
    I have a number of services that basically revolve on "run shell script" actions and involve 3rd party application outputs, preference files etc. so it would not be convenient to show that to you.
    I have sent a mail about this issue to the automator list yesterday too:
    http://lists.apple.com/archives/Automator-users/2011/Jun/msg00004.html

  • Urgent - How to Run a FM using CATT script tool,

    Hi All,
    How to Run a FM using CATT script tool,
    Thanks in advance,
    KSR

    choose  type as "Function module test" (if you are in release less than 6.4 abap) after entering into t.code SCAT.
    Pl. refer to this documentation for creating function module test cases
    <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCATTOL/CACATTOL.pdf">http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCATTOL/CACATTOL.pdf</a>
    reward if it helps
    Krishna

  • Trouble using Run Shell Script with python in Automator

    Hi. I have a python script I want to run in Automator (update_puzzles.py). All it does is check, rearrange and update files and there is not supposed to be any input. I can get the script to run outside of Automator, in Terminal, by navigating to the right directory and typing "python update_puzzles.py"
    I must not be setting up Run Shell Script correctly. I have it set to /bin/bash and Pass Input to stdin. The command line simply reads python /pathname/update_puzzles.py (where pathname is the path to the .py file, which I got by dragging the file onto the Run Shell Script command window). There are no actions before this in my workflow and the action after is View Results.
    The log says Run Shell Script failed, and the error is "Traceback (most recent call last):"
    Any suggestions?
    Thanks so much.

    If the script is expecting to do stuff with files in the same directory as the executable, you will probably need to add a statement to change to the appropriate working directory. The shell used in the Automator *Run Shell Script* action is a generic one that does not share any of the environment variables that the Terminal uses.

  • How to run itunes off an external hard drive using the new itunes

    I have windows 8.  I installed the new itunes and I want to know how to run itunes off an external hard drive. 
    thank you for your help.

    Same way as before, hold down shift as you start iTunes, Choose or Create a library.
    tt2

Maybe you are looking for