Can't see the issue in code...please help

I have this procedure within a package. Trying to compile and can't...get errors and I can't see why...any help???
PROCEDURE KILL_ORPH_2PHASE_COMMITS (inLocal_tran_id IN varchar2) is
  tsql            VARCHAR2(256);
  v_local_tran_id varchar2(22 byte);
BEGIN
IF inLocal_tran_id is not null then
    tsql := 'ROLLBACK FORCE ''' || inLocal_tran_id || '''';
    dbms_output.put_line(tsql);
    EXECUTE IMMEDIATE tsql;
    RETURN;
END IF;
    --open cursor
    open cur_2pc;
    loop
      --fetch cursor data
      fetch cur_2pc
        into v_local_tran_id;
      exit when cur_2pc%NOTFOUND;
      tsql := 'ROLLBACK FORCE ''' || v_local_tran_id || '''';
      dbms_output.put_line(tsql);
      EXECUTE IMMEDIATE tsql;
EXCEPTION
  WHEN OTHERS
    THEN
      dbms_transaction.purge_lost_db_entry('''' || v_local_tran_id || '''');
END;
END LOOP;
CLOSE cur_2pc;
END KILL_ORPH_2PHASE_COMMITS;Error is:
Compilation errors for PACKAGE BODY ADMIN.ADMIN_DBA_MAIN
Error: PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
( begin case declare end exit for goto if loop mod null
pragma raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
Line: 40
Text: EXCEPTION
Error: PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:
Line: 45
Text: END LOOP;

The BEGIN and END are not matching..??
From your code, it looks like...you want each statement in your loop to have it's own begin..exception..end..
BEGIN
IF inLocal_tran_id is not null then
    tsql := 'ROLLBACK FORCE ''' || inLocal_tran_id || '''';
    dbms_output.put_line(tsql);
    EXECUTE IMMEDIATE tsql;
    RETURN;
END IF;
    --open cursor
    open cur_2pc;
    loop
   BEGIN----------<<<<<<<<Begin for each iteration to have it's own loop...
   ------------>>>(this is for each statement in the loop...)
     --fetch cursor data
      fetch cur_2pc
        into v_local_tran_id;
      exit when cur_2pc%NOTFOUND;
      tsql := 'ROLLBACK FORCE ''' || v_local_tran_id || '''';
      dbms_output.put_line(tsql);
      EXECUTE IMMEDIATE tsql;
EXCEPTION
  WHEN OTHERS
    THEN
      dbms_transaction.purge_lost_db_entry('''' || v_local_tran_id || '''');
END;
END LOOP;
END KILL_ORPH_2PHASE_COMMITS; ----<<<Another End for the procedure....>>>

Similar Messages

  • I sign up for TAPJOY.While signing in,they install something in my PROFILE CONFIGURATION...When I check my Settings-General,I can't see the PROFILE OPTION! Please help me :) Im running ios 6.0.1

    I sign up for TAPJOY.While signing in,they install something in my PROFILE CONFIGURATION...When I check my Settings-General,I can't see the PROFILE OPTION! Please help me Im running ios 6.0.1

    Well, after another call with Apple support and the engineers, no success.  After spending over 20 hours trying to debug this, I give up.  Apple was basically fishing for a solution with trial-and-error settings on the iphone.  Then they wanted me to plug in software to log my iphone connections to the router, etc, etc., etc., at which point I decided I no longer wanted to participate in their testing process and will simply return the router.
    25 hours of my life I'll never get back.
    Big bummer, and frustrating for all the obvious reasons.

  • I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    Cannot see what files ? Music (synced music should appear in the iPod app), films/TV shows (Videos app), documents ... ?

  • I can not longer send email from my .me email. in outlook 2010 on my PC. I can still recieve emails fine. I have not changed my settings at all. I have however tried all the settings i can find on the support pages. PLEASE HELP

    I can still receive icloud ( ME email address) emails fine. I have not changed my settings at all. I have however tried all the settings I can find on the support pages. PLEASE HELP. Nothing has changed. This suddenly just started happening around a month ago. To frustrate me apple does not seem to have a support email or any method to contact them with this issue to do with their email product. I have spent ages going through the apple support sites and I keep getting asked for an apple product to mark it against. I have no apple product as I am using a PC but I am accessing and using their email product. Is there even a phone number I can call? Surely there is a support area for their Email server issues. Can anyone help? It is driving me mad and causing me major issues. My outlook is Outlook 2010 on a windows 8 PC. As I have said it worked fine then one day decided to stop sending emails.
    Thanks for your help.

    Hi - this problem is discussed here:
    https://discussions.apple.com/thread/5375046?start=0&tstart=0

  • On my iPhone 4, I cannot get the "not enough storage on iCloud" message to close. Therefore, I can't get past this box/screen AND I can't turn the device off. Please help.

    On my iPhone 4, I cannot get the "not enough storage on iCloud" message to close. Therefore, I can't get past this box/screen AND I can't turn the device off. Please help.

    Try resetting it by holding the power and home buttons at the same time until you see the Apple logo, then releasing.  You won't lose any data by doing this.

  • I down loaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you

    I downloaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you.

    Hi- apparently I also had a similar moment of madness and thought that 'freeride games' would be fun. Well, so much for that! It added a ton of things to my tool bar, I would like to uninstall it, any suggestions for this one?
    thanks :)

  • If my mom wants my Apple ID(I have no idea why), if she logs in on either her iPhone or our Mac can she see my IMessages ?? Please help ASAP!!!

    If my mom wants my Apple ID(I have no idea why), if she logs in on either her iPhone or our Mac can she see my IMessages ?? Please help ASAP!!!

    Yes, if she has your Apple ID & Password, she can see any messages that are sent to you as iMessages using another iOS device.

  • TS1369 itunes no longer sees my devices. But I can still see them in windows. Please help

    itunes no longer sees my devices. But I can still see them in windows. Please help

    Try
    iOS: Device not recognized in iTunes for Windows
    I would start with               
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or               
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    New cable and different USB port?
    Runs this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Try on another computer to help determine if computer or iPod problem

  • After install update 10.1.1 in FCPX, I can NOT open the software... please help!!

    Just that!  Today I install it via App Store Updating.. 
    I have a Macbook Pro Retina Display with Maverick 10.9.1
    FCPX 10.1 works fine, but now with the updating does not open...  other softwares such as Motion and Compressor works fine.
    Please HELP!

    GeeYouEss wrote:
    Mine is hitching on "restoring the window layout" and not moving beyond that. This is bad. Very bad.
    Usually that can be fixed by deleting the Layouts folder.
    Option-click on the Go menu in the Finder to access the Library folder inside your home folder. Navigate to Application Support/Final Cut Pro, and delete the Layouts folder.
    Also, trash your preferences, just in case.

  • Oops. I just pressed something and can't see my pen points anymore. please help!!!!

    A lot of times when I work in illustor I press some key command and my pen points become invisible, I can't see them along the line. If I randomly select the line, a point will show that I selected. but not others. It is crucial for me to figure this out now, because I have an extremely tight deadline for this project.
    Thank you!

    it's more like I can't select my drawing.......

  • I downloaded a video from a piano site I can not find the downloaded file/ video please help me

    I Downloaded a video from a piano site can not locate where the video is please help me

    You will need to download a third party app in order to play Movies that are not from the iTunes Store or synced from your computer. I know absolutely nothing about any of these, so you will have to do your own research.
    http://appadvice.com/appguides/show/alternative-video-players

  • HT2534 I am using iPod Touch (4th Generation). I tried the above mentioned step 5-7 times, but I am not able to see the "none" option. Please help me out.

    Hi,
    I did all the steps, that were mentioned above, but still I am not getting free option.
    Please help me out.
    Thanks

    Did you create a new account using an email address not used with Apple before?
    Maybe your county does not allow a None.
    I am in the US and created a None account using those instructions.

  • I can't get the applet to run please help me

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
         public class raceButton extends JApplet
         private int APPLLET_WIDTH=500,APPLLET_HEIGHT=35;
         private JButton Orc,Elf,Dwarf,Human;
         static String Race;
         public void init()
         setSize(APPLLET_WIDTH,APPLLET_HEIGHT);
         Orc= new JButton("Orc");
         Elf= new JButton("Elf");
         Dwarf= new JButton("Dwarf");
         Human= new JButton("Human");
         Orc.addActionListener(new ButtonListenerO());
         Elf.addActionListener(new ButtonListenerE());
         Dwarf.addActionListener(new ButtonListenerD());
         Human.addActionListener(new ButtonListenerH());
         Container cp = getContentPane();
         cp.setBackground(Color.red);
         cp.setLayout(new FlowLayout());
         cp.add(Orc);
         cp.add(Elf);
         cp.add(Dwarf);
         cp.add(Human);
         private class ButtonListenerO implements ActionListener
         public void actionPerformed(ActionEvent eventO)
              Race="orc";
              private class ButtonListenerE implements ActionListener
              public void actionPerformed(ActionEvent eventE)
              Race="elf";
              private class ButtonListenerD implements ActionListener
              public void actionPerformed(ActionEvent eventD)
              Race="dwarf";
              private class ButtonListenerH implements ActionListener
              public void actionPerformed(ActionEvent eventH)
              Race="human";
         static String getRace()
              return Race;
    this is what i do to activate it
         raceButton player= new raceButton();
         player.init();
         myRace=raceButton.getRace();(my race has already been initiated)
    it skips drawing the buttons and the action events

    this my full code
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class FirstDraft {
    public static void main(String[] args) {
    String orc="orc";
    String elf="elf";
    String dwarf="dwarf";
    String human="human";
    int again;
    Character player1= new Character();
    player1.begin();
    again=JOptionPane.showConfirmDialog(null,player1.getName()+ " are you sure you picked wisely?");
    while(again== JOptionPane.NO_OPTION)
         player1.setRace();
         again=JOptionPane.showConfirmDialog(null,player1.getName()+ " are you sure you picked wisely?");
    import chn.util.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Character
         private String myName;
         private String myRace;
         private String orc="orc";
         private String elf="elf";
         private String dwarf="dwarf";
         private String human="human";
         ConsoleIO keyboard=new ConsoleIO();
         void begin()// the first thing that happens.
         JOptionPane.showMessageDialog(null,"This is a public service announcement\n"
         +" My game makes fun of certain pictures and uses pictures with blood and death in them"
         +" if anything offends you I appologise, also all images are taken from google");
         setName();//goes into seting the name
         void setName()
         myName=JOptionPane.showInputDialog("What is your first name mortal?");//set's the name
         if (myName==null)
         setName();
         else
         intro();//goes into Intro     
         void intro()
         JOptionPane.showMessageDialog(null,"well \"" +getName()+ "\" if that is your real name"
    +"\nYou are going to face your friend to the death\n"+
         "the winner will live and I get the losers soul HAHAHAHAHA");
         setRace();// goes into setting the Race
         void setRace()
              JOptionPane.showMessageDialog(null,"Races available are :\n"+
              "the mighty orc\n"+
              "the mystical elf\n"+
              "the endurable dwarf\n"+
              "or the puny human you are.");
    raceButton player= new raceButton();
         player.init();
         myRace=raceButton.getRace();
         String getRace()//returns the Race
              return myRace;
         String getName()//returns the Name
              return myName;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
         public class raceButton extends JApplet
         private int APPLLET_WIDTH=500,APPLLET_HEIGHT=35;
         private JButton Orc,Elf,Dwarf,Human;
         static String Race;
         public void init()
         Orc= new JButton("Orc");
         Elf= new JButton("Elf");
         Dwarf= new JButton("Dwarf");
         Human= new JButton("Human");
         Orc.addActionListener(new ButtonListenerO());
         Elf.addActionListener(new ButtonListenerE());
         Dwarf.addActionListener(new ButtonListenerD());
         Human.addActionListener(new ButtonListenerH());
         Container cp = getContentPane();
         cp.setBackground(Color.red);
         cp.setLayout(new FlowLayout());
         cp.add(Orc);
         cp.add(Elf);
         cp.add(Dwarf);
         cp.add(Human);
         setSize(APPLLET_WIDTH,APPLLET_HEIGHT);
         while(Race==null)
         repaint();
         private class ButtonListenerO implements ActionListener
         public void actionPerformed(ActionEvent eventO)
              Race="orc";
         while(Race==null)
         repaint();
              private class ButtonListenerE implements ActionListener
              public void actionPerformed(ActionEvent eventE)
              Race="elf";
                   while(Race==null)
         repaint();
              private class ButtonListenerD implements ActionListener
              public void actionPerformed(ActionEvent eventD)
              Race="dwarf";
                   while(Race==null)
         repaint();
              private class ButtonListenerH implements ActionListener
              public void actionPerformed(ActionEvent eventH)
              Race="human";
                   while(Race==null)
         repaint();
         static String getRace()
              return Race;
    it never get's past player.init();

  • I can't see the Reporting Workspace in Service Manager Console PLEASE HELP

    I can't see the Reporting Workspace in Service Manager Console PLEASE HELP

    Hello,
    If you don't have an entry like "SQL Server Reporting Services (InstanceName)" in Windows Service Manager (Services.msc) then because SSRS service not installed on that machine. Install it, then you will see such an entry.
    Olaf Helper
    This is not an SQL issue it's a SC Service Manager issue. Reporting Services is installed and running on the SQL side. The problem is that as I am now aware I cannot get the Data Warehouse Server to register in the Service Manager consoles to connect that
    with the canned reports and turn on Reporting Workspace. Any thoughts?
    [ Blog] [ Xing] [ MVP]

  • Can i see the macro code in labview?

    i want to know how to make the macro in labview in order to be able to modify them in labview, so i don't want to write the named of macro made in excel or word and saved there, executing it with Run Macro where i call the macro with name.xls!macro, i would like to view the basic code of the macro.
    please, don´t say me, that the solution it´s easymacro.com, there i can´t see the diagram and i am a student, i need to learn.

    Hello,
    If you want to view the macro code in LabVIEW, there is a description at www.easymacro.com that will show you...
    Just kidding...
    To my knowledge, there is no way to view the code of an existing macro in LabVIEW. I could be wrong about this, however. The best way for you to find out what functionality is available is to obtain information from Microsoft on what specific macro functionality is available through ActiveX.
    I hope this suggestion gets you pointed in the right direction. Also, I recommend that in the future you only post your question to the Developer Exchange once...there is no need to post the same question multiple times.
    Have a nice day.
    Sincerely,
    Darren N.
    NI Applications Engineer
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for

  • After Effects Availability in Application Manager

    After Effect does not appear in my adobe application manager. How can I make it available to Install?

  • Frame 12 Server documentation videos don't work

    I've tried to get the embedded videos in the Frame 12 Server documentation (e.g., "Getting Started Guid") to work under multiple browsers to no effect.  Clicking on them results in nothing happening.  Here's my case in point:  Quite a pity since the

  • Uploading in LR3

    I recently returned from a vacation where I shot with two Canons, plus my iPhone. When I uploaded to LR3 my goal was to move photos from all three devices into a folder called 'March' within my master 2012 folder. The two Canon uploads landed in the

  • In house repair - Maintaining template for Spare parts & Services

    Hi, After creating an item of type "Diagnostics", I want to  choose additional "Repairs+Spare Parts" . Where can I maintain this template so the Spare Parts get proposed. Thanks,

  • Sequence Parameters: Can I use variable number of parameters?

    Can I create a sequence that has a variable number of parameters? If not, Can I pass an array of objects as a paramater? In the sequence code: for (i=0; i< Parameters.Params.GetNumElements(); i++) { object o = Parameters.Params[i]; // Do something wi