Concurrent HOST program calling a proc to log using fnd_file.put_line

Hello all,
I have a concurrent HOST program that does 3 main things
1. Calls a sqlplus program to do some initializing. This program is a proc in a package.
2. Runs sqlldr to load data to custom tables.
3. Calls a sqlplus program to do manipulate the data. This program is a proc in a package.
In step 3 of above, the package procedue does a "submit_request" to call the "Supplier Open Interface Import". This
request actually fires. However my problem is the subsequent call to fnd_file.put_line(fnd_file.log, 'Test message'), does not get logged
to the log file of the HOST program, nor to the log file of the "Supplier Open Interfface Import" log file. A check
of $APPLPTMP (or /usr/tmp) shows that a file of say " l0023761.tmp" contains my 'Test message' text.
I believe the problem is that the put_line() call has no association with the HOST or the "Supplier Open Interface Import. How
do I associate the logging to either program? Is it even possible? I want the logging, so as to see the progress
of the HOST program.
The sniippet of proc code is:
PROCEDURE abc() IS
BEGIN
request_id:= FND_REQUEST.SUBMIT_REQUEST
(Application => 'SQLAP'
,Program => 'APXSUIMP'
,Description => NULL
,Start_time => SYSDATE
,Sub_Request => FALSE
,Argument1 => 'ALL'
,Argument2 => 1000
,Argument3 => 'N'
,Argument4 => 'N'
,Argument5 => 'N'
fnd_file.put_line (fnd_file.log,'Test message');
COMMIT;
END abc;
Alex.

Shell scripts are very hard to develop and maintain. Many things that developers previously had to do in shell scripts, developers can now do in PL/SQL. Hence, I recommend that you avoid shell scripts as much as possible.
As well, SQL*Loader is an old, inflexible tool. Instead, define your OS file as an external table, and then extract from the external table using a normal select statement. http://www.orafaq.com/node/848 I recommend that you avoid SQL*Loader and use external tables instead.
Using PL/SQL and external tables - and avoiding the shell script and SQL*Loader - a much better way to accomplish the same thing all inside one packaged procedure that is registered as a concurrent program:
- initialize
- select from the external table
- manipulate the data

Similar Messages

  • Calling stored proc from java using ref cursor

    Hi All,
    We have a requirement to display all the records from a table on a JAVA screen. Due to some constraints, we have to write the query in the stored proc. We are trying to return a result set from the stored proc to the java code by using a ref cursor. Please refer to the code below.
    Following is the PL/SQL proc �
    procedure sp_user_course2(v1 OUT ref_cursor, persid in varchar2) as
    begin
    open v1 for
    SELECT lrn_exp_id, crs_name FROM emp_crs
    WHERE personid = persid;
    end;
    Here ref_cursor is of TYPE REF CURSOR declared in the package specification.
    The java code is �
    Callable stmt = conn.prepareCall("call sp_user_course2(?,?)");
    stmt.registerOutParameter(1,OracleTypes.CURSOR);
    stmt.setString(2,emplId);
    stmt.execute();
    OracleCallableStatement tstmt = (OracleCallableStatement) stmt;
    ResultSet rs = tstmt.getCursor (1);
    When I run the program, I get the following error (at stmt.execute()):
    [Oracle][ODBC][Ora]ORA-06553: PLS-306: wrong number or types of arguments in call to 'SP_USER_COURSE2' 6553
    Can anyone tell me what could be the problem with this code? I have read somewhere that REF CURSOR feature is available from Oracle 9i onwards. If so, then, is there any workaround for mapping REF CURSOR to Resultsets in Oracle 8i?

    These may help
    http://www.google.co.uk/search?q=jdbc+OracleTypes.CURSOR+tutorial

  • Printing messages in Log File and Output File using Dbms_output.put_line

    Hi,
    I have a requirement of printing messages in log file and output file using dbms_output.put_line instead of fnd_file.put_line API.
    Please let me know how can I achieve this.
    I tried using a function to print messages and calling that function in my main package where ever there is fnd_file.put_line. But this approach is not required by the business.
    So let me know how I can achieve this functionality.
    Regards
    Sandy

    What is the requirement that doesn't allow you using fnd_file.put_line?
    Please see the following links.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Dbms_output.put_line+AND+Log+AND+messages&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=%22dbms_output.put_line+%22+AND+concurrent&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Fnd_file.put_line(FND_FILE.OUTPUT in Ora Apps in SQL*Plus program

    I have used fnd_file.put_line(FND_FILE.OUTPUT and fnd_file.put_line(FND_FILE.LOG many times for programs registered as PL/SQL Stored Procedure or used in DB Packages to write to the concurrent manager output and log files. No problem doing that. I have a simple program that I was going to register in Oracle Apps as a SQL*Plus script (instead of creating a DB procedure) that contains a PL/SQL block and will use fnd_file.put_line to write the output so it can be seen from the Concurrent Mgr View Requests. When the script runs the fnd_file.put_line(FND_FILE.OUTPUT... doesn't write to the output (or log) file. I am guessing fnd_file.put_line(FND_FILE.OUTPUT is not available to programs registered as SQL*PLUS.
    Is that correct? Am I missing something simple that would allow it to run without creating a DB procedure/package.
    I am testing this with a very simple script just to see if I can get something written to the output and log files.
    SET SERVEROUTPUT ON
    declare
    x varchar2(20);
    Begin
    select 'test'
    into x
    from dual;
    fnd_file.put_line(FND_FILE.LOG,'In the log file');
    fnd_file.put_line(FND_FILE.OUTPUT,'In the output file');
    end;
    Thanks for taking the time to read this and any offers to help

    I think you should post it in the relevant Oracle Apps forum and not here. It seems that - you may have some problem regarding any privileges or missing some property which needs to be configure.
    Regards.
    Satyaki De.

  • Getting the name of the program or the FM called from security audit log

    Dears,
    Is there a way to get the name of the ABAP program called through transaction SE38, or the FM called through transaction SE37, from the security audit log ?
    What is available is only : RSABAPPROGRAM for transaction SE38, and RSFUNCTIONBUILDER for transaction SE37
    Thanks.
    Reda

    I had always assumed this log to be in the SUBMIT statement, but never used it.
    If I remember correctly this is recorded it the runtime submit, so it should be there.
    Perhaps it is only in selected reports? I will check in my system.
    Please compare with sm20n and run the report from sa38. The submits are different in sa38 etc compared to se38.
    The FM will only be recorded it it has a destination extention in the source system which is mostly remote. Local fm calls are not recorded for sure.
    Cheers,
    Julius
    Edited by: Julius Bussche on Jul 26, 2011 11:32 PM

  • Host Programs

    Hi,
    My client moves Oracle APPS from UNIX to NT.
    There was some host programs (shell scripts) that is registered as concurrent programs and called by submitting a request through SRS.
    Now how to go about the same program in NT?
    Should I have to re-write them as a .bat file? and register them with APPS
    Or is there any workaround?
    Thanks in advance
    Regards
    Murugavel

    You can make use tools which will help you run unix shell scripts under WindowsNT. This can avoid re-writing.
    Couple of tools available are MKS Tool Kit and Cygwin.
    -Jey

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Order Import Program Call Oe_Order_Pub.Process_Order to create Orders

    Hi All,
    I am new to OM.
    Can you please clarify me on the below point
    ===============================
    Does Order Import Program(concurrent Program ) Call Oe_Order_Pub.Process_Order to create Orders???
    Thanks,

    Don't have an instance infront of me but you need to loo at the executabe definition for this concurrent program to guarantee this.
    cheers
    James

  • I have been trying to log onto the Wounded Warriors Program Portal.  I can Log in and then when I click on the rewards it tried to go to the page the just takes me back to the same page I was on.  This is very frustrating.

    I have been trying to log onto the Wounded Warriors Program Portal.  I can Log in and then when I click on the rewards it tried to go to the page the just takes me back to the same page I was on.  This is very frustrating.  I am new to the Mac World so please bare with me.  Please tell me there is help somewhere for this issue.  It seems it is blocked or not letting me through.  Can anyone please help me out.  Thanks 

    Both Mail and Safari have Activity Options that open a  screen that shows you just how the site or mail is loading.
    In Safari if you are having trouble with a site in activity you will see the count of items being downloaded - and if an error occurs it shows red.
    On the top is the number of items it is loading or trying to load and the count should be increasing.   If the count stops, and you don't have errors it may be that too many people are going after the same site and your request just timed out. Have had the time out on a news site when trying to load a most popular article.

  • My local library uses a program called Overdrive Media Console to check out audiobooks.  MP3 type books go to music on my iPod Nano, but I am unable to delete them because I tunes doesn't display them as content. What should I do? I need the space.

    According to my library, I can download MP3 audio books to my Ipod Nano.  The material is "checked out" to a program called Over Drive Media Console. and from there, it is transferred to my IPod.  the audio doesnt go to Audi Books, it goes to Music.  I want to delete some of the books I have listened to, but when I plug in the Ipod and open ITunes, the titles are not there.  The manual says to connect to itunes, and delete a "song or other material" but since I  did not use ITunes to get the
    "song" to begin with, it isnt recognized.  How can I get these audioboks off my IPOD?  I am running out of space.  I tried connecting to Overdrive, but the software doesnt recognize the internal content.  It only sets it up for transfer.

    The audio books do not display under the music sub-menu
    And they shouldn't.  They should be under the Books submenu that is further down the list from the Music submenu you are referring to.
    B-rock

  • In my dock there was this weird program called "tutorial". While throwing away this program I had to fill in my password. Afterwards I tried to change my password, but my old password doesn't work anymore. Who can help?

    In my dock there was this weird program called "tutorial". While throwing away this program I had to fill in my password. Afterwards I tried to change my password, but my old password doesn't work anymore. Who can help?

    What was this program for, or did you just assume it's something you shouldn't have and therefore arbitrarily decide to "throw it away"? Exactly how did you supposedly throw it away?
    If you didn't change your administrator password, there's no reason it shouldn't work now, so that suggests you did something else, or changed it and then forgot what it was.
    You can't recover that password; you can only change it. To do that, you would need to boot from your Snow Leopard DVD, choose your language, then choose Reset Password from the Utilities menu in the top menu bar.

  • Hp pevilion :catylist host program is not working

    hi i am using a hp peavilion 15 e015tx with windows 8
    recently the radeon host program has stopped working....
    i have tried re installing the driver using hp recovory manager but it is of no use ...please help me

    Hello susaanth,
    Welcome to the HP Forums.
    I see that recently the radeon host program has stopped working correctly on your Notebook for the graphics. I will try to help you with this.
    As trying to recover the drivers with the recovery manager seems to have fail (if you could provide details on this it may help), also I would like you to try updating the drivers. Here is a link to the update: AMD High-Definition (HD) Graphics Driver.
    Please let me know if this was able to help you. Thank you for posting on the HP Forums.
    I worked on behalf of HP.

  • Hi on my old windows pc I could use a program call RECUVVA to recover deleted picturs and files. Is there any similar program for my Imac

    On my old windows pc I used a program called recuvva to when things like picture were inadvertantly deleted. Is there a similar program that i can use on my Mavericks Mac.

    Data Rescue 3 http://www.prosofteng.com/products/data_rescue.php works well and has a free trial.

  • I'm using an older mac (2008 iMac).  Things were fetting slow and I used a program called DupZapper to get rid of a lot of duplicate files.  It worked and my computer is running better.  The only problem is now InDesign crashed at startup.  I have the ori

    I'm using an older mac (2008 iMac). Things were getting slow and I used a program called DupZapper to get rid of a lot of duplicate files. It worked and my computer is running better. The only problem is now InDesign crashes at startup. I have the original disks and serial number (CS3)  The error message is "required resources are missing".  Same message if I try to uninstall.  Any clues as to how to re-install?

    reset your preferences and retry launching id:  InDesign Help | Setting preferences
    if that fails, uninstall (properly with the uninstaller), clean and reinstall per Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • I contacted what I thought was Brother Support for my new printer, then I got skeptical.  He gained access through a program called TeamViewer, is my Mac safe?

    i contacted what I thought was Brother Support for my new printer, then I got skeptical.  He gained access through a program called TeamViewer, is my Mac safe?

    They're probably just interested in getting $ from you, there are several companies who advertise in a way that suggests 'official' support for all sorts of things. Unfortunately, if they had access as you describe, they potentially could have installed other software and/or read any of your files.
    Ideally - change all passwords for email/banking/login & restore a backup from before this happened.

Maybe you are looking for

  • 2 devices, "contacts" "my info" question

    I have an iPad and wife has iPhone. We are using one iCloud account to share contacts, calendar, reminders, etc... And then separate sub accounts on iCloud for email only. The problem is under Settings>Mail, Contacts, Calendars>Contacts>My Info>? I p

  • Aggregates in query being used or not.

    Hi Guys, I have a doubt. wondering if somebody can clarify it. When we run a query on cube with aggregates, how do we know whether the query is using the aggregates or not? Can we check in ST03? Thanks in advance.

  • Deployment error :: Oracle Identity Analytics 11.1.1.5 PS1 on Weblogic 11g

    Hello, I am trying to deploy Oracle Identity Analytics 11.1.1.5 on Weblogic 11g. Facing the following error and are not able to deploy successfully. java.lang.NoClassDefFoundError: Could not initialize class org.springframework.aop.aspectj.AspectJExp

  • Will SWFs embedded in PDFs play on iPhone\iPad?

    Hi I've been developing a portfolio PDF which uses some Flash features, but with the way things seem to be going for Flash esp. its omission from iOS, I wondered whether this was a good idea for maximum portability esp if potential employers are view

  • Selecting the treenode at client side

    Hi all, I am using JSF tree (Dynamic Tree) for my application. I have constructed a dynamic tree .Below which one button is there. Requirement is like this 1)i have to select a node and some check image will sit on the node. Every time i click the no