Can I call an external program from my rman script

Hi
Is it possible to do an external call to a bat-file in a rman script?
My script looks like this (it's pretty much generated from EM):
$rman_script="backup device type disk tag '%TAG' database;
sql 'alter system archive log current';
backup device type disk tag '%TAG' archivelog all not backed up delete all input;
allocate channel for maintenance type disk;
delete noprompt obsolete device type disk;
release channel;
Can i somehow make an external call before at the end?
Regards
Klaus Mogensen

You can use the HOST command.

Similar Messages

  • Can we call a bdc program from report program

    hi
    can we call a bdc program from report program

    Yes you can any program from another program using
    SUBMIT <repname>   statement
    SUBMIT <repname> USING SELECTION-SCREEN dynnr.
    or
    SUBMIT <repname> VIA SELECTION-SCREEN USING SELECTION-SET variant
    SUBMIT <repname> VIA SELECTION-SCREEN WITH SELECTION-TABLE rspar
    etc.
    Regards
    Prax

  • When I call an external program from Labview, how can I embed the interface into the front panel?

    I'm running Labiew 6i for Linux. I'm using a system exec.vi to call an external program to do image manipulation (since there is no IMAQ for linux). How can I embed the user interface of the external program into the front panel of Labview?

    As far as I know, the only way to embed other GUIs in LabView is an ActiveX in a container.
    As long as you are using Linux, try to place (moving them on the desktop ) the two windows linked (like those 3 of WinAmp).

  • Can we call a bdc program from a report?how

    hi
    experts can u help me for this

    Hi
    Yes, You can call a BDC program from Report.
    see the sample report in which it is used
    REPORT zm_reservation_alert
    NO STANDARD PAGE HEADING
    MESSAGE-ID zm_msg.
    D A T A B A S E T A B L E S D E C L A R A T I O N
    T Y P E S D E C L A R A T I O N S
    Reservations Main Structure
    TYPES: BEGIN OF s_res,
    rsnum TYPE rsnum, " Reservation No
    rspos TYPE rspos, " Item No
    usnam TYPE usnam, " User Name
    bwart TYPE bwart, " Movement Type
    aufnr TYPE aufnr, " Order Number
    rsart TYPE rsart, " Record Type
    bdart TYPE bdart, " Reservation Type
    matnr TYPE matnr, " Material No
    bdter TYPE bdter, " Req Date
    menge TYPE menge_d, " Quantity
    kostl TYPE kostl, " Cost Center
    usrid TYPE sysid, " User ID
    END OF s_res.
    Output Main Structure
    TYPES: BEGIN OF s_rep,
    usnam TYPE usnam, " User Name
    rsnum TYPE rsnum, " Reservation No
    rspos TYPE rspos, " Item No
    matnr TYPE matnr, " Material No
    bdter TYPE bdter, " Req Date
    menge TYPE menge_d, " Quantity
    kostl TYPE kostl, " Cost Center
    aufnr TYPE aufnr, " Order Number
    END OF s_rep.
    User Dept Details
    TYPES: BEGIN OF s_dept,
    pernr TYPE persno, " Personal No
    usrid TYPE sysid, " User ID
    orgeh TYPE orgeh, " Orgn Unit
    orgtx TYPE orgtx, " Dept Name
    END OF s_dept.
    For Send Mail Purpose
    DATA : i_doc_data LIKE sodocchgi1.
    DATA : BEGIN OF i_pack_list OCCURS 0.
    INCLUDE STRUCTURE sopcklsti1.
    DATA : END OF i_pack_list.
    DATA : BEGIN OF i_receivers OCCURS 0.
    INCLUDE STRUCTURE somlreci1.
    DATA : END OF i_receivers.
    DATA : BEGIN OF i_contents OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA : END OF i_contents.
    DATA : BEGIN OF i_header OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA : END OF i_header.
    DATA : BEGIN OF i_att OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA : END OF i_att.
    Internal table for bdcdata
    DATA : it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    Internal table to handle messages
    DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    D A T A D E C L A R A T I O N S
    DATA: gv_lines TYPE sy-index, " Total Lines int Table
    gv_days TYPE i, " Difference Days
    gv_date TYPE sy-datum, " Date
    gv_date1 TYPE sy-datum, " Date
    gv_date2 TYPE sy-datum, " Date
    gv_text(85), " Text Field
    gv_mesg(70), " Error Messages
    gv_bdc, " BDC Flag
    gv_flag TYPE i, " Flag
    gv_ernam TYPE ernam. " User ID
    C O N S T A N T S D E C L A R A T I O N S
    CONSTANTS: c_x VALUE 'X', " Flag
    c_endda TYPE endda VALUE '99991231'. " Date
    I N T E R N A L T A B L E S D E C L A R A T I O N S
    DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE, " Reservns
    i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
    i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE. " Output
    S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Fetch main data
    PERFORM fetch_data.
    Process data
    PERFORM process_data.
    *& Form fetch_data
    Fetching the Reservations related data from Database Tables
    FORM fetch_data .
    CLEAR: gv_date, gv_date1, gv_date2.
    gv_date = sy-datum.
    gv_date1 = sy-datum - 10.
    gv_date2 = sy-datum + 10.
    CLEAR i_res.
    REFRESH i_res.
    SELECT a~rsnum " Reservation No.
    b~rspos " Reservation Item
    a~usnam " User Name
    a~bwart " Movement Type
    a~aufnr " Order Number
    b~rsart " Record Type
    b~bdart " Reservation Type
    b~matnr " Material No
    b~bdter " Req Date
    INTO TABLE i_res
    FROM rkpf AS a JOIN resb AS b
    ON arsnum = brsnum
    WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
    b~xloek EQ ' '.
    SORT i_res BY rsnum rspos.
    DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
    Add userid into the i_usr int table
    LOOP AT i_res.
    i_res-usrid = i_res-usnam.
    MODIFY i_res INDEX sy-tabix.
    ENDLOOP.
    IF NOT i_res[] IS INITIAL.
    Get the User Dept Name
    CLEAR i_dept.
    REFRESH i_dept.
    SELECT a~pernr " Personal No
    a~usrid " User ID
    b~orgeh " Orgn Unit
    c~orgtx " Dept Name
    INTO TABLE i_dept
    FROM pa0105 AS a JOIN pa0001 AS b
    ON apernr = bpernr JOIN t527x AS c
    ON borgeh = corgeh
    FOR ALL ENTRIES IN i_res
    WHERE a~usrid = i_res-usrid AND
    a~endda EQ c_endda AND
    b~endda EQ c_endda.
    ENDIF.
    SORT i_dept BY pernr.
    DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
    Move the Creator of Reservation to a diff table
    LOOP AT i_res.
    MOVE-CORRESPONDING i_res TO i_rep.
    APPEND i_rep.
    CLEAR i_rep.
    ENDLOOP.
    SORT i_rep BY usnam rsnum rspos.
    ENDFORM. " Fetch_Data
    *& Form process_data
    Process the Reservations related data for Expiry Date
    FORM process_data .
    DATA: lv_date1 LIKE sy-datum,
    lv_date2 LIKE sy-datum,
    lv_date3(10),
    lv_menge(13),
    lv_tabix LIKE sy-tabix.
    LOOP AT i_rep.
    CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
    lv_tabix = sy-tabix.
    AT NEW usnam.
    Populate the Contents Table
    CLEAR i_att.
    REFRESH i_att.
    i_att = 'Reservations Reminder'(014).
    APPEND i_att.
    i_att = '----
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
    CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
    INTO i_att-line SEPARATED BY space.
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    i_att = 'Please find the List of expiring Reservations'(004).
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    CONCATENATE '--' '' '--
    ' INTO
    i_att-line SEPARATED BY space.
    APPEND i_att.
    CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
    'Due Date'(008) 'Work Center/CC'(005) INTO
    i_att-line SEPARATED BY space.
    APPEND i_att.
    CONCATENATE '--' '' '--
    ' INTO
    i_att-line SEPARATED BY space.
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    ENDAT.
    gv_days = i_rep-bdter - gv_date.
    lv_date1 = i_rep-bdter + 5.
    lv_date2 = i_rep-bdter + 10.
    MOVE i_rep-menge TO lv_menge.
    WRITE i_rep-bdter TO lv_date3.
    IF gv_days = 10.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is due for 10 days. Please collect'(009)
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is due for 10 days. Please collect'(009)
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    ENDIF.
    IF gv_days = 5.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is due for 5 days. Please collect'(010)
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is due for 5 days. Please collect'(010)
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    ENDIF.
    IF gv_date = lv_date1.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is getting cancelled on'(011) lv_date2
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is getting cancelled on'(011) lv_date2
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    ENDIF.
    IF gv_date = lv_date2.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is being cancelled'(012)
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is being cancelled'(012)
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    Mark the Reservation Item 'DELETED' using BDC.
    UPDATE resb SET xloek = c_x.
    PERFORM delete_item_resb.
    ENDIF.
    AT END OF usnam.
    IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
    gv_date = lv_date2 ).
    Read the User who creates the Reservn and send a mail alert to him
    CLEAR : i_receivers,gv_ernam.
    REFRESH: i_receivers.
    READ TABLE i_rep INDEX lv_tabix.
    gv_ernam = i_rep-usnam.
    IF gv_ernam <> space.
    Send mail Alert to PR Creator(SAP inbox)
    PERFORM send_alert_data.
    Send Mail to External Mail ID of the SAP USER
    PERFORM send_mail_external.
    ENDIF.
    ENDIF.
    ENDAT.
    ENDLOOP.
    ENDFORM. " Process_data
    *& Form delete_item_resb
    Set the Deletion Indicator for the Res. Item in RESB
    FORM delete_item_resb.
    gv_bdc = 'N'.
    Perform to fill it_bdcdata.
    PERFORM fill_it_bdcdata.
    Call the Transaction MB22
    CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
    MESSAGES INTO it_messages.
    IF sy-subrc <> 0.
    gv_flag = 1.
    If error occurs in transaction mode run bdc session for that data
    PERFORM bdc_process.
    ENDIF.
    Handles error messages
    PERFORM error_messages.
    CLEAR : it_bdcdata, it_messages.
    REFRESH : it_bdcdata, it_messages.
    IF gv_bdc = 'O'.
    close bdc if it is open
    PERFORM close_bdc.
    ENDIF.
    ENDFORM. "delete_item_resb
    *& Form FILL_IT_BDCDATA
    Filling Bdcdata structure with data
    FORM fill_it_bdcdata.
    PERFORM bdc_dynpro USING 'SAPMM07R' '0560'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM07M-RSPOS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RM07M-RSNUM'
    i_rep-rsnum.
    PERFORM bdc_field USING 'RM07M-RSPOS'
    i_rep-rspos.
    PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RESB-XLOEK'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RESB-XLOEK'
    c_x.
    PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'COBL-KOSTL'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RESB-ERFMG'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=BU'.
    PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'COBL-KOSTL'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    ENDFORM. " FILL_IT_BDCDATA
    *& Form BDC_DYNPRO
    Filling the it_bdcdata table with program name & screen number
    FORM bdc_dynpro USING program LIKE bdcdata-program
    dynpro LIKE bdcdata-dynpro.
    it_bdcdata-program = program.
    it_bdcdata-dynpro = dynpro.
    it_bdcdata-dynbegin = 'X'.
    APPEND it_bdcdata.
    CLEAR it_bdcdata.
    ENDFORM. " BDC_DYNPRO
    *& Form BDC_FIELD
    Filling it_bdcdata with field name and field value
    FORM bdc_field USING fnam LIKE bdcdata-fnam
    fval.
    it_bdcdata-fnam = fnam.
    it_bdcdata-fval = fval.
    APPEND it_bdcdata.
    CLEAR it_bdcdata.
    ENDFORM. " BDC_FIELD
    *& Form ERROR_MESSAGES
    Displaying error messages
    FORM error_messages.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    id = sy-msgid
    lang = sy-langu
    IMPORTING
    msg = gv_mesg
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    LOOP AT it_messages WHERE msgtyp = 'E'.
    WRITE : / 'Message :'(001) ,gv_mesg.
    CLEAR it_messages.
    ENDLOOP.
    ENDFORM. " ERROR_MESSAGES
    *& Form BDC_PROCESS
    Open bdc session if call transaction fails
    FORM bdc_process.
    IF gv_bdc = 'N'.
    open bdc session
    PERFORM open_bdc.
    gv_bdc = 'O'.
    ENDIF.
    IF gv_bdc = 'O'.
    insert data into bdc session
    PERFORM insert_bdc.
    ENDIF.
    ENDFORM. " BDC_PROCESS
    *& Form OPEN_BDC
    Calling function module to open bdc session
    FORM open_bdc.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    client = sy-mandt
    group = 'ZMM'
    keep = 'X'
    user = sy-uname
    EXCEPTIONS
    client_invalid = 1
    destination_invalid = 2
    group_invalid = 3
    group_is_locked = 4
    holddate_invalid = 5
    internal_error = 6
    queue_error = 7
    running = 8
    system_lock_error = 9
    user_invalid = 10
    OTHERS = 11.
    ENDFORM. " OPEN_BDC
    *& Form INSERT_BDC
    Insert it_bdcdata into bdc by calling function module bdc_insert
    FORM insert_bdc.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    tcode = 'MB22'
    TABLES
    dynprotab = it_bdcdata
    EXCEPTIONS
    internal_error = 1
    not_open = 2
    queue_error = 3
    tcode_invalid = 4
    printing_invalid = 5
    posting_invalid = 6
    OTHERS = 7.
    ENDFORM. " INSERT_BDC
    *& Form CLOSE_BDC
    Closing bdc session
    FORM close_bdc.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    not_open = 1
    queue_error = 2
    OTHERS = 3.
    ENDFORM. " CLOSE_BDC
    *& Form send_alert_data
    Send Alert for the Expired Contract
    FORM send_alert_data .
    CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
    REFRESH : i_receivers,i_header,i_contents.
    DESCRIBE TABLE i_att LINES gv_lines.
    i_receivers-receiver = gv_ernam.
    i_receivers-receiver = 'SSHEIK'.
    i_receivers-rec_type = 'B'.
    i_receivers-rec_date = sy-datum.
    i_receivers-express = 'X'.
    i_receivers-com_type = 'INT'.
    i_receivers-notif_del = 'X'.
    APPEND i_receivers.
    i_doc_data-obj_name = 'SAPoffice'(013).
    i_doc_data-obj_descr = 'Reservations Reminder'(014).
    i_doc_data-obj_langu = 'E'.
    i_doc_data-no_change = c_x.
    i_doc_data-obj_prio = 1.
    i_doc_data-priority = 1.
    i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
    i_pack_list-transf_bin = c_x.
    i_pack_list-head_start = '1'.
    i_pack_list-head_num = '1'.
    i_pack_list-body_start = '1'.
    i_pack_list-body_num = gv_lines.
    i_pack_list-doc_type = 'DOC'.
    i_pack_list-obj_name = 'SAPoffice'(013).
    i_pack_list-obj_descr = 'Reservations Reminder'(014).
    i_pack_list-obj_langu = 'E'.
    i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
    APPEND i_pack_list.
    i_header-line = 'Header'. APPEND i_header.
    Data for contents
    i_contents-line = 'Please find the Reservations Due List'(016).
    APPEND i_contents.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = i_doc_data
    PUT_IN_OUTBOX = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = i_pack_list
    object_header = i_header
    contents_bin = i_att
    contents_txt = i_contents
    receivers = i_receivers
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    IF sy-subrc = 0.
    MESSAGE i000 WITH 'Mail Sucessfully sent'(017).
    ELSE.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " send_alert_data
    *& Form send_mail_external
    Send mail to External MAIL ID of the PR Creator
    FORM send_mail_external.
    DATA : lv_str(24), lv_str1(40),
    lv_pernr LIKE adr6-persnumber,
    lv_adrnr LIKE adr6-addrnumber,
    lv_usrid LIKE pa0105-usrid,
    lv_mail LIKE adr6-smtp_addr,
    lv_sendor TYPE syuname,
    lv_receiver TYPE string,
    lv_header TYPE string,
    lv_body TYPE string.
    CLEAR: lv_pernr, lv_usrid, lv_adrnr,
    lv_mail, lv_sendor, lv_receiver,
    lv_header, lv_body .
    lv_usrid = gv_ernam.
    SELECT SINGLE persnumber addrnumber FROM usr21
    INTO (lv_pernr,lv_adrnr)
    WHERE bname = lv_usrid.
    IF sy-subrc = 0.
    SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
    WHERE addrnumber = lv_adrnr AND
    persnumber = lv_pernr.
    IF sy-subrc <> 0.
    CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
    lv_receiver = lv_mail.
    ELSE.
    lv_receiver = lv_mail.
    ENDIF.
    lv_receiver = '[email protected]'.
    lv_sendor = 'JALKHATAM'.
    lv_header = 'Reservations Reminder'(014).
    lv_str = 'Pls check your SAP Inbox'(019).
    lv_str1 = 'for the status of Reservations Due List'(020).
    CONCATENATE lv_str lv_str1 INTO lv_body
    SEPARATED BY space.
    Call Function Module To send mail
    CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
    EXPORTING
    id_header = lv_header
    id_body = lv_body
    id_receiver = lv_receiver
    id_sender = lv_sendor
    ID_HTML_MAIL =
    id_commit_work = 'X'
    EXCEPTIONS
    error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDIF.
    ENDFORM. " send_mail_external
    <b>Reward points for useful Answers</b>
    Regards
    Ashu

  • How can I execute an external program from within a button's event handler?

    I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
    I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
    I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
    I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
    So, then, how can I do this?
    Thanks
    Ted
    NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
    NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
            try {
                java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
                //pn.directory(new java.io.File("K:\\work"));
                java.lang.Process pr = pn.start();
                java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
                String tmp = new String("");
                byte b[] = new byte[1000];
                int i = 0;
                while (i != -1) {
                    bis.read(b);
                    tmp += new String(b);
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
            } catch (java.io.IOException ex) {
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
            }

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • How can I run an external program from a PLSQL procedure?

    Is there a package to run an external program from PLSQL? or is there another way to do that?
    thanks.

    here there is an example about how a PL/SQL procedure can
    work with an external C program.
    http://download-east.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_pi2.htm#1003384
    Apart from that you have Java Stored Procedures option
    to carry out your task.
    Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96659.pdf
    Joel P�rez

  • How can we call a external webservice from sandboxed webpart?

    Hi,
    I need to call an external webservice from sandboxed visual webpart in 2013. And that webpart would be used in office-365 site. Please let me whether it is possible or not.
    Thanks,
    Arindam

    Sandboxed solution server code can't call an external web service.  There are ways to write a sandboxed solution that calls a web service using client side code.  Here's a sample of a silverlight application deployed via the sandbox that can call
    an external web service.
    http://msdn.microsoft.com/en-us/library/gg615590(v=office.14).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Can I call a Java program from a SQL Server Trigger?

    Hello,
    I want to encrypt some data in a database column in SQL Server. Today I am using java code to encrypt the value and store it in the database using JDBC.
    Now I want to use a VB client to store the encrypted value in the SQL Server DB. Since the encryption is handled by a java class, can I write a trigger in SQL Server that while inserting the raw data, calls the java class for encrypting the value and then inserts the encrypted value into the column?
    In general, is it possible to call a java class from a SQL Server trigger?
    Thanks
    Bipin

    Here are 3 examples of code for insert, update and delete:
    CREATE TRIGGER [PLI_INSERT_TRIGGER] ON [dbo].[PLI]
    FOR INSERT
    AS
    Declare @cmd sysname, @code sysname, @list sysname
         Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted
         Set @cmd = 'java mirrorDb.Copy PLI INSERT ' + @code + ' ' + @list
         EXEC master..xp_cmdshell @cmd
    CREATE TRIGGER [PLI_UPDATE_TRIGGER] ON [dbo].[PLI]
    FOR UPDATE
    AS
    Declare @cmd sysname, @code sysname, @list sysname
         Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted
         Set @cmd = 'java mirrorDb.Copy PLI UPDATE ' + @code + ' ' + @list
         EXEC master..xp_cmdshell @cmd
    CREATE TRIGGER [PLI_DELETE_TRIGGER] ON [dbo].[PLI]
    FOR DELETE
    AS
    Declare @cmd sysname, @code sysname, @list sysname
         Select @code = PLI_K_COD, @list = PLI_K_LISTINO from deleted
         Set @cmd = 'java mirrorDb.Copy PLI DELETE ' + @code + ' ' + @list
         EXEC master..xp_cmdshell @cmd
    you must go "sql server entreprise manager" right click on the table you want to add triggers and select: all activities, manage triggers.
    You have 3 examples: for an insert, for an update and for a delete
    ON [dbo].[PLI] specify the table on which you want to setup trigger.
    FOR DELETE, INSERT, UPDATE specify the event.
    The Declare statement create the variables in which I want to put some values to pass to the java program, for example which table, which event, which key fields.
    the "Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted" set the variables with the value of the columns of the table I am interested to read from my java program, for example the variable @code receive the value of the column pli_k_kod (is the key) of the table PLI.
    The "Set @cmd = 'java mirrorDb.Copy PLI DELETE ' + @code + ' ' + @list " prepared the variable @cmd with the java command followed by the package.classname and parameters.
    The EXEC launch the command to the operating system.
    Daniele

  • How Can I execute an external program from my vi?

    Hi guys,
    I want to execute a external program to use it when i called with a bottom. I want push a bottom and execute the program, like acess direct icon or so.
    Any help?.

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • Invoke External programs from inside App Server

    hi,
    How can I invoke an external program from a session bean (or from an MDB)?
    Can I use Runtime.exec() directly from a bean?
    If so, are there any security considerations?
    thanks,
    Sundar

    I found this article rather helpful:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to call Operating System commands / external programs from within APEX

    Hi,
    Can someone please suggest how to call Operating Systems commands / external programs from within APEX?
    E.g. say I need to run a SQL script on a particular database. SQL script, database name, userid & password everything is available in a table in Oracle. I want to build a utility in APEX where by when I click a button APEX should run the following
    c:\oracle\bin\sqlplusw.exe userud/password@database @script_name.sql
    Any pointers will be greatly appreciated.
    Thanks & Regards,

    Hi Guys,
    I have reviewed the option of using scheduler and javascript and they do satisfy my requirements PARTIALLY. Any calls to operating system commands through these features will be made on the server where APEX is installed.
    However, here what I am looking at is to call operating systems programs on client machine. For example in my APEX application I have constructed the following strings of commands that needs to be run to execute a change request.
    sqlplusw.exe user/password@database @script1.sql
    sqlplusw.exe user/password@database @script2.sql
    sqlplusw.exe user/password@database @script3.sql
    sqlplusw.exe user/password@database @script4.sql
    What I want is to have a button/link on the APEX screen along with these lines so that when I click that link/button this entire line of command gets executed in the same way it would get executed if I copy and paste this command in the command window of windows.
    Believe me, if I am able to achieve what I intend to do, it is going to save a lot of our DBAs time and effort.
    Any help will be greatly appreciated.
    Thanks & Regards,

  • 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

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How to call an external server from Webdynpro program?

    Hi All,
    i have a requirement in which i have to call an external server from Webdynpro ABAP program.
    how to imp

    hi ,
    do u mean u need to call the external link from ur WD ABAP application ?
    if so , u either create
    1 a Link to URL ( LTU ) UI element  and call the external link using that
    2 if u wish to use some other fuctionality and thn wish to call the URL in ur application ,u write this piece of code in ur relevant on Action method :
    data:  lo_window_manager type ref to if_wd_window_manager.
    data:  lo_api_component  type ref to if_wd_component.
    data:  lo_window         type ref to if_wd_window.
    data:  ld_url type string.
    lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    ld_url =  ''.  // ur external sever link here
    CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW     
    EXPORTING     URL                = ld_url           
    RECEIVING     WINDOW         = lo_window.
    lo_window->open( ).
    I hope u wud be able to create URL now .
    regards,
    amit
    Edited by: amit saini on Oct 13, 2009 11:25 AM

  • Calling an external program!

    Salut all, Im using unfortunately Oracle Forms 6i, and I need to call an external program that I have to develop in Java, compiled into .jar. I just wanna use something like java -jar myJar.jar <my params...> but I don´t know how to call external programs from Oracle Forms, in special from 6i.
    I have searched this thread passed (Re: Calling JAVA from PL/SQL but didn´t help me so much.
    Thanks all for patience!

    In version 9 and 10 we have a general way of calling out to java thru the Java Importer functionality.
    If you cannot upgrade to these later versions and you don't need to get data back from the jar file execution you can always use the Host command to call it directly the way you have outlined.

Maybe you are looking for