Is there a way to call a SQL Program from an Oracle Report?

Morning friends. I had a question about Oracle Reports and them calling a SQL Program. Here is the problem at hand. I am hoping to not have to change the existing program a whole lot!
Currently, here is what is happening. I have a .sh file which calls the Oracle Report first and then goes on to call a .sql program. I am using Oracle Reports 10g and the call to run the report is RWCLIENT. This was earlier being called using RWRUN.
Because of certain issues of synchronicity with RWCLIENT, I am now looking to move the call to the .sql program to the Oracle Report (Ideally the AFTER_REPORT trigger). Is this possible?
The Oracle Report basically outputs a listing and the .sql program does a spool and creates a text file which is later used as attachment to the email and sent out to the person who submitted the Report.
Here is the shell script.
# Accept system input parameters
p_gradapp_user_id=$1
p_gradapp_job_id=$2
program_unit='GRAD001A'
rwrun.exe module=$GRADAPP_PATH/GRAD001A userid=$p_gradapp_user_id paramform=no desformat=$GRADAPP_PRINTER(GRAD001,1) destype=file desname=grad001-$p_job_id-1-1.lis p_gradapp_job_id=$p_gradapp_job_id p_gradapp_user_id=$p_gradapp_user_id batch=yes
exit_status=$?
program_unit='GRAD001B'
sqlplus.exe -s $p_gradapp_user_id @$GRADAPP_PATH/grad001b.sql $p_gradapp_user_id $p_gradapp_job_id
exit_status=$?
exit 0

If you are going to use rwclient try BACKGROUND=NO as an extra parameter:
background=NO: Runs the report synchronously. The client waits for the report to queue, be assigned to a runtime engine, run, and finish.
See: http://download.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_cla.htm#i656436

