How to use dbms_pipe to execute a shell program

Hi ,
I have a stored procedure....with an if else condition in it
what i want is
if condition is true... then
execute the shell script
else
do nothing
how do i achieve this ? how do i execute a shell script from with in stored proc .. i heard dbms_pipe can be help ful ..could any one throw more light or an example to achieve this?

learning_man wrote:
sure i have gone through that option... but the thing is that.....i wnat to run the shell script only if a certain condition inside the stored proc passed some thing like
if condition = true then
  dbms_scheduler.create_job(
  job_name   => 'TESTSH',
  job_type   => 'EXECUTABLE',
  job_action => '/mydir/myscript.sh',
  start_date => SYSTIMESTAMP,
  enabled    => TRUE,
  comments   => 'testsh');
else
dont do anything...
end if;
where as scheduler is used to schedule .... the time... i dont want to schedule the time.... i want to run the shell script based on some condition becoming true inside the procAbove code snippet does exactly what you're talking about.
Max
http://oracleitalia.wordpress.com

Similar Messages

  • How we can call or execute a SHELL script through Oracle forms or Reports

    How we can call or execute a SHELL script through Oracle forms or Reports.Its urgent.......

    Use HOST command.

  • How to use a parameter of a report program in a dialog program

    how to use a parameter of a report program in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use a parameter in a report program in a dialog program

    how to use a parameter in a report program in a dialog program

    Hi Shaikh,
    Post it in http://scn.sap.com/community/abap
    "ABAP Development".
    sree

  • I m a insurance agent how to use my company product sales illustration program

    How to use my company product sales illustration program ?

    Who knows? XD
    You haven't mentioned anything about the program.
    Why don't you ask your company for training? (if it is an inhouse developed program).
    Otherwise, go to the website for the program. Use GooGle!

  • How to use macro's functionality in a programe...?

    hi,
    i am siva,
    i am new to abap,
    i am not having clarity on how to use macro in a programe,
    please send me any source code of a programe which
    contain functionality of macros..?
    and explain functionality of macros...?
    i any of u know answer..
    please send me source code of a programe that use macros...?
    reguars,
    siva.

    Hi,
    <u>Macros:</u>
    If you want to reuse the same set of statements more than once in a program, you can include
    them in a macro. For example, this can be useful for long calculations or complex WRITE
    statements. You can only use a macro within the program in which it is defined, and it can only
    be called in lines of the program following its definition.
    The following statement block defines a macro <macro>:
    DEFINE <macro>.
    <statements>
    END-OF-DEFINITION.
    You must specify complete statements between DEFINE and END-OF-DEFINITION. These
    statements can contain up to nine placeholders (&1, &2, ..., &9). You must define the macro
    before the point in the program at which you want to use it.
    Macros do not belong to the definition part of the program. This means that the DEFINE...ENDOF-
    DEFINITION block is not interpreted before the processing blocks in the program. At the
    same time, however, macros are not operational statements that are executed within a
    processing block at runtime. When the program is generated, macro definitions are not taken
    into account at the point at which they are defined. For this reason, they do not appear in the
    overview of the structure of ABAP programs [Page 44].
    A macro definition inserts a form of shortcut at any point in a program and can be used at any
    subsequent point in the program. As the programmer, you must ensure that the macro
    definition occurs in the program before the macro itself is used. Particular care is required if you
    use both macros and include programs, since not all include programs are included in the syntax
    check (exception: TOP include).
    To use a macro, use the following form:
    <macro> [<p1> <p2> ... <p9>].
    When the program is generated, the system replaces <macro> by the defined statements and
    each placeholder &i by the parameter <pi>. You can use macros within macros. However, a
    macro cannot call itself.
    Ex:
    DATA: RESULT TYPE I,
    N1 TYPE I VALUE 5,
    N2 TYPE I VALUE 6.
    DEFINE OPERATION.
    RESULT = &1 &2 &3.
    OUTPUT &1 &2 &3 RESULT.
    END-OF-DEFINITION.
    DEFINE OUTPUT.
    WRITE: / 'The result of &1 &2 &3 is', &4.
    END-OF-DEFINITION.
    OPERATION 4 + 3.
    OPERATION 2 ** 7.
    OPERATION N2 - N1.
    The produces the following output:
    The result of 4 + 3 is 7
    The result of 2 ** 7 is 128
    The result of N2 - N1 is 1
    Here, two macros, OPERATION and OUTPUT, are defined. OUTPUT is nested in
    OPERATION. OPERATION is called three times with different parameters. Note how
    the placeholders &1, &2, ... are replaced in the macros.
    Regards,
    Bhaskar

  • How to use multiple visa read in one program

    hi
    i am working at Hameg HM8143 power supply i want to measure voltage and current simultaneiously and use the measured values for further calculations. for this i used two visa read blocks.
    >>>>>>the measured values are shown in the same visa read string however i want it to be shown sepetately,
    >>>>>>One of the VISA read block gives error. so i want to know how to use VISA read to get current and voltage simultaneously in seperate strings
    >>>>>>than how to convert strings to numbers  for using them for my calcultions.
    i am attaching screen shot as well
    Attachments:
    screenshot.JPG ‏164 KB

    you can not use a single serial to send 2 commands simultaniously?
    There is a single serial line so one command has to be before another.  This doesnt mena that you can not read from 2 seperate threads but will have to ensure that there is a locking mechanism to make sure that your queries are atomic.  In labview encapsulating all communications can be done with an action engine which will allow for concurrent execution with automatic blocking of your resource (serial device).
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How to use shared variables with native c programs

    Hello
    What is the way to use shared variables with native c programs?
    I have a c/c++ program that uses the NIDAQmx C-API to perform measurements. Now I want to communicate to a LabVIEW program via shared variables.
    Is there a C-API for shared variables as there is for the NIDAQmx functionality? Where can I find further documentation? The document "Using the LabVIEW Shared Variable" mentions that one "can read and write to shared variables in ANSI C", but there are no hints about how and where to look.
    Thanks in Advance

    Hi user42,
    with CVI 8.0, you cannot create or configure shared variables. However, you can read or write to an already configured LabVIEW 8.x shared variable from CVI using the DataSocket API.
    In order to do this you need to have and DataSocket 4.3 or higher installed.
    Here's a forum post about using the DataSocket functions a LabVIEW Shared Variables:
    http://forums.ni.com/ni/board/message?board.id=180&message.id=24569&requireLogin=False
    With CVI 8.1 and Measurement Studio 8.1 it's possible to use Shared Variables via the Network Varaiable Library (check out the end of the "Network-Published Shared Variable" section within the "Using the LabVIEW Shared Variable" documentation and the following link).
    Datasocket with LabWindows/CVI and LabVIEW Real-Time:
    http://digital.ni.com/public.nsf/allkb/CC4343488413A2F586256E6200099638?OpenDocument
    Daniel
    NIG

  • How to generate checks when executing Automatic Payment Program (F110)

    Is it possible to generate checks automatically when I execute the automatic payment program? Will reward points to any suggestion. Thanks!

    hi patrick
    try this.....ur problem may solve.....
    Create Automatic Payment Transactions (F110)
    Purpose
    Use this procedure to generate checks proposals or ACH proposals and then subsequently issue checks or set up ACH files to be transmitted to the bank.
    Trigger
    Perform this procedure when through either an ACH or a check, a creditor of the University needs to be paid.
    Prerequisites
    Open invoices with reached due dates have to be present in the SAP system.
    Menu Path
    Use the following menu path to begin this transaction:
    ·         Select Accounting  Financial Accounting  Accounts Payable  Periodic processing  Payments to go to the Automatic Payment Transactions: Status screen.
    Transaction Code
    F110
    Business Process Information
    The automatic payment process will be centrally managed in the Accounts Payable Office. The automatic payment program will be executed each day for all open invoices (across vendors) in the system. There will be separate payment run execution corresponding to each payment method category:
    Check payments: clears the open invoices and issues a check output
    ACH payments: clears the open invoices and issues an ACH file output
    Foreign currency payments: clears open invoices but no output is issued
    State/Grant payments: clears open invoices but no output is issued
    The process steps executed during the automatic payment program are:
    Enter Payment Parameters
    Edit/review Payment Proposal
    Post Payments
    Generate Payment Medium (print checks or create ACH payment file)
    Generate Positive Payment File
    The payment parameters are entered in order to limit the open invoices and credits selected for payment. It is important to note that the payment terms that are defined on the invoice will drive whether a invoice is due for payment during the current payment run. During the payment program execution, the invoices that are due for payment will be presented to the user on a payment proposal list.
    The payment proposal is a list of expected payments grouped by vendor account. Invoices that are due for payment but cannot be paid due to some kind of accounting or system error are listed as exceptions. Examples of typical exceptions are missing banking information (for ACH payments) and blocked invoices. Some payment exceptions will be resolved at the Accounts Payable Office. However the Department must resolve some exceptions. When these types of exceptions appear on the payment proposals, the Accounts Payable Office will inform the Department of the blocked payment in order to get a resolution. Key personnel in the Accounts Payable Office will be the only resources to have access to the editing function of the payment proposal processing. Typically, there is no business reason the edit or change a payment proposal. Editing options for a payment proposal includes: changing the default disbursing bank account information or changing the payment method.
    After the payment proposals have been reviewed and edited, the proposals are posted as payments. It is important to note that any open credit on the vendor's account is also taken in consideration when creating the vendor's payment. The payment method supplement defined on the invoice will drive the check sorting.
    In addition to the printed check output, the payment program run produces an ACH file and a Positive Pay file. Both files are sent to the bank for further processing. The ACH file contains the vendor's payment and banking data. The Positive Pay file contains the check data (check processed, voided, etc) and is used for confirmation of payments.
    Helpful Hints
    ·         The R/O/C column in the field description tables below defines whether the field is required (R), optional (O), or conditional (C).
    ·         On certain screens you may have to scroll to view some data entry fields.
    ·         Click the  tab to view the current overall status of the payment process by viewing the informational messages.
    Procedure
    1. Start the transaction using the menu path or transaction code.
        Automatic Payment Transactions: Status
    2. As required, complete the following fields:
    ·         Run date
    ·         Identification
    3. Click the  tab.
    The payment program parameters are used to limit the program's selection of open invoices and credits.
        Automatic Payment Transactions: Parameters
    4. As required, complete/review the following fields:
    ·         Posting date
    ·         Docs entered up to
    ·         Company codes
    ·         Pmt meths
    ·         Next p/date
    ·         Vendor
    5. Click the  tab.
    Free selection criteria are extended parameter selection criteria used to limit the open invoices and credits selected in the payment run.
        Automatic Payment Transactions: Free Selection
    6. Perform any of the following:
    If You Want To
    Then
    Select data by a particular field value; use the match code on the Field Name field to obtain the required field
    Enter the required field value to be considered in the payment program selection of open items. The field value is entered in the Values field
    Payment selection can be based on fields on the invoice or credit memo document or fields on the vendor master.
    Example: A (AP payment block)
    Exclude the open items that match your field value
    Select  to the left of Exclude values.
    Include only those open items that match your field value
    Deselect  to the left of Exclude values.
    7. Click the  tab.
    This information is used to expand the information that is automatically recorded in the payment run log. The payment run log is used to diagnose any program errors during the payment run.
        Automatic Payment Transactions: Additional Log
    8. Perform the following:
    If You Want the Payment Program Log to Record
    Then
    Information on due date check
    Select  to the left of Due date check.
    Activate this option.
    Any payment method selection data
    Select  to the left of Payment method selection in all cases.
    Activate this option.
    Line item information the payment documents generated upon posting the payment proposal
    Select  to the left of Line items of the payment documents.
    Activate this option.
    9. As required, complete/review the following fields:
    ·         Vendors (from)
    ·         Vendors (to)
    Enter the same vendor account number range for Accounts required section of the transaction.
    10. Click the  tab.
    The specifications defined in this section of the transaction inform the payment program the correct form to use for check printing and the correct payment file format to use for ACH payments.
        Automatic Payment Transactions: Printout and DME
    11. As required, complete the following fields:
    ·         RFFOAVIS
    ·         RFFOUS_C
    12. Click the  tab.
        Exit editing
    13. Click  to save the data.
    If you want to delete the payment program parameters entered, select Edit  Parameters  Delete.
        Automatic Payment Transactions: Status (2)
    The system displays the message, "Details have been saved for the run on XX/XX/XX XXXX."
    14. Click  .
    If you want to refresh the screen in order to view the current status (processing step) of the payment program click  at any time.
        Schedule Proposal
    15. Perform one of the following:
    If You Want To
    Then
    Execute the payment program (i.e. process the payment parameters entered and create a payment proposal) immediately
    Select  to the left of Start immediately.
    Activate this option.
    Designate a target computer
    Enter the name in the Target computer field.
    16. Click  to process the payment parameters and create a payment proposal.
    While the payment program is selecting and processing data, the status will display the message, "Proposal is running." When the payment proposal has completed and is ready for review/edit, the system will display the message, "Payment proposal has been created."
        Automatic Payment Transactions: Status (3)
    The system displays the message, "Proposal run has been scheduled."
    17. Click  .
        Automatic Payment Transactions: Status (4)
    The system updates the status, "Payment proposal has been created."
    18. Perform one of the following:
    If You Want To
    Then
    Go To
    Execute the payment run
    Click  .
    Step 19
    Edit the payment proposal
    Click  .
    Step 43
    Display the payment proposal
    Click  .
    Step 54
    Display the payment proposal run log
    Click  .
    Step 57
    Delete the proposal
    Select Edit  Proposal  Delete.
    Step 60
    Display the proposal list in a printer friendly format
    Select Edit  Proposal  Proposal List....
    Step 62
    Display only the exception (error) invoices or credits
    Select Edit  Proposal  Exception List....
    Step 67
    Exit this transaction
    Step 72
        Schedule Payment
    19. Perform the following:
    If You Want To
    Then
    Execute the payment program (i.e. process the payment parameters entered and create a payment proposal) immediately
    Select  to the left of Start immediately.
    Activate this option.
    Designate a target computer
    Enter the name in the Target computer field.
    20. Click  to process the payment proposal and post the payment documents.
    While the payment program is selecting and processing data, the status will display 'Payment is running'. When the payment proposal posted the status will display 'Payment run has been carried out. Posting orders X generated, X completed. (X will represent the total number of checks produced).
        Automatic Payment Transactions: Status (5)
    The system displays the message, "Payment run has been scheduled."
    21. Click  .
        Automatic Payment Transactions: Status (6)
    The system updates the status, "Payment run has been carried out." If you click  after seeing the status update, "Payment run has been carried out", the system will display an update to the status, "Posting orders: XXXX generated, XXXX completed."
    22. Perform one of the following:
    If You Want To
    Then
    Go To
    Review the payments posted
    Click  .
    Step 23
    Display the payment proposal
    Click  .
    Step 26
    Display the payment proposal run log
    Click  .
    Step 29
    Display the payment list in a printer friendly format
    Select Edit  Payments  Payment List.
    Step 32
    Display only the exception (error) invoices or credits
    Select Edit  Payments  Exception List.
    Step 36
    Print the payment run information
    Click  .
    Step 40
    Exit this transaction
    Step 72
        Job Log Entries for F110-XXXX-XXXX / XXXX
    23. Review the displayed information.
    24. Click  .
    25. Return to Step 22.
        Display Payment Proposal: Payments
    26. Review the displayed information.
    27. Click  .
    28. Return to Step 22.
        Job Log Entries for F110-XXXX-XXXX-X / XXXX (2)
    29. Review the displayed information.
    30. Click  .
    31. Return to Step 22.
        List Variant
    32. Click  .
        Payment list
    33. Review the displayed information.
    34. Click  .
    35. Return to Step 22.
        List Variant (2)
    36. Click  .
        Payment list (2)
    37. Review the displayed information.
    38. Click  .
    39. Return to Step 22.
        Schedule Print
    40. As required, complete/review the following fields:
    ·         Start date
    ·         Start immediately
    ·         Start time
    ·         Target computer
    ·         Job name
    41. Click  .
    42. Return to Step 22.
        Accounting clerk
    43. Click  .
        Edit Payment Proposal: Payments
    44. Review the displayed information.
    45. Perform one of the following:
    If You Want To
    Then
    Go To
    Continue with the payment process
    Click  .
    Step 18
    Review/edit invoice information for the payment (invoice numbers, discounts, payment amounts, etc).
    1. Click on the line you want to select.
    2. Click  .
    Step 46
    Change the key payment information (payment method, house bank, payee name and address, etc.)
    1. Click on the line you want to select.
    2. Click  .
    This option does not work for lines that have exceptions.
    Step 51
        Edit Payment Proposal: Open Items
    46. Double-click on the line you want to choose.
        Change Line Items
    47. As required, complete/review the following fields:
    ·         Payment block
    ·         Discount amount
    ·         Cash discount %
    48. Click  .
    49. Click  .
    50. Return to Step 45.
        Change Payment
    51. As required, complete/review the following fields:
    ·         Payment method
    ·         Pmt meth.supl.
    ·         Due date
    52. Click  .
    53. Return to Step 45.
        Display Payment Proposal: Payments
    54. Review the displayed information.
    55. Click  .
    56. Return to Step 18.
        Job Log Entries for F110-XXXX-XXXX-X / XXXX (3)
    57. Review the displayed information.
    58. Click  .
    59. Return to Step 18.
        Delete proposal
    60. Click  .
        Automatic Payment Transactions: Status (7)
    The system displays the message, "Data and log deleted."
    61. Go to Step 72.
        List Variant (3)
    62. As required, complete the following field:
    ·         Variant
    63. Click  .
        Payment list (3)
    64. Review the displayed information.
    65. Click  .
    66. Return to Step 18.
        List Variant (4)
    67. As required, complete the following field:
    ·         Variant
    68. Click  .
        Payment list (4)
    69. Review the displayed information.
    70. Click  .
    71. Return to Step 18.
    72. Click  until you return to the SAP Easy Access screen.
    73. You have completed this transaction.
    Result
    You have executed a payment proposal, executed and posted a payment run and printed checks.
    reward me points.......dont forget

  • How to use a parameter  of a report program from selection screen in a dialog program

    how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use form personalization to lunch concurrent program

    Hi,
    Now I am using the form personalization to lunch a concurrent program with global variables.But how to post the global variables to the program parameters.
    Thanks and best regards
    Fang
    Edited by: 895910 on Dec 25, 2011 7:54 PM

    Hi,
    I have defined global variables using form personalization. But how should i launch a SRS Form to submit a request and pass the variables as parameters. What should the syntax be.
    Thanks and best regards,
    Fang

  • How to use controls in silverlight direct3d interop program ?

    I'm working on convert my winrt program to silverlight program.
    And I'm using silverlight 8.1 now. The program has two part, SilverlightDirect3DInterop(C#) project and SilverlightDirect3DInteropComp(C++).
    The question is, I can't use control in SilverlightDirect3DInteropComp.
    In my program, all control are created and used by code.
    I want to use these control in SilverlightDirect3DInteropComp.
    How should I do?

    Hi Y.H.King,
    I may need to know what SilverlightDirect3DInteropComp used for, is it a runtime component in Windows Runtime, or its a simply a DLL project?
    And another question is how you create the controls in your C++ library? And how you use the control in your runtime app?
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to use Labview 7.0 to make program interface?

    Hellow!
    Will Labview 7.0 be able to make the program interface? just like some application software made by VC++,VB?
    The program interface should have the menu,button,...
    Thanks!

    You can use LV to create a fully working program with an interface of your design, just like you would in any other compiler. LV actually serves as a compiler for a graphical language called G, which is based on dataflow instead of text based execution (the data "flows" through wires from one function to the next, controlling execution order and filling the role of variables).
    Since LV is multiplatform (and not MS), its default controls are not identical to those in VC and VB, but those can be accessed to. Actually, in many ways, it's much easier to build an interface in LV, because building the interface actually defines your "variables" and your interaction with the code.
    An interface would be no good without a program, so you will have to know how to use LV. It's much faster to learn than other languages, but you will still need some experience to write good programs.
    To learn more, I suggest you start by reading the LabVIEW user manual. Also, try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide.
    If your question was only about MS buttons, like in VB and VC, you can find them in the Dialog Controls palette, or you can use ActiveX to embed them into your program.
    Try to take over the world!

  • How to use d2kwutil for calling win-api programs in form 6i

    I WANT TO USE d2kwutil for calling win-api programs in form 6i.
    PLEASE GIVE ME IT'S SOLUTION.

    D2kwutil comes with a Demo Form WAPIDEMO - you can run this to see every function demonstrated. You can even run a function using the demo form and copy the syntax required directly into your own form -------------------------
    yes in have got that WAPIDEMO from web and run successfully but
    i can not do those codes in my owdn form.Because i do not get those apis like
    win_app_session in form 6i.
    Again i could not understand how that form runs without connecting to database.
    Please describe the solution.

  • How to use setters and getters in another program by using bean

    how to use the setters and getters methods using database connection by bean

    Say again?And so he did:
    http://forum.java.sun.com/thread.jspa?threadID=750645
    kind regards,
    Jos ;-)And again
    http://forum.java.sun.com/thread.jspa?threadID=750643&tstart=0
    No, that's his class mate I guess; it must be national getter and setter
    day somewhere today ;-)
    kind regards,
    Jos

Maybe you are looking for