Executing Operating system command

I have a file(ftp)-xi-file(ftp) scenario. I want to run a operating system command on output/processed file which is on a different physical server through a script. But I have seen my script is not working. But when I did the same on the same physical server on which XI is hosted it is working fine. Could you plz somebody advise whether it works ?? if it is the case what precaustions should we take ??
thanks
kumar

Hi Palnati
OS command will run on XI OS only so you need to use FTP parameter in the script and "permanent connection" as connection mode
Check this thread also
Re: FTP ReceiverChannel and OS commands help
Thanks
Gaurav

Similar Messages

  • Vista: use the windows program manager to execute operating system commands

    attempting to run forms 6 on vista... the forms app attempts a call sqlplus using the host builtin to populate some tables before calling the report.
    in windows vista i get a message box indicating "use the windows program manager to execute operating system commands".
    is this windwos vista message? would this have to do with permissions?
    any insight most appreciated and thanks in advance.

    I don't know about the HOST-problem, but..
    the forms app attempts a call sqlplus using the host builtin to populate some tables before calling the report.What about putting the logic from the SQL*Plus-scripts into a database-procedure and call that instead. I think,, with the current approach you will get problems at least when you have to migrate to Web (e.g. Forms 10g).

  • Executing operating system command within trigger or procedure

    Hello
    Can some one help me out as how to execute operating system command (unix or windows ex.. stop,start,cc,del or copy etc...) in a trigger or procedure.
    My requirement is, if some predefined error occure then listener listener should be stopped automatically.
    Thanks in advance
    kvss

    Here is some code to tell you how to do:
    First a small Java program that taker a string as a parameter and executes it as an os-command
    import java.lang.Runtime;
    import java.lang.Process;
    public class Commands extends Object {
    * Constructor
    public Commands() {
    // On NT the command should be like this "cmd /c del c:\temp\readme.txt"
    // exec execute('cmd /c del c:\temp\readme.txt');
    public static void execute (String cmd ) {
    try {
    Process p = Runtime.getRuntime().exec(cmd);
    try {
    p.waitFor();
    catch (java.lang.InterruptedException intex ) {
    intex.printStackTrace();
    System.out.println("Return = "+ p.exitValue());
    System.out.println(" Done ...");
    catch ( java.io.IOException iox) {
    iox.printStackTrace();
    ===================end of java ====
    Use loadjava to load it into the database and create a pl/sql wrapper around the java code.
    See the manual about loadjava details.
    Log in to sqlplus as SYSTEM and create a role for this purpose e.g. 'JAVA_ROLE'
    and exec the following as SYSTEM or SYS to make sure the user has the the needed privs.
    dbms_java.grant_permission('JAVA_ROLE','SYS:java.io.FilePermission','<<ALL FILES>>','read,write,execute,delete');
    dbms_java.grant_permission('JAVA_ROLE','SYS:java.lang.RuntimePermission','writeFileDescriptor',null);
    dbms_java.grant_permission('JAVA_ROLE','SYS:java.lang.RuntimePermission','readFileDescriptor',null);
    and you're done.

  • How to: execute operating system commands from PL/SQL

    System: IBM pSeries AIX
    Oracle: 11g Enterprise
    Is there a quick way to execute operating system commands from PL/SQL?
    Without creating a JAVA class....
    I need to execute a Loader script.
    I want to do this from within PL/SQL.
    I need to to do 4 things.
    Three require SQL scripts.
    The fourth is SQL*Loader.
    The usual way is with a UNIX script calling 3 SQL scripts and one Loader control file.
    Is there way to do all this from within ONE PL/SQL SCRIPT ??
    Just let me know.

    Is there a quick way to execute operating system commands from PL/SQL?
    NO
    Without creating a JAVA class....
    I need to execute a Loader script.
    I want to do this from within PL/SQL.
    WHY ON EARTH, such action will create a new connection and become a resource hog?
    I need to to do 4 things.
    Three require SQL scripts.
    The fourth is SQL*Loader.
    The usual way is with a UNIX script calling 3 SQL scripts and one Loader control file.
    Which is perfect for the purpose.
    Is there way to do all this from within ONE PL/SQL SCRIPT ??
    Just let me know.
    NO, there is NOT. Nor should there be. Why create unstable ineffcient Mickey Mouse systems, glued together by hacking?
    Sybrand Bakker
    Senior Oracle DBA

  • How to execute Operating System commands from Stored procedure.

    Any help on how to execute Operating System commands from stored procedures will be appreciated.
    Nanditha.

    Search the forums for 'External Procedure' and you will find example code that has been posted before.

  • Executing Operating system commands in ABAP

    Hi
    I want to execute a unix operating system command in an ABAP program. I remember seeing code which executes an operating system command. Could any please let me know about that code?
    Thank You.
    Eswar

    Hi,
    you can try something like this.
    data:cmd(254) type c.
    data: RESULT(255) OCCURS 100 WITH HEADER LINE.
                cmd = 'ls'.
    ** Execute command
      REFRESH RESULT.
      CALL 'SYSTEM' ID 'COMMAND' FIELD CMD
                    ID 'TAB'     FIELD RESULT-*SYS*.
    Kostas

  • How to execute operation system commands by using TSQL without enabling xp_cmdshell.

    Hi Experts
    Looking for advise if one can use operation system commands using TSQL without enabling xp_cmdshell. 
    actually using xp_cmdshell requires sysadmin privs which I am unable to provide (directly or using proc) to a user  but the user needs some operating system commands to execute for file manipulation from sql server session. Please share your thought.
    Best Regards 
    khalil

    >but the user needs some operating system commands to execute for file manipulation from sql server session
    See article here
    http://www.mssqltips.com/sqlservertip/2014/replace-xpcmdshell-command-line-use-with-sql-server-agent/:
    "Problem
    I need to run something from the command-line, but based on best practices xp_cmdshell has been disabled. The task that needs to run is an internal process that will originate from within SQL Server. Is there a way to do this without using xp_cmdshell?
    Solution
    The use of xp_cmdshell is generally frowned upon and is now recommended to be disabled, unless it is absolutely necessary.  There is a solution that works around this restriction via the use of SQL Server Agent.
    Wherever SQL Server is installed, SQL Server Agent is installed with it (except for SQL Express). SQL Server Agent has the ability to run job steps which invoke the command shell. And in the case that the job is owned by a member of the sysadmin fixed server
    role, the job will execute as the service account under which the SQL Server Agent is running. "
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Executing Operating system commands

    Hi,
    I need to execute sql*loader from APEX(sqlldr scott/tiger CONTROL=ulcas1.ctl ). How can I implement this in APEX. In oracle forms , I can execute this by a trigger when-button-pressed in a push button - host('sqlldr scott/tiger CONTROL=ulcas1.ctl ').
    Regards
    JIJU

    I took the mention of the Forms method to indicate that the requirement was another manifestation of that currently popular meme Calling calc.exe from APEX
    (At least I've thought there was a lot of it about at the moment...)
    @Jiju - there is no equivalent of host in ApEx. You can write your application to allow files to be uploaded to the server and parsed by your application, or written to the server file system and read as an external table. There are a lot of threads about this kind of thing in this forum: search for "file upload"...

  • Re: Operating System Commands

    Hi All,
    Can any one suggest me how to Execute Operating System Commands from ABAP Environment( i.e from ABAP Editor).
    Thanks & Regards,
    Jayarama Krishna M.

    Hi,
      Check
    https://forums.sdn.sap.com/click.jspa?searchID=11589075&messageID=3391825
    https://forums.sdn.sap.com/click.jspa?searchID=11589075&messageID=3442178
    Regards
    Kiran Sure

  • Exeecuting Operating System Commands in Weblogic

    Hi,
    as part of an offline process every time my database gets updated
    I have to call a tool ( Verity ) to create a collection. This is done
    from a Servlet where the Administrator simply clicks on a link and the
    verity collection is built and updated. Hence, whenever the database
    changes I need to call a system command 'mkvdk' to build a collection
    ( a flat file ).
    My servlet is running in Weblogic 4.5. Is it possible to
    execute operating system commands in java running in weblogic ? I know
    it is possible in java using
    Process runProcess =
    Runtime.getRuntime().exec(systemcommand);
    is it possible under weblogic ? because I have tried it and I get an
    I/O error .....
    Thanks,
    Gavin

    Hi.
    Please post the error you are seeing. Also, what JDK version are you
    running, and OS/platform.
    Thanks,
    Michael
    Gavin wrote:
    Hi,
    as part of an offline process every time my database gets updated
    I have to call a tool ( Verity ) to create a collection. This is done
    from a Servlet where the Administrator simply clicks on a link and the
    verity collection is built and updated. Hence, whenever the database
    changes I need to call a system command 'mkvdk' to build a collection
    ( a flat file ).
    My servlet is running in Weblogic 4.5. Is it possible to
    execute operating system commands in java running in weblogic ? I know
    it is possible in java using
    Process runProcess =
    Runtime.getRuntime().exec(systemcommand);
    is it possible under weblogic ? because I have tried it and I get an
    I/O error .....
    Thanks,
    Gavin--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Re: Error while Execute External Operating System Command using T.code SM49

    Dear Experts,
    I Have uploaded one .exe file in the application server (eg: sum.exe) and created the OS command in SM69 transaction .
    And maintained the application server path in the 'operating system command' field in SM69 t.code.
    Our SAP system, oprating system is UNIX.
    After I have executed the external command using transaction SM49 , but I got the below error.
    Can not execute external program (permission denied) , External program terminated with exit code 1
    Immediately I run the SU53 transaction code to check the authorization, but Authorization was successful.
    Could any one please help on this error.
    Thanks in advance.

    >>Can not execute external program (permission denied) , External program terminated with exit code 1
    You need to give the permission as 755 to your file.
    >>I Have uploaded one .exe file in the application server (eg: sum.exe)
    You are on UNIX and do not expect to any result of .exe file as UNIX doesn't know about this.

  • Executing a Operating System command from Stored Procedure ??

    I want to execute a Operating System command from a PL/SQL Stored Procedure, can anyone suggest me how can I do this ??
    I am on Sun-Solaris with Oracle 8.1.7 database.
    Please do email me at [email protected]
    Thanks in Advance,
    Ramesh L.

    Are you using a webserver? If so, you could make your operating system script into a CGI program, then execute it from pl/sql using utl_http.request.

  • Execute external operating system command

    Hi Friends,
    I have a requirement to run a script file with extention '.PL' on the application server using ABAP.
    i have sample how to run it in XI.
    XI3.0 provides a very simple way of handling this using the "Operating System Command" in the File Adapter.
    I post my output file in the following folder,
    /usr/sap/sapout/test/
    The shell script is available in the following path,
    /usr/sap/bin/convert.pl
    The figure below explains as to how we call the shell script using "Operating System Command".
    File Acess parameters
          Target Directory      = /usr/sap/sapout/test/
          File Name Scheme = TestOutput.txt
    Processing Parameters
         File Construction Mode          = Add Time Stamp
         File Type                              = Binary
         Operating System Command = /usr/sap/bin/convert.pl %F
    I have to do the same thing in ABAP as it has been done for XI as mentioned in the above example.
    My operating system is UNIX.
    If any one can give me a sample it would be really helpful to me.
    Thanks in advance,
    Arundhathi.

    Hi Arundhati,
    You can run operating system commands from ABAP.
    e.g. If you want to change UNIX right for any file, you can use following code.
    lv_ucomm  = 'chmod a+rwx 123.txt'.
    CALL 'SYSTEM' ID 'COMMAND' FIELD lv_ucomm.
    whatever command you provide in Field parameter ( lv_ucomm in the above case ), ABAP run that command at operating system level.
    In your case, you can provide command in lv_ucomm to run script at operating system level.
    Hope it will help you.
    Regards,
    Naren

  • How to Run Operating System Command Before/After Message Processing SAP PI

    Hi,
    We are trying to execute multiple commands via "Operating System Command Before/After Message Processing".
    When we use single command say for example cp or mv (copy or move) the commands get executed fine.
    eg: cp %F /var/opt/data/outbound/Test/Dummy.txt 
    /this works fine/
    when we club commands together or try to redirect the outputs of commands, none of the commands get executed.
    eg:
    cp %F /var/opt/data/outbound/Test/Dummy.txt ; rm %F
    or
    wc -l %F > /var/opt/data/outbound/Test/Dummy.txt
    Is it possible to execute multiple commands or redirect the output  of commands without using a shell script? The PI server we are working on iis hosted on UNIX environment.

    Hi Harleen,
    try like this
    cp %F /var/opt/data/outbound/Test/Dummy.txt ; rm %F
    instead of semicolon try this
    (1) &
    command1 & command2
    Execute Command1 and then execute Command2
    (2) &&
    command1 && command2
    Runs the command2 only when command1 doesn't Complete successfully
    (3) ||
    command1 || command2
    Runs the second command if the first command had an error
    (4) ()
    (command1 || command2) || (command3 & command4)
    Defines the order in which commands are to be executed
    Regards
    Suraj

  • Unzip file using operating system command in file/ftp receiver adapter

    Hi,
    I'm wonderdering how to unzip a zip-file in the receiver file/ftp adapter. I know it is possible to do it using the 'Operating system command' feature, but somehow the command I use seems to be ignored! (I'm using SP14, unix).
    The command I entered is quite simple: unzip %F (also tried the %f, but i guess it doesn't really matter wich on I use).
    Is it possible that I'm unzipping to another directory than the one i expect? the unzip should be performed to/in the current directory, and assumingly current directory is the one stated in the 'Target Directory', right?
    Hope someone can clearify this issue for me.
    Best regards,
    Daniel

    Hi Daniel,
    It seems to me also, that the files are being unzipped to a different location than what you are expecting. The OS command might getting executed in some default location(i am trying to fnd that out)on the server and not in the target directory of the channel(It seems logical to me)....
    If you have time...pls try this out & see whether this would help...
    Have a shell script written with the following commands in them
    cd <path to target directory>
    unzip $1(filename from the channel)
    and in the OS command in the Channel give....
    <absolute path to the .sh file> %F
    Thanks,
    Renjith.

Maybe you are looking for

  • Mucic Manager Problems

    Nokia Music Manager 1.0 that is integrated with Nokia PC Suite is totally useless. I cannot believe that Nokia would publish software this awful. I am trying to use it with an N91 - it's all very well that the phone has 4GB of storage space, but usel

  • Installing Boot Camp - There is only one partition available for Windows

    I have a brand new Mac Mini. Ran Boot Camp assistant and created Windows partition - 80 GB. Then when instructed, inserted Windows XP install disc. It went through some install steps then came to screen where you chose the partition to install Window

  • Cannot transfer files using Creative Media Sou

    I cannot Cannot transfer files using from my PC to my Creative Jukebox 0GB using Creative Media Source. Since I installed Windows Media Player 0, it seems that Windows Media Player 0 is the only program enabled to transfer files to my creative Jukebo

  • Factory Update resumed for the EOS-1D C Cinema EOS Camera

    Firmware Version 1.3.5 fixes a phenomenon in which the line-level audio input function of some EOS-1D C cameras does not operate as expected with Firmware Version 1.3.4. Please read our announcement to learn more about the Factory Update.

  • ITune display error -53 when sync ipod on Windows 8

    I'm try to sync new music to my iPod by iTune. After connect iPod to computer it will shown message "iPod have problem choose repair harddisk"   After repair finished my music on ipod all lost. After restore by iTune message shown -53 . Can I fix it?