Similar Messages

  • Is there any way to call a sql file from a pl/sql block

    Hi,
    I want to call a sql file from a pl/sql block.
    the pl/sql block has an exception handler. The pl/sql block will execute the sql file and in case it throws error then the exception handler will take care of it.
    The sql file will be a master file and it will itself call other sql files.
    is it possible to call any sql file from pl/sql block ?

    When you say "sql file", what precisely do you mean? Do you have a file that has just SQL statements? Or do you have SQL*Plus scripts?
    Where are the files stored? Are they on your client machine? Or the database server?"which in turn calls other sql files" seems to imply that the answer to the first question is that you have SQL*Plus scripts. If you have SQL*Plus scripts, you need SQL*Plus to execute them. PL/SQL is running in the Oracle database, SQL*Plus is a client application. It is not practical to have PL/SQL call SQL*Plus. Since you've already ruled out the best of the bad options, it appears that the answer is no, you can't have your PL/SQL run these files.
    As Alex points out, that's probably a good thing. It sounds like your application has been designed incorrectly. If you need PL/SQL, you should be creating stored procedures and functions and calling those from PL/SQL. Having PL/SQL depend on code in flat files outside the database is not a good idea.
    Justin

  • Is there a way to call a stored proc from the web in Oracle 10g?

    I've found an article about Native Oracle XML DB Web Services in 11g, but it appears to be a new feature. Is there any way of accomplishing something similar in 10g? I would like to be able to process XML documents that contain the name and parameters of the stored proc/function to execute.
    Link to 11g article:
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm

    I agree with you. I was looking into mod_plsql, but it turns out that their development standards include not using Oracle HTTP server. The whole reason why they want to be able to execute a stored proc based on what is specified in an XML doc is that they want to avoid having to change their middle-tier configurations anytime a new stored proc or a change in stored proc parameters is made. I'm not familiar with what all is involved with .NET and the middle-tier, but supposedly this way, they can specify any stored procedure name and its parameters in an XML file. The XML is then suppose to be passed on to an Oracle stored procedure which will parse the XML and dynamically execute the stored procedure that was specified in the XML.
    Here is an example of the XML:
    '<Root>
      <PackageName>TEST_PKG</PackageName>
      <ProcedureName>TEST_PROC</ProcedureName>
        <Parameters> 
        <Parameter>
            <Name>EmpID</Name>
            <Value>12345</Value>
        </Parameter>
        <Parameter>
            <Name>Org</Name>
            <Value>ABC</Value>
        </Parameter>
        </Parameters>
    </Root>I basically need to parse out the pkg/proc names:
      SELECT t.COLUMN_VALUE.extract('//PackageName/text()').getstringval() PkgName,
             t.COLUMN_VALUE.extract('//ProcedureName/text()').getstringval() ProcName
         INTO v_pkg_name, v_proc_name
         FROM TABLE(xmlsequence(XMLTYPE(v_XML_input) .extract('/Root'))) t;...and then execute the procedure:
        EXECUTE IMMEDIATE 'BEGIN '||v_pkg_name||'.'||v_proc_name||'(:a, :b, :c); END;'
          using in v_in_param1, v_in_param2, out v_XML_output;The problem is that this approach is very complicated since there can be any number of IN/OUT parameters and of various datatypes. I would have to create all kinds of possible bind variables!

  • Calling PL/SQL Functions And Open Oracle Reports From ADF Application

    Hi all,
    My company will convert some projects from Oracle forms to Oracle ADF so, we need to call the PL/SQL functions and open the Oracle Reports (which are already exist) from ADF Application.
    Thank You..
    Jack.N

    Hi Jack.N,
    calling PL/SQL Functions -----> http://sameh-nassar.blogspot.com/2010/01/create-plsql-function-and-call-it-from.html
    Open Oracle Reports ---------> http://radio-weblogs.com/0137094/2008/06/15.html
    You will find The Integration between ADF and other systems in ---> http://wiki.oracle.com/page/ADF+Integration
    Sameh Nassar

  • I got a new laptop, but I can't find my creative suite 6 cd. Is there any way to get my CS6 programs from my windows 7 laptop to my new windows 8 laptop?

    I guess I didn't register it to this account since it's not there. I'm going to check my other emails to see if maybe I registered it to a different account and I'm going to keep looking for the cd. But is there any hope of getting my programs from one laptop to my new one?

    You can download from here:
    Other downloads

  • Is there a way to start a JAVA program from the dock?

    Hello,
    I wrote some JAVA applications and I would like to put them in -
    - and start them from - the dock.
    These applications were built into .jar files.
    I can start them from Finder which tells me that there is some .jar starter utility.
    ;JOOP!

    The Dock is for Applications, Documents, and Folders (which can take several forms). There are some other odd animals that can stay in the Dock, but they were never truly implemented (recent items is one). If you "wrap" the .jar file inside some package that behaves as an application, you can have it stay in the Dock just as any other Application.
    A .jar file is not an application, it's a java archive. It is a collection of classes, metadata, etc. which the Java runtime interprets and executes. The Application which runs it shows up in the Dock as the coffee cup, but that is just the runtime engine, not the .jar.
    The .jar is like any other document, such as a a word processing document. Just like any document, it can be double-clicked and the handling application will be called to open it. Double-clicking that word processing document causes the word processing application to open the document and interpret its contents. Double-clicking the .jar file causes the java runtime engine to open the .jar file and interpret its contents. Instead of presenting it as paragraphs of text, it displays it as the application it represents.

  • IS there a way to downgrade my IOS program from IOS 8???  On an IPhone 4S

    Of course as many have complained that IOS 8 has bogged down their phones.  On an I-Phone 4S it is absolutely ridiculous at how bad it is.  I have a 32GB phone that I have deleted apps after apps in hopes of it getting better & still the same.  I am not able to get on Facebook or many video or music programs at all!!!  PLEASE HELP!! 

    I downloaded the 8.1 yesterday and its stuck at the Apple ID Sign in. It will allow me to enter my password, then it goes right back to the sign in!! I'm stuck!

  • Calling Dot Net program From oracle Database

    Hi
    is there any way to call DOT NET program Like C# from oracle database, i mean is there way to call it from pl-sql stored procedure or trigger ..etc
    I read that is possible with java , C, C++, but is it possible with C#
    Best Regards

    If your Oracle database is running on Windows and is a reasonably recent version (I believe 10.1 or later), it has the ability to create .Net stored procedures just like you have the ability to create Java stored procedures. That tends not to be a particularly commonly used feature but it's an option. If you compile your .Net application to a DLL, you could also call it as an external procedure.
    More commonly, however, if you're talking about a .Net program that is deployed on a middle tier server, however, would be for the .Net application to expose an API (say, a web service API) that the database could invoke (via UTL_DBWS or UTL_HTTP).
    Justin

  • Is there any way to call a method by name?

    Hi there,
    Is there any way to call a method by name?
    e.g. myobject.whatIAmLookingFor("the_name_of_a_myobject's_method",param1,param2,...);
    Thanx in advance

    Is there any way to call a method by name?
    Yes:
    <looking at his paint(Graphics g) method>
    Hey Sam! Commere Sam! Das a good boy!

  • Is there a way to call a function with in the initializer of a ArrayCollection?

        Is there a way to call a function with in the initializer of a ArrayCollection?
    It won't let me do this:
    var ac:ArrayCollection = new ArrayCollection([
                        {childName:'addTrade',index:addTradeIndex },
                        {childName:'tradeList',dealsCanvas.getChildIndex(tradeList) }

    The correct syntax is
    var ac:ArrayCollection = new ArrayCollection([
                        {childName:'addTrade',index:addTradeIndex },
                        {childName:'tradeList',index:dealsCanvas.getChildIndex(tradeList) }

  • Is there any way to call java program whenever i login to R3 System.?

    Hi Experts
    Is there any way to call java program whenever i login to R3 System.
    Means Whenever the user login to R3 system i should trigger one java program.. Is there any way
    Please help me
    Thanks & Regards
    Ravi Shankar B

    If you want to access to the Windows Taskbar, you should call some Win32 APIs and JNI. Refer to Win32 references.

  • Is there any way to call 'Action' in web.xml ?

    Dear All,
    My requirement is like, in my Deployement descriptior (web.xml) I would like to call "action" instead of calling welcome page(*.jsp).
    Iam using JBOSS with Jetty5.0 Servlet Container.Is there any way to call action in my deployment descriptor?
    Thanx in advance

    You can, but you have change your server configuration file. I am using Sun App server where we have a default-web.xml file in the config directory where it specifies which default file will be loaded, instead of calling the welcome.jsp. In Sun App server there is a parameter called <welcome-file-list> where you can specifiy which one to be loaded. I strongly believe there must be something like that in JBoss. Check out all the xml files in the JBoss config directory where you can find a solution to it.

  • Is there any way to backup Azure SQL regularly by scheduled job ?

    Is there any way to backup Azure SQL regularly  by scheduled job  ?

    there's really no equivalent of a SQL Server-like type of backup that you schedule using SQLAgent, however you can have scheduled exports, see this
    link: 
    Note that Azure SQL Databases also has built-in backups for self-service restores, see this
    link

  • Is there a way to get the correct order from the dependent types of a sche

    Hi ,
    I have a CT facing the following problem:
    When trying to built a SQL script to create all the object types within a schema using the DBMS_METADATA packages.
    Did insert in a table the names of the types that will be exported following a concrete order, next loop into the table and call the DBMS_METADATA package for each row.
    These type are depedent between them, there are some type attributes calling other types and here the issue
    First : try to generate the order by created column of dba_objects and when the generated SQL script is launched a lot of type appearing as incomplete state due to the order isn't correct.
    Second : try to insert the table ordering by object_id colums of dba_tables view, it appears incomplete types too.
    Currently want to insert the table using a recursive query with connect by against the dba_type_attrs starting with the rows when ATTR_TYPE_NAME is not null (the types that are called by other types), but this way has a issue dificult to resolve: the roots of hierarchy are the rows when ATTR_TYPE_NAME is not null and we've dependencies between roots nodes
    The question is is there a way to get the correct order from the dependent types of a schema?
    Platform: IBM SP AIX
    DB version: 9.2.0.7
    Any help will be appreciated .
    Thanks in advance.

    The xxx_dependencies view should give you the dependencies betwee nthe various types. I would look at something along the lines of:
    SELECT object_name, referenced_name
    FROM (SELECT o.object_name, d.referenced_name
          FROM user_objects o, user_dependencies d
          WHERE o.object_name = d.name(+) and
                o.object_type = d.type(+) and
                d.referenced_type(+) = 'TYPE' and
                o.object_type = 'TYPE')
    START WITH referenced_name IS NULL
    CONNECT BY PRIOR object_name = referenced_nameThe outer join between user_objects and user_dependencies is required to generate the names of types which are not dependent on other types, or do not have other types dependent on them.
    HTH
    John

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

Maybe you are looking for

  • BOM EXPLOSION IN SUBCONTRACTING SCENERIO

    Hi, To all Experts, This is regarding the bom explosion in subcontracting P.O(scenerio).Scenerio prob. is explained as follows - 1) I have an assembly which includes the semifinish & raw materials. 2) By cs11 it explpodes whole BOm 3) When i made P.O

  • Restore Oracle VM Manager with no backup?

    What would be the easiest way to restore/recover VM Manager data if the system it was installed on is unrecoverable and no backup is present?

  • How to know the select stmt used in creating a table?

    Hi, If we create a table by selecting some records form another table, can we see the select statement used to create that table. example: Create table emp2 as select * from emp where deptno=20; is there any data dictionary table which stores select

  • Get a word document at background

    Hi all, We have a requirement here that we need to get a word document at background. Basically to archive the result layout of a smartform but in a word document. Since the client need to change it. And since it is an BSP application, we need to do

  • Easy Question about end jumps

    Here is my menu lay out. Three buttons. Play all (Want it to play enire movie) Play part one ( Play up to track 6 and return to menu) Play part two (Play from track 7 to end) Can someone please tell me how to do this correctly? What am I doing Wrong