Output error in procedure

I have successfuly compiled the following procedure. When I execute in SQL Worksheet I get the following error. I have tried everything I could think of over the last hour or so to resolve. Anyhelp is greatly appreciated. Thanks in advance.
Procedure: letsGetPaid.sql
CREATE OR REPLACE PROCEDURE letsGetPaid
IS
probFile UTL_FILE.FILE_TYPE;
my_feed_line VARCHAR2(2000);
CURSOR C1
IS
SELECT PROB_CODE, PROB_DESC, TEXT FROM prob_code;
BEGIN
probFile := UTL_FILE.FOPEN('C:\getpaid\output','problem_code.txt','W');
-- Construct output lines
FOR probline in C1
LOOP
my_feed_line:= (probline.prob_code) | | ',' | | (probline.prob_desc) | | ',' | | (probline.text);
EXIT WHEN C1%NOTFOUND;
UTL_FILE.PUT_LINE( probFile, my_feed_line );
END LOOP;
UTL_FILE.FFLUSH(probFile);
UTL_FILE.FCLOSE(probFile);
END letsGetPaid;
The following error message is output:
BEGIN letsgetpaid; END;
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at "SYSTEM.LETSGETPAID", line 14
ORA-06512: at line 1
Again thanks in advance.
apesa01

Thanks, I will make that change. However the error below was generated because I had failed to make the required UTL_FILE entries in init.ora. Once I made those changes everything worked fine.
I appreciate your comments.
-apesa01

Similar Messages

  • Input/output errors on trying to format a new hard drive

    I just installed a Western Digital 160 GB hard drive to replace the original 80 GB drive in my 1.67 Hi-res G4 PB. I can boot from an external FW hard drive that has a copy of the original made with SuperDuper - seems to run fine.
    The new 160 GB drive shows up in System Profiler and in the Disk Utility list of drives on the left side of the window - which make me think that I did the hardware installation correctly as the drive can be seen by the system. Maybe this isn't so.
    When I use Disk Utility to try to format the new hard drive I get "input/output errors" and can not proceed with the formatting.
    The computer ran fine with the old 80 GB hard drive - no sign of any problems - I just need the space.
    Has anyone had experience with this or thoughts on how to get to a resolution?

    Hi, I installed a 160GB HD WDC (WD1600BEVE-00UYT0) for the previous one didn't work anymore.
    After a month it began to freeze and I had to reset the pb, After a few days (and a lot of resetting) I had to reset the PB and the PRAM. After some more days (and a lot of PB and PRAM resettings) I had to reset the PMU, the PRAM, and the PB. After some more days (and ALL the resettings) I had to open the pb, disconnect the HD, re-connect it, and it did work again fine.
    ALAS... in two weeks I was through the same procedure again.
    It's the second 160GB HD that works in the same identical way (I thought the first one was broken)
    I've just disconnected and re-connected the HD.
    Have you discovered a simpler way to make it work fine? (I'm a little distressed...)

  • Purchase order output error....

    Hi,
    Purchase order is created from a shopping cart.But PO output(via email) is not created.I am getting output error.Error log is showing message as "Incorrectly processed".
    Error message description is "SUM OF PERCENTAGE EXCEEDS..." and "TABLE TEM_DEL_TO does not fit into window".
    Please suggest.
    Thanks in advance.

    Po is not deleted.Goods receipt is also done against that PO.Account asignment details are not changed.
    For error "TEM_DEL_TO does not fit into window" below is further info attached in description.
    You tried to display table TEM_DEL_TO in a window. However, the table either is too wide for the window or a horizontal shift by the specified value is impossible because the table would then no longer fit into the window. The same error occurs if a template is too high for the current subwindow. This is usually noticed in the check when the form is activated, but in some cases (with device types such as ASCIIPRI) the table measurements have to be adapted and this does not occur until runtime. With device type ASCIIPRI, for example, only integral multiples of 1/6 inches (vertical) or 1/10 inches (horizontal) can be used for positioning. The height of a line within a template therefore changes, for example, from 3mm to 4.2mm, causing the total height of the template to increase and exceed the height of the window.
    System response
    The system issues an error message.
    Procedure
    Correct the positioning of table TEM_DEL_TO or make the window bigger.

  • Output error messages

    How does one do to output error messages without having to invoke RAISE_APPLICATION_ERROR? I'm trying to avoid chaining of exceptions handled by OTHERS.
    EDIT: I'm aware of DBMS_OUTPUT.PUT_LINE, though I am looking for a function that produces the same sort of output that RAISE_APPLICATION_ERROR does but without raising an exception.
    Message was edited by:
    0v3rloader

    There isn't a way. An exception is not just an output message it changes the execution path of the code.
    Stored procedures do not have very good IO capabilities as they are stored in the database and do not run directly from a terminal or screen.
    Catching unexpected exceptions using when others, even if followed by a raise, is very poor practice IMHO, whose only excuse is error logging but I think even that is better handled by the client.

  • ERROR IN PROCEDURE

    I'm trying to write a procedure that will compute the start and end dates of the weeks within a period, etc. Number of business days in a week is 5; that is, Monday to Friday.
    The first part of the code I have to write is giving me problems please help. The table below was created:
    Wrote file afiedt.buf
    1 CREATE TABLE WEEKS
    2 (WEEKID VARCHAR2(20),
    3 TRANSACTION_YEAR VARCHAR2(20),
    4 START_DATE DATE,
    5 END_DATE DATE,
    6 DAYS VARCHAR2(20),
    7* WEEK_NUMBER VARCHAR2(20))
    SQL> /
    Table created.
    SQL> --- Code To Generate start date, end date weekid, week number, etc in A financial Year
    SQL> Create OR REPLACE PROCEDURE Weeksinyear IS
    2 BEGIN
    3 declare
    4 sdate_v weeks.start_date%type;
    5 edate_v weeks.end_date%type;
    6 ndays_v weeks.days%type;
    7 nweek_v Weeks.week_number%type;
    8 weekid_v weeks.weeksid%type;
    9 transyear_v weeks.weeks.transaction_year%type;
    10 numbweeks_v number;
    11 fyearst_v date;
    12 fyeared_v date;
    13 totaldays_V number;
    14 i number;
    15 d number;
    16 begin
    17 fyearst_v := '05-jan-2004';
    18 fyeared_v := '26-jan-2004';
    19 sdate := fyearst_v;
    20 transyear_v := to_char('05-jan-2004','yyyy');
    21 nweek_v :=1;
    22 ndays_v := 5;
    23 totaldays_v := to_number(to_date(fyeared) - to_date(fyearst));
    24 nweekid_v :=1;
    25 i := 1;
    26 loop
    27 If to_char(fyearst_v,'DAY') ='MONDAY ' then
    28 loop
    29 i := i + 4;
    30 if i < totaldays_v then
    31 d := to_number(totaldays_v - i);
    32 edate_v := (sdate_v + (d - 1));
    33 elseif i = totaldays_v then
    34 edate_v := sdate_v + 4;
    35 elseif i < totaldays then
    36 edate := (sdate + 4);
    37 endif;
    38 weekid_v := (i||'000'||'i');
    39 insert into weeks(weekid, transaction_year, start_date, end_date, days, week_number)
    40 values(weekid_v,transyear, sdate_v, ndays, nweek_v);
    41 if totaldays_V > 7 then
    42 weekid_v := weekid + 1;
    43 sdate_v := sdate_v + 7;
    44 transyear_V := transyear_v;
    45 nweek_v := nweek_v + 1;
    46 ndays_v := ndays_v;
    47 totaldays_v := to_number(totaldays_v - 7);
    48 else exit;
    49 end loop;
    50 else exit;
    51 end loop;
    52 end;
    53 END;
    54 /
    Warning: Procedure created with compilation errors.
    SQL> sho err;
    Errors for PROCEDURE WEEKSINYEAR:
    LINE/COL ERROR
    33/35 PLS-00103: Encountered the symbol "I" when expecting one of the
    following:
    := . ( @ % ;
    35/35 PLS-00103: Encountered the symbol "I" when expecting one of the
    following:
    := . ( @ % ;
    49/23 PLS-00103: Encountered the symbol "LOOP" when expecting one of
    the following:
    if
    LINE/COL ERROR
    51/17 PLS-00103: Encountered the symbol "LOOP" when expecting one of
    the following:
    if
    SQL>

    So many things, I don't really know where to start.
    At line 32
    IF TO_CHAR(fyearst,'DAY') ='MONDAY ' then
    Will never be true it needs to be either
    IF TO_CHAR(fyearst,'DAY') ='MONDAY ' THEN -- A total of 9 characters (padded to the length of WEDNESDAY) or
    IF TRIM(TO_CHAR(fyearst,'DAY')) ='MONDAY' THEN
    Fixing this leads to a second problem in the inner loop. At line 35
    IF i < totaldays THEN
    is logically incorrect. The variable i will take the values 5, 9, 13, 17 and enter the if condition, but will not be equal to totaldays at line 38. On the fifth iteration i = 21 so the conditional at line 35 fails and you have an infinite loop, so the test needs to be:
    IF i <= totaldays THEN
    to even get into any of your processing. Now, on the fifth pass, the conditional on line 38 (IF i = totaldays THEN ) will be true, so edate gets set, but the condition on line 40 (IF i > totaldays THEN) can never be true, so we're back to an infinite loop.
    So change line 40 to
    IF i >= totaldays THEN
    Now, the insert gets done, and the test at line 45 (IF totaldays > 7 THEN) passes and totaldays gets reset, and we go back to the top of the inner loop. Now, i = 21 and totaldays = 14, so the condition at line 35 fails, and again, we're in an infinite loop, so lets reset i as well as totaldays.
    Now i still goes 5, 9, 13, 17, 21 but totaldays = 14, so the test at line 38 is never true, and once more, an infinite loop.
    At this point I gave up and put an explicit exit after the insert statement, just to see what should be inserted, and got another infinite loop in the outer loop because there is no terminating condition on the loop since fyearst never gets changed. Having seen some output, I think what you are looking for is something more like:
    INSERT INTO weeks
    SELECT rownum, TO_CHAR(TO_DATE('05-jan-2004','dd-mon-yyyy'),'YYYY'),
           NEXT_DAY(TO_DATE('05-jan-2004','dd-mon-yyyy') - 7,'MONDAY') + ((rownum - 1) * 7),
           NEXT_DAY(TO_DATE('05-jan-2004','dd-mon-yyyy') + 1,'FRIDAY') + ((rownum - 1) * 7),
           '5', TO_CHAR(rownum)
    FROM all_objects
    WHERE rownum <= 52or, if you really want a procedure:
    CREATE OR REPLACE PROCEDURE weeksinyear (p_start IN DATE, p_end IN DATE) AS
       num_weeks NUMBER;
    BEGIN
       num_weeks := (NEXT_DAY(p_end,'MONDAY') - NEXT_DAY(p_start - 7,'MONDAY')) /7;
       INSERT INTO weeks
       SELECT rownum, TO_CHAR(p_start,'YYYY'),
              NEXT_DAY(p_start - 7,'MONDAY') + ((rownum - 1) * 7),
              NEXT_DAY(p_start + 1,'FRIDAY') + ((rownum - 1) * 7),
              '5', TO_CHAR(rownum)
       FROM all_objects
       WHERE rownum <= num_weeks;
       COMMIT;
    END;If you will always want to do this for an entire year, then the procedure could be simplified to:
    CREATE OR REPLACE PROCEDURE weeksinyear (p_start IN DATE) AS
    BEGIN
       INSERT INTO weeks
       SELECT rownum, TO_CHAR(p_start,'YYYY'),
              NEXT_DAY(p_start - 7,'MONDAY') + ((rownum - 1) * 7),
              NEXT_DAY(p_start + 1,'FRIDAY') + ((rownum - 1) * 7),
              '5', TO_CHAR(rownum)
       FROM all_objects
       WHERE rownum <= 52;
       COMMIT;
    END;TTFN
    John

  • Report output error

    hi all,
    i am using 3.0b.when i am running query its giving output error.
    system error: Program : SAPLRRK0 and Form SETXX_FUELLEN_0-02-
    i refered sap note no 728683.there solution i got it
    now i want to know why that error is raising.
    can any knows kindly let me know
    thanks&regards,
    vastav.

    Hi,
    That is program error.
    solution.
    For the  Domain 'RRSPL' please change the field 'No. characters' from 4 to 8.
    Procedure for doing this:
    1. Tx: se11
    2. Data type : RRK_SX_SPAGGR
    3. double click on component type: RRSPL (2nd line)
    4. double click on the domain 'RRSPL'
    5. change the field ''No. characters' from 4 to 8.
    6. Activate.
    Best Regards,
    SG

  • Input output error samsung ssd mac 09

    I bought a Samsung SSD 840 EVO drive because my drive from my macbook had a destroyed file and broken.
    Yesterday I tried to partition the drive into 1 with GUID but the error came up with :
    POSIX reports: The operation couldn’t be completed. Cannot allocate memory
    I used a USB stick with an installation on it
    Today I tried with a CD with mac os x the same procedure but this time with a different error:
                    Input output error
    With both examples I also tried to erase the drive but with the same error 1 and 2.
    I am not sure what to do next. Hope someone has a solution.
    Michael

    Either the drive, the SATA cable, or the logic board is faulty. Make sure the cable is not damaged and is securely inserted.

  • External Hard Drive Input/Output error

    I recently started having problems with an external hard drive setup that I did not have problems with prior to upgrading to 10.5.5 and trying to setup the drive to be compatible with Time Machine.
    The hard drive enclosure that I have has 2 bays for two SATA drives. I have used this enclosure without any problems until I tried to get 1 drive to act as the backup drive for Time Machine and the other to be storage. I formatted them using Drive Genius. I used the option for GUILD or GUIL which it said was the better format for using with Time Machine.
    The first problem I ran into since upgrading and reformatting the drives is I got an "input/output" error the first couple times I connected the drive via USB to my Mac. I could still use the drives but I got weird errors every once in a while like "input/output error" or "device was not ejected properly" even though the device had not been unplugged.
    Now the drives will not mount using OS 10.5.5. The drives show up when I open Disk Utility, but I cannot get them to mount. I have ran Disk Utility First Aid, and it says the drives are fine. There is one error that shows up when I run the "Repair Disk" feature. It reads "Invalid content in Journal". But Disk Utility also says "The volume was repaired successfully".
    I have seen some posts when I do a search in google about this issue and it seems this is a known issue. Every suggestion I see says to insert your Tiger DVD and reformat the drive using that and the problem will be solved. The only problem with that is I have a lot of important files on the drive that I cannot lose. I had the files backed up until I moved them to the new drive a while back. Now I do not have a backup because I was in the process of switching to bigger drives and erased the old drives after doing so because everything was working fine.
    I am hoping someone out there may have some suggestions (other than erasing the drive) to get my dives to mount so I can transfer the data off to another drive and reformat after.
    Thanks,
    Paul Rugg

    Thanks for the suggestion.
    Do you think that would work better than Drive Genius? I bought Drive Genius 2 and it does not even see the drives when they are plugged in unlike Disc Utility which can see the drives but cannot mount either one.
    Maybe this following post I made to a different questions may help. The data on the drive is other buying another program for if it will work. I think my next step may be to go over to a friends place and try to mount the drives on his computer and transfer stuff off if they connect.
    text below posted to other question relating to external hard drive problem.
    I have recently had the same mounting issue with my new external hard drive. I just purchased a new 750Gb Western Digital Sata drive and got everything transfered over to it. Immediately, I got an error saying that the drive had been ejected incorrectly even though it was still plugged in. I was a little curious. I restarted the computer (hard drive still plugged in via USB 2.0) and the drive showed up just fine. I plugged another 250Gb drive into the same case (2 bays) and the 250GB drive showed up just fine.
    Well, I then noticed there was an OS upgrade available when I ran Software update so i ran it and when I rebooted the drives were gone. I can see the drives in Disc Utility, but they will not mount. Drive Genius cannot see either disc. Disc Utility says I need to repair the drives, but when I do it says they are fixed but they don not mount.
    The problem really seems to be related to mounting USB external drives. I got ahold of 2 seperate external firewire hard drives and one shows up just fine while the other has the same problem (both work on other systems. I would try wiping the drives and reformatting but ALL MY stuff is on them and not everything has been backed up. Yuck! I have not tried connecting my hard drive to another Mac yet.
    The drives being used are #1 Maxtor Maxline Plus II 250GB SATA/150 HDD 1.5b/s 7Y250m00654ra
    and #2 Western Digital WD7500AACS WD Caviar GP Green Power drive.
    I have another post similar to this and I have not received any feedback, but I have been doing my own searching and have found similar posts on the net.
    Anybody have any clue what might be going on here? It really seems to be related to my upgrade.

  • I am in mavericks disk utility recovery mode as my mac book will not boot up & stays only on the grey apple screen. When I verify the disk I get open error5 :input /output error on Syst stuck on 1 minute pouring out over 50 error messages & still counting

    I am in Mavericks disk utility recovery mode as my mac book pro will not boot up &amp; stays on the Apple grey screen . When I verify disk permissions I get
    Open error 5:"input/ output error" on syst with over 50 of this messages &amp; still counting . Disk Utility says 1 minute
    But this has been going on for over 10 mins .
    I can not verify disk or repair disk .
    I have tried to reinstall mavericks operating system but it says my hard drive is locked which is very strange .
    Does anyone know what is going on here ?
    My system looks like it has been totally corrupted . Thanks Andrew

    Could be. The "lock" isn't actually looking for a password.
    WARNING: This will completely erase the ENTIRE hard drive.
    What you would need to do is boot to recovery > disk utility > select the MAIN drive on the left side > partition > change partition layout from CURRENT to 1 PARTITION > ensure on the right side it says Format : Mac OSX Extended (Journaled) then push APPLY.
    Then if it will allow us, close the windows until you see the 4 options popup again and select "Reinstall Mac OS X" select the Mac HD and you should be good to go!

  • How to get the output of a procedure in to a log file ?

    Hi, Everyone,
    Could you please tell me
    How do i write the output of a procedure to a log file ?
    Thanks in advance...

    Hi,
    could you please explain me more on how to use the UTL_file to get the output to a log file as in am new to PL/SQL
    my script file is
    EXEC pac_sav_cat_rfv.pro_cardbase (200910,'aaa',100,'test_tbl');
    i need the output of this statement in a log file.
    Could you please explain to me how it can be done.
    thanks in advance

  • Error while executing SSIS package - Error: 4014, Severity:20, State: 11. A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)

    Hi,
    We are getting the following error when running our SSIS packages on Microsoft SQL Server 2012 R2 on Windows Server 2008 R2 SP1:
    Error: 4014, Severity:20, State: 11.   A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)
    SQL Server Data Tools and SQL Server Database Engine reside on the same server.
    We tried the following:
    Disabling TCP Chimney Offload
    Installed Windows Server 2008 SP1
    Splitting our SSIS code into multiple steps so it is not all one large continuous operation
    The error occurs during a BulkDataLoad task.
    Other options we are investigating with the engineering team (out-sourced, so delayed responses):
    Firewall configurations (everything is local, so this should not make a difference)
    Disabling the anti-virus scanner
    Are there other things we can try?
    Any insight is greatly appreciated.
    Thanks!

    Hi HenryKwan,
    Based on the current information, the issue can be caused by many reasons. Please refer to the following tips:
    Install the latest hotfix based on your SQL Server version. Ps: there is no SQL Server 2012 R2 version.
    Change the MaxConcurrentExecutables property from -1 to another one based on the MAXDOP. For example, 8.
    Set "RetainSameConnection" Property to FALSE on the all the connection managers.
    Reference:
    https://connect.microsoft.com/SQLServer/feedback/details/774370/ssis-packages-abort-with-unexpected-termination-message
    If the issue is still existed, as Jakub suggested, please provide us more information about this issue.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • While opening the iTune Store i receive the following error, "The procedure entry point ADAdPolicyEngine_DidEnterSation could not be located in the dynamic link library iAdCore.dll" Please help me to clear this error.

    While opening the iTune Store i receive the following error, "The procedure entry point ADAdPolicyEngine_DidEnterSation could not be located in the dynamic link library iAdCore.dll" Please help me to clear this error.

    I faced the same issue. This solved it for me: Troubleshooting issues with iTunes for Windows updates
    Hope this helps.

  • Disc image input/output error

    When burning a disc image using disc utility, I get the ever so popular input/output error message. I cannot find anywhere on these posts a solution to this problem. It is not dirty discs, etc. It happens when I try to copy dvd's... which are not licensed, etc.

    Could be so many things, Input/Output errors are generally loosing contact with a device for a variety of reasons, do you get any error # with that?
    Open Console in Utilities & watch for more info whn you try to burn, or open the Disk Utility Log if there.

  • "input/output error' when making disc image from DVD

    I've had problems installing Logic, and a Pro Apps Genius at Applecare suggested I try making an image of the problematic DVD (Audio Content 1) and then trying an install that way.
    While I can make an image of the Install disc to my desktop fine, the Audio Content 1 disc reports an "input/output error".
    This means I'm unable to copy the disc and then successfully install my Logic Studio.
    Any ideas?

    Thanks for your answer.
    Yes, I thought that might be the case - but I'd taken my Mac and Logic disks to a Genius bar, and the 'Genius' had said he'd fixed the issue. I just wish he'd explained what he did and why he didn't replace the faulty disk(s)!
    But is there any way around having the claim a disk, now I'm living abroad and my 'warrantee' has run out? It's going to be a pain in the fundament trying to claim a replacement set.

  • Input/output error when copying a DVD

    I created A DVD some time ago using Roxio.  It plays in DVD Player on my Mac Pro, but I can't create a .dmg using Disk Utility.  I always get "Input/Output error".  I got the same result on my wife's newer Apple. I tried to Restore it but can't, and Verification shows no problems that I can see.  I am able to copy DVDs created on Final Cut Express just fine.  Any suggestions to help me create copies of an old DVD I love?

    I just figured out how to get around the problem.  Download Burn and use it to burn the VIDEO_TS file to a new disk.  It must be something that Apple adds to make it hard to copy DVDs made from non-Apple software.

Maybe you are looking for