Problem when calling external program

Hi,
I have a strange problem and no more idea how to solve it.
What I do:
In Java I call an external Fortran-exe with Runtime.getRuntime().exec(...) This Fortran program creates 4 files.
What I get:
One of the 4 files is incomplete, the first few lines are missing.
What makes me wonder:
When I take the exec-statement to the commandline and let it run there, everything is fine and the files contain all the info I need. All the 4 files are correct then.
What I also tried:
I tried to copy the (incomplete) file within Fortran. That means when I call the Fortran program I get 2 identical files then but with different filenames. Doing so on the commandline everything is fine again. But again, the same commandline String called in the exec in my Java program it is getting worse: The formerly incomplete file is empty now with 0 bytes.
Even if I wait for the process to finish does not help.
I do not understand it any more and would really like to know what happens there, why, and what can I do to avoid it or to get my complete output files. What does Runtime.getRuntime().exec(myString) do different than when I take the myString on the commandline?
Any hints welcome.
TIA

Hi,
unfortunately this does not help. I have already about 15 Fortran programs running this way which work accurately. So a possible problem with output stream does not look reasonable to me in this case.

Similar Messages

  • How to call external programs?

    I have seen people call external programs through LabVIEW and was curious what functions you could use to do this.
    I'm pretty sure its using one of the ActiveX functions  or maybe 'open application reference .vi'.
    Can anyone tell me (or show me) a quick example of how to open an external program (ie excel,  notepad, etc) programatically
    Cory K
    Solved!
    Go to Solution.

    Cory K wrote:
    Where did they get this:
    Kudos for going from "I don't know to start" to "Let's stump Ben" with only the second post to this thread.
    I either copy it from an example or try to browse to it.
    NOTE:
    If you plan to work with MS ActiveX objects, I found it very helpful to do a custom install of Office and make sure the help files for VBA are loaded. These will at the least give you an idea of what the methods are and what parameters go with each.
    Ben
    Message Edited by Ben on 12-31-2008 11:09 AM
    Message Edited by Ben on 12-31-2008 11:13 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Browse.PNG ‏24 KB

  • To call external program

    I would like to know if exists a way of to call external program in windows ce. I'm using cvm J9.

    I don't know how is configured Windows CE, but Windows ME is MIDP 2.0, and formRequest(URL) do it (but work only since MIDP 2.0).
    It's work, but in my case, i try to add arguments, and it doesn't work with : URL = "/Program Files/MyProg/myProg.exe arg1 arg2". If somebody have found a solution...

  • 11g preview version 3: JNDI Lookup problem when calling PL/SQL webservice

    Hi,
    I am experiencing a problem when calling a PL/SQL Webservice from a BPEL flow.
    When I am trying to test my BPEL flow from the SOA Console I get a "Error doing JNDI lookup on target jdbc/MyDBDS"
    The composite application including the BPEL flow is deployed in one application. "CompositeApp" and the web service in another Application called
    "WebServiceApp".
    Both applications are deployed on the same built in OC4J Application Server
    If I test the webservice in isolation from the SOA console it works. It also seems to be working if the webservice and the and the BPEL flow is in the same project.
    If anyone has any ideas on this one I would be very greatful.
    Thanks in advance

    try creating the MyDBDS connection as an application resource in both applications.

  • [svn] 4741: Fix to RTE problem when calling captureEndValues() without having first called captureStartValues().

    Revision: 4741
    Author: [email protected]
    Date: 2009-01-29 13:43:53 -0800 (Thu, 29 Jan 2009)
    Log Message:
    Fix to RTE problem when calling captureEndValues() without having first called captureStartValues(). outcome of a patch submission, although this fix is different than the one suggested in the patch.
    QE Notes: None
    Doc Notes: None
    Bugs: patch sdk-17060, bug sdk-16452
    Reviewer: Jason
    tests: checkintests, Mustella: tests/Effects tests/ListDataEffects
    Ticket Links:
    http://bugs.adobe.com/jira/browse/sdk-17060
    http://bugs.adobe.com/jira/browse/sdk-16452
    Modified Paths:
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/effects/Effect.as

    Look for the "contact us" on the verizon pages.  http://www22.verizon.com/content/contactus/
    Almost all of the forums here are peer to peer.  Some verizon admins will occasionaly step in and try to get you help.  These admins are usually not able to solve problems for you themselves, but can sometimes give advise or get you in contact with someone who can.

  • Call external program in background mode

    Hi,
    I am creating a PO using bapi BAPI_PO_CREATE1 in exit USEREXIT_SAVE_DOCUMENT_PREPARE.
    I dont want to write the code in my exit. Instead I want to write the code in a Z program and call it in my exit.
    My Problem.
    How do I call my z program in my exit so that I can pass internal tables from my exit to the z program. Also I want to schedule the call of my external program for background processing.
    I am trying with SUBMIT ZPROG AND RETURN. But not able to pass an internal table.
    I tried PERFORM BAPI_PO_CREATE IN PRGRAM ZPROG, but in this case not able to schedule it in background.
    Please advise.
    Regards,
    Shobhit

    Hi Rich,
    Im setting runtime error:
    My Code in Exit: (xvbfa is the table which i wanna pass)
    concatenate 'SERVICEPO' sy-datum into l_key.
    export xvbfa = xvbfa
                  to shared buffer indx(st) id l_key.
    My Code in the called program ZMM_SERVICE_PO
    Runtime Errors         CONNE_IMPORT_WRONG_OBJECT_TYPE
    Exceptn                CX_SY_IMPORT_MISMATCH_ERROR
    Date and Time          05.12.2005 21:41:54
    ShrtText
         Error when attempting to IMPORT object "XVBFA".
    What happened?
         Error in ABAP application program.
         The current ABAP program "ZMM_SERVICE_PO" had to be terminated because one of
          the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
         When importing the object "XVBFA", the object in the
         dataset had a different type from the target object in the program
         "ZMM_SERVICE_PO" (object types: field, field string/structure, table).
         table).
    Error analysis
         An exception occurred. This exception will be dealt with in more detail
         below. The exception, assigned to the class 'CX_SY_IMPORT_MISMATCH_ERROR', was
          not caught, which
          led to a runtime error. The reason for this exception is:
         The object "XVBFA" has a different object type in the dataset from
         that in the target program "ZMM_SERVICE_PO". (Object types: Field, flat
          structure,
         deep structure, flat table, deep table).
    Missing Handling of System Exception
        Program                                 ZMM_SERVICE_PO
    Trigger Location of Exception
        Program                                 ZMM_SERVICE_PO
        Include                                 ZMM_SERVICE_PO
        Row                                     43
        Module Name                             START-OF-SELECTION
    Source Code Extract
    Line  SourceCde
    REPORT  ZMM_SERVICE_PO.
    DATA: l_poheader      LIKE bapimepoheader.
    DATA: l_poheaderx     LIKE bapimepoheaderx.
    DATA: l_poitem        LIKE bapimepoitem     OCCURS 0 WITH HEADER LINE.
    DATA: l_poitemx       LIKE bapimepoitemx    OCCURS 0 WITH HEADER LINE.
    DATA: l_cond          LIKE BAPIMEPOCOND     OCCURS 0 WITH HEADER LINE.
    DATA: l_condx         LIKE BAPIMEPOCONDX    OCCURS 0 WITH HEADER LINE.
    DATA: l_poschedule    LIKE bapimeposchedule OCCURS 0 WITH HEADER LINE.
    DATA: l_poschedulex   LIKE bapimeposchedulx OCCURS 0 WITH HEADER LINE.
    DATA: l_purchaseorder LIKE bapimepoheader-po_number.
    DATA: l_return        TYPE BAPIRET2 OCCURS 0.
    DATA: l_error_found   TYPE c.
    DATA: l_show_messages TYPE c.
    DATA: l_eindt(10)     TYPE c.
    DATA: l_answer        TYPE c.
    DATA: l_VBAK          TYPE STANDARD TABLE OF VBAK WITH HEADER LINE.
    DATA: l_VBFA          TYPE STANDARD TABLE OF VBFA WITH HEADER LINE.
    DATA: xlips           TYPE STANDARD TABLE OF LIPS WITH HEADER LINE.
    *DATA: xvbfa           TYPE STANDARD TABLE OF vbfa WITH HEADER LINE.
    DATA xvbfa like vbfa.
    DATA: l_key(60) type c.
          concatenate 'SERVICEPO' sy-datum into l_key.
    >>>>> import xvbfa = xvbfa
                      from shared buffer indx(st) id l_key.
          delete from shared buffer indx(st) id l_key.
    Could you help.
    Regads,
    Shobhit

  • Problem when I execute program SCM in background

    Hi experts,
        I am with problem when I execute a program (SCM) in background. I inserted a new field (estoque_seg(10)) and the process stopped at execute in background.When I call transaction and press F8, works but for this, I need jump the consistence  IF sy-batch IS INITIAL....Dont has any bath imput, only functions. Any idea?
    Follow below the code:
    Estrutura para tabela ENTRADA
    DATA: BEGIN OF st_entrada,
            matnr(40)            TYPE c,
            werks(20)            TYPE c,
            ponto_abas(10)       TYPE c,
            estoque_max(10)      TYPE c,
            cobertura(10)        TYPE c,
            estoque_seg(10)      TYPE c, " Erlon Lourenço 20/01/2011
          END OF st_entrada.
    Estrutura para tabela de LOG
    *TYPES: BEGIN OF st_saida,
           pernr(8)             TYPE c ,
           date(10)             TYPE c,
           er_contribuition(15) TYPE c,
           tax(15)              TYPE c,
           msg_erro(80)         TYPE c,
         END OF st_saida.
    Tabela para obter descricao da mensagem
    *DATA: ti_saida TYPE STANDARD TABLE OF st_saida WITH HEADER LINE
                                                  INITIAL SIZE 0.
    Tabela que recebera o arquivo texto
    DATA: BEGIN OF ti_entrada OCCURS 0.
            INCLUDE STRUCTURE st_entrada.
    DATA: END OF ti_entrada.
    DATA: BEGIN OF it_matid OCCURS 0,
      matnr TYPE /sapapo/matkey-matnr,
      matid TYPE /sapapo/matkey-matid,
    END OF it_matid.
    DATA: BEGIN OF it_locid OCCURS 0,
      locno TYPE /sapapo/loc-locno,
      locid TYPE /sapapo/loc-locid,
    END OF it_locid.
    DATA: BEGIN OF it_matlotsz OCCURS 0,
      target_dur TYPE /sapapo/matlotsz-target_dur,
      END OF it_matlotsz.
    DATA:        wa_matloc       LIKE /sapapo/matloc   OCCURS  0 WITH HEADER LINE,
                 wa_matlsim      LIKE /sapapo/matlsim  OCCURS  0 WITH HEADER LINE,
                 wa_matlotsz     LIKE /sapapo/matlotsz OCCURS  0 WITH HEADER LINE.
    Variáveis Globais
    DATA: v_tabix   TYPE sy-tabix,
          v_vrsioid TYPE /sapapo/apo01-vrsioid,
          v_tam     TYPE i.
        Select-Options & Parameters
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_versao    TYPE /sapapo/apo01-vrsioex OBLIGATORY DEFAULT '000',
                 p_abas  AS CHECKBOX  ,
                 p_est   AS CHECKBOX  ,
                 p_cober AS CHECKBOX  ,
                 p_estsg AS CHECKBOX.   " ERLON LOURENCO - 20/01/2012 - Estoque Segurança
    SELECTION-SCREEN END OF BLOCK b1.
        Start-of-Selection
    START-OF-SELECTION.
      PERFORM consiste.
      PERFORM f_upload.
      PERFORM f_processa_batch.
      PERFORM f_saida_dados.
      MESSAGE i000 WITH 'Processo encerrado com Sucesso'.
    END-OF-SELECTION.
    *&      Form  F_UPLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM f_upload .
      DATA: lc_file TYPE string.
      TYPES: BEGIN OF st_ent,
                cam(80),
             END OF st_ent.
      DATA: ti_ent TYPE STANDARD TABLE OF st_ent WITH HEADER LINE
                                                  INITIAL SIZE 0.
      RANGES: r_file       FOR zget0001-field_content.
      r_file[] = zbs_constantes=>obter( i_bukrs = space i_field = 'FILE' i_process = 'PONTO-REAB' ).
      READ TABLE r_file INDEX 1.
      lc_file = r_file-low.
      CLEAR: ti_entrada,
             ti_entrada[],
             ti_ent,
             ti_ent[].
    abrir arquivo para leitura
      OPEN DATASET lc_file FOR INPUT  IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        MESSAGE i000 WITH text-e01.
        STOP.
      ENDIF.
    Leitura de arquivos
      DO.
        READ DATASET lc_file INTO ti_ent.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        APPEND ti_ent.
      ENDDO.
    Fechamento do arquivo
      CLOSE DATASET lc_file.
      LOOP AT ti_ent.
        SPLIT ti_ent AT ';' INTO ti_entrada-matnr ti_entrada-werks ti_entrada-ponto_abas ti_entrada-estoque_max ti_entrada-cobertura ti_entrada-estoque_seg.
        APPEND ti_entrada.
      ENDLOOP.
    ENDFORM.                    " F_UPLOAD
    *&      Form  F_PROCESSA_BATCH
          text
    -->  p1        text
    <--  p2        text
    FORM f_processa_batch .
      LOOP AT ti_entrada.
        v_tabix = sy-tabix.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ti_entrada-matnr
          IMPORTING
            output = ti_entrada-matnr.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ti_entrada-ponto_abas
          IMPORTING
            output = ti_entrada-ponto_abas.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ti_entrada-estoque_max
          IMPORTING
            output = ti_entrada-estoque_max.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ti_entrada-cobertura
          IMPORTING
            output = ti_entrada-cobertura.
    IA - ERLON LOURENCO - 20/01/2012
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ti_entrada-estoque_seg
          IMPORTING
            output = ti_entrada-estoque_seg.
    FA - ERLON LOURENCO - 20/01/2012
        MODIFY ti_entrada INDEX v_tabix.
      ENDLOOP.
      CLEAR: it_matid,
             it_matid[],
             it_locid,
             it_locid[],
             wa_matlsim,
             wa_matlsim[],
             wa_matloc,
             wa_matloc[].
      SELECT matnr matid INTO TABLE it_matid FROM /sapapo/matkey
      FOR ALL ENTRIES IN ti_entrada WHERE matnr = ti_entrada-matnr.
      SELECT locno locid INTO TABLE it_locid FROM /sapapo/loc
      FOR ALL ENTRIES IN ti_entrada WHERE locno = ti_entrada-werks.
      IF p_versao = '000'.
        LOOP AT ti_entrada.
          READ TABLE it_matid WITH KEY matnr = ti_entrada-matnr.
          IF sy-subrc = 0 .
            READ TABLE it_locid WITH KEY locno = ti_entrada-werks.
            IF sy-subrc = 0.
              SELECT SINGLE * INTO wa_matloc FROM /sapapo/matloc WHERE matid = it_matid-matid  AND
                                                                       locid = it_locid-locid.
              IF sy-subrc = 0.
                IF p_abas = 'X'.
                  wa_matloc-reord    = ti_entrada-ponto_abas.
                ENDIF.
                IF p_est = 'X'.
                  wa_matloc-maxstock = ti_entrada-estoque_max.
                ENDIF.
                " IA - Erlon Lourenço - 23/01/2012
                if p_estsg = 'X'.
                  wa_matloc-safty    = ti_entrada-estoque_seg.     " Erlon Lourenço - 23/01/2012
                endif.
                "FA - Erlon Lourenço - 23/01/2012
                IF p_abas  = 'X'   OR
                   p_est   = 'X'   OR
                   p_estsg = 'X'.      " Erlon Lourenço - 23/01/2012
                  APPEND wa_matloc TO wa_matloc.
                ENDIF.
                SELECT SINGLE * INTO wa_matlotsz FROM /sapapo/matlotsz WHERE lszid = wa_matloc-lszid.
                IF sy-subrc = 0.
                  IF p_cober = 'X'.
                    wa_matlotsz-target_dur = ti_entrada-cobertura.
                    APPEND wa_matlotsz TO wa_matlotsz.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.   " LOOP AT ti_entrada.
      ELSE.
    Verifica versáo para saber se preenche a tabela wa_matlsim
        SELECT SINGLE vrsioid INTO v_vrsioid FROM /sapapo/apo01 WHERE vrsioex = p_versao.
        IF sy-subrc = 0.
          SELECT * INTO TABLE wa_matlsim FROM /sapapo/matlsim WHERE simid = v_vrsioid.
          IF wa_matlsim[] IS NOT INITIAL.
            LOOP AT ti_entrada.
              READ TABLE it_matid WITH KEY matnr = ti_entrada-matnr.
              IF sy-subrc = 0 .
                READ TABLE it_locid WITH KEY locno = ti_entrada-werks.
                IF sy-subrc = 0.
                  READ TABLE wa_matlsim WITH KEY matid = wa_matloc-matid
                                                 locid = wa_matloc-locid.
                  IF sy-subrc = 0.
                    wa_matlsim-reord    = ti_entrada-ponto_abas.
                    wa_matlsim-maxstock = ti_entrada-estoque_max.
                    wa_matlsim-safty    = ti_entrada-estoque_seg.     " Erlon Lourenço - 23/01/2012
                    MODIFY wa_matlsim INDEX v_tabix.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDLOOP.  " LOOP AT ti_entrada.
          ENDIF.     " IF wa_matlsim[] IS NOT INITIAL.
        ENDIF.     " IF sy-subrc = 0. 1º
      ENDIF.     "IF p_versao = '000'
    Funcáo que atualiza campos nas bases de dados.
      CALL FUNCTION '/SAPAPO/DM_PRODUCTS_POST'
        EXPORTING
          iv_vb         = 'U'
        TABLES
          it_matloc     = wa_matloc
          it_matlsim    = wa_matlsim
          it_matlotsz   = wa_matlotsz
        EXCEPTIONS
          not_qualified = 1
          insert_failed = 2
          update_failed = 3
          OTHERS        = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " F_PROCESSA_BATCH
      FORM  BDC_DYNPRO
    *&      Form  F_SAIDA_DADOS
          text
    -->  p1        text
    <--  p2        text
    FORM f_saida_dados .
    IF ti_saida[] IS NOT INITIAL.
       DATA: lc_file TYPE string.
       lc_file = p_erros.
       CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
      BIN_FILESIZE                    =
           filename                        = lc_file
      FILETYPE                        = 'ASC'
         TABLES
           data_tab                        = ti_saida
      FIELDNAMES                      =
        EXCEPTIONS
          file_write_error                = 1
          no_batch                        = 2
          gui_refuse_filetransfer         = 3
          invalid_type                    = 4
          no_authority                    = 5
          unknown_error                   = 6
          header_not_allowed              = 7
          separator_not_allowed           = 8
          filesize_not_allowed            = 9
          header_too_long                 = 10
          dp_error_create                 = 11
          dp_error_send                   = 12
          dp_error_write                  = 13
          unknown_dp_error                = 14
          access_denied                   = 15
          dp_out_of_memory                = 16
          disk_full                       = 17
          dp_timeout                      = 18
          file_not_found                  = 19
          dataprovider_exception          = 20
          control_flush_error             = 21
          OTHERS                          = 22
       IF sy-subrc <> 0.
         MESSAGE i005 WITH 'Error to unload file !'.
         STOP.
       ENDIF.
    ENDIF.
    ENDFORM.                    " F_SAIDA_DADOS
    *&      Form  CONSISTE
          text
    -->  p1        text
    <--  p2        text
    FORM consiste .
      IF p_abas  IS INITIAL  AND
         p_est   IS INITIAL  AND
         p_cober IS INITIAL AND
         p_estsg IS INITIAL.   " ERLON LOURENCO - 20/01/2012 - Estoque Segurança
        MESSAGE i000 WITH text-e03.
        STOP.
      ENDIF.
      IF sy-batch IS INITIAL.
        MESSAGE i000 WITH text-e02.
        STOP.
      ENDIF.
    Best regards,
    Erlon Lourenço
    Edited by: Erlon Louren on Jan 27, 2012 11:09 AM

    Hi Raja,
                Check weather there are  any enhancements to the datasource.If yes once check the code in CMOD.Seems there is some discrepency in that.
    Regards
    Karthik

  • Problem in Calling External Procedure

    Hello,
    I am trying to call external procedure written in C from PL/SQL.
    Here are the codes :
    For external procedure:
    #include<stdio.h>
    void extproc_fn ( void )
    FILE * file_handle;
    if (( file_handle = fopen ( "/root/cprogs/extproc.out", "a" )) != NULL )
    fwrite ( "External Procedure Testing", 26, 1, file_handle );
    fclose ( file_handle );
    I have created library as :
    create or replace library extproc_lib as '/root/cprogs/extproc.so';
    And the procedure :
    create or replace procedure extproc_proc as
    external
    name "extproc_fn"
    library extproc_lib
    language c;
    My listener and tnsname is configured correctly.
    But when I try to connect to Oracle by that tnsname, extproc program core dumps under $ORACLE_HOME/network/log directory. Under WinNT, it creates a Dr. Watson error.
    Any idea what might have gone wrong.
    Thanks in advance.
    Soumen Ghosh

    hi there,
    everything u did is correct as far as i recollect about external procedures ,the only thing that i suppose is missing is that u forgot to grant permissions on the library to the user...pls check this once i hope this works...
    bye
    Atul

  • Language other than bash for calling external programs

    Hi,
    sorry for the unspecific title, I couldn't think of a better summary.
    The problem is this: I have written a script to encode a DVD to H264 and Vorbis. Since it basically just performs some (OK, by now: A lot of.) management and then calls a external programs, Bash was the obvious choice.
    However, the administrative stuff the script does (evaluating user input, calculations etc.) was already a nightmare to code in Bash (lack of arithmetic, lack of data types, proper functions, lack of c-like structs etc.), and I now want to make it even more flexible in what the user (me) can ask of it (it's also going to use a config file, which is another thing that gets ugly fast). Frankly, I can't stomach that.
    So the question is this: What language would be sensible for a program the most important function of which is calling other programs?
    Simply executing them from the main program isn't enough, unfortunately, because I want to make use of multicore system by for example simultaneously extracting streams and encoding them (right now that is done through named pipes), ideally I'd need a way to multithread not internal functions/routines but external programs (Through pipes or whatever).
    I'd prefer an interpreted language, but it's not a requirement.

    I second what peets said. Perl is definitely you're best option here, in my opinion anyways. It has the best (by which I mean easiest) system interface of any scripting langauge I've worked with, and if you want a simple configuration file reader, perl's regex'es are king. Perl also takes a lot of features from the shells, such as the file test operations. If the project get's really big and hairy though, it might be worth considering python as a cleaner, stricter alternative.
    Hope that helps!

  • Calling external program on application server

    Hi, everyone. I'm trying to call an external program from ABAP by using SM69 and FM SXPG_COMMAND_EXECUTE
    MOVE 'zlong_bat' to ld_comline.         "Maintained using trans SM69
    * Execute external command, contained in 'ld_comline'
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
           EXPORTING
                commandname                   = ld_comline
    *           additional_parameters   = ld_param  "Params passed to script
    *           operatingsystem               = 'UNIX'
           IMPORTING
                status                        = ld_status
           TABLES
                exec_protocol                 = ld_output
           EXCEPTIONS
                no_permission                 = 1
                command_not_found             = 2
                parameters_too_long           = 3
                security_risk                 = 4
                wrong_check_call_interface    = 5
                program_start_error           = 6
                program_termination_error     = 7
                x_error                       = 8
                parameter_expected            = 9
                too_many_parameters           = 10
                illegal_command               = 11
                wrong_asynchronous_parameters = 12
                cant_enq_tbtco_entry          = 13
                jobcount_generation_error     = 14
                OTHERS                        = 15.
      IF sy-subrc NE 0.
      ENDIF.
    In the  sm69, I define zlong_bat with
        Operating system command: cmd
         Parameters for operating system command: /c remoteconn.bat
    It can run well if remoteconn.bat contain some simple command of dos like dir, md, mk... But when I call a program from remoteconn.bat, the abap program hang. I also cannot test in sm69 because it hang too.
    If I call direcly from sm 69 with
         Operating system command: cmd
         Parameters for operating system command: /c  psexec.exe
    localhost -u test -p 1234
    or
         Operating system command: C:\psexec.exe
         Parameters for operating system command: 
    localhost -u test -p 1234
    The SM69 also hang.
    Are there any method to call a program from sap without hanging
    of course the program is in its position on application server.
    Thank you in advance.
    Regards,
    Long
    Edited by: dragonking88 on Aug 25, 2010 12:54 PM

    Hi Long Le Hoang,
    I am running a shell script fromSM69 which call psexec.
    shell script runs fine but SM69 execution goes on hold.
    Can you please help me how to terminate SM69 execution.
    Alpa

  • Error when calling  external  DLL  function.

    When calling a function in Oracle, the error happens
    ORA-28575: '... error RPC connection to external procedures'
    code:
    create or replace library LibFunctions as 'c:\MyDLL.dll';
    grant all PRIVILEGES on LibFunctions to public;
    create or replace
    FUNCTION Max(num1 in number, num2 in number) RETURN number IS
    EXTERNAL LIBRARY LibFunctions
    NAME "Max"
    LANGUAGE C;
    grant all PRIVILEGES on Max to public;
    obs. Dll was created in Pascal.
    What can this error?
    tks,
    Mauricio
    Edited by: user13794390 on 19/01/2011 06:29

    It's been a while since I used extproc. Anyway, it listener.ora make sure extproc is added. I'll assume you are on Unix:
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ENVS = "EXTPROC_DLLS=ANY,LD_LIBRARY_PATH=proper-directory-list")
    (ORACLE_HOME = path-to-oracle-home)
    (PROGRAM = extproc)
    ) SY.

  • Anonomly seen in calling external program???

    Hi folks,
    Below I am trying to execute another java application I made, when calling it from the default constructor of another separate java program I made.
    In the serverload.bat the lines:
    REM notepad.exe
    d:
    cd java
    java MultiThreadServerRead
    In the constrctor I have the below:
    try
                        Runtime.getRuntime().exec("cmd.exe /c d:\\java\\serverload.bat");
                        Process p= null;
                        Runtime r= Runtime.getRuntime();
                        p=r.exec("d:\\java\\serverload.bat");
                   catch (Exception e)
                        System.out.println("Myerror message "+e.getMessage());
    When the application starts, it just flies right past the above and does not load the external java application?? If I put an exe there it works okay?? Whats going wrong?

    I dont know why that wont work, but you could just make sure the class for the serverload is in your classpath and just create a new instance of it:
    new serverload();
    or
    new path.to.your.class.serverload(Constructor,Params);
    You might have to do a little modification to your serverload class to make your constructors do everything and take you code out of main to only call the constructor:
    public static void main(String[] args) {
    serverload app = new serverload();
    app.launchApp();
    public SQLFileExec() {
    launchApp();
    private void launchApp() {
    .. your main code goes here.
    You could also use threads to disconnect the application form you parrent.
    Does this help?
    Tim Strunk

  • Calling external programs from within a Tomcat application

    I've got a fairly complex existing Tomcat application (which is packaged and built as a .war file) which I'm trying to edit so that it calls a Perl script part way through the processing, which will generate an XML file used later on. I think I've worked out how to call external scripts from within Java, but at the moment when I try and access the application via Tomcat the application either hangs or bails out (I don't know which, as the log files unhelpfully don't give any error messages).
    The code which is causing the problem looks like this:
    System.err.println("Calling runtime...");
    Runtime runtime = Runtime.getRuntime();
    System.err.println("Executing process...");
    Process process = runtime.exec("/path/to/ysearch.pl 'News' '\"search query\"' 'file");
    System.err.println("Waiting for process...");
    int exitVal = process.waitFor();
    System.out.println("Exited with error code: " + exitVal);The code gets as far as "Executing process..", beyond that there is nothing in the log file so I presume the runtime.exec() call is where the problem is. I'm not interested in reading the output from the script (there shouldn't be any), so that's not an issue, and the permissions on it allow anyone to read or execute ysearch.pl so I don't think there's a problem in that area.
    Does anyone have any suggestions which I could try to get this to work? I've only been using Tomcat for a week (I'm picking up on someone else's code) so I might have made a beginner's mistake. I'm using Tomcat 5 on Fedora Core 7, and Java 1.5.0_01 (I can't easily change any of those).

    I'm not sure, but I thing that overhead caused by calling du cannot be big enough to matter even on older machines.
    But, when calling du from Perl script you are also invoking shell, and this can be a little bit more 'heavy'.

  • Call external program without intermediate step

    When I call an external program (Nik Color Efex) a window opens asking me wether I want to continue with the image having all Lr stpes applied etc. How can I circumvent this "annoying" step and directly call the external program without interruption?

    Thanks, I understand that before transferring the file you need to do these preparations, but then the window shows up asking me wether I want to transfer the copy or the original...  I am looking for a mechanism to supress that screen.

  • Calling external program from PL/SQL

    Does anyone know whether it's possible to call an external program living outside of Oracle from PL/SQl eg. a from a stored procedure?
    Specifically i want to call back into my java appserver (ejb server) when a trigger/stored proc. is executed.
    The call does not have to be synchronous, some sort of queue will do - eg JMS??
    Any help greatly appreciated.
    null

    Hi
    Which version of oracle you are using.
    If it 8i, you can use external procedures/libraries. REfer to ORacle PLSQL documentation.
    If you are using Oracle 7+ you can use dbms pipes to post your command string and a cron job to read the pipe and execute the string.
    An alternate ugly way is to write to a file and some process reading the file at a regular interval.
    HTH
    Arvind Balaraman

Maybe you are looking for

  • Unable to capture video from my Sharp VL-NZ155 camera

    I noticed that is a pretty common statement around, even so I couldn't find an answer to my dilemma. I have the new Mac 24" (not that new anymore) with Firewire 800 cable, and I have Premiere Pro CS4 installed. I can control my Sharp VL-NZ155 from th

  • Setting privilege level for logging into ASA through ACS

    Hi!, In my environment i implemented AAA for logging into switches, routers, asa etc through ACS which is being configured TACACS+. I have set different privilege levels like readonly, readwrite etc into ACS. There are working fine when i try to logi

  • Can't rename file in Bridge CS6 after update

    I recently did an update to bridge CS6, after that I can no longer rename the files in bridge and I don't see the file and format name under the image like I use to. How do I get it back??!! I HATE THIS UPDATE. Please help!! Thanks!

  • Air 3.5 APK file for androids.

    Where would I find a copy of Adobe Air 3.5 in a apk file.  Thanks

  • Can the GetEvents Web Service return a subset of events for a given record

    Page 173 of Siebel Web Services On Demand Guide Version 3.1 (CRM On Demand Release15) Rev. A, states the following: "You can return events for all record types, or a subset of record types, depending on how you prepare the WSDL files associated with