interfacing xbee + arduino mega + 20x4 lcd

hi blogggers
I am quite new to arduino and for my project I need to interface mega with xbee and LCD.
the project consist of a exercise bike sending data via rs232 where it mates with xbee and on the other end xbee is connected to xbee shield with arduino mega +LCD
The string I receive on the data in pin of xbee is
B000100000000500000000000006012 when seen on hyperterminal which changes every one second but remains same in length and starts with character B all the time. I dont know how to program mega to recieve the entire string as, after recieving I need to chop the string to get meaning full data.
The other aspect of the data is when the bike is not functioning it send a default string which is A060312011100600416040 so the program needs to diffrentiate between the two such that when default string is sent it display on the LCD that bike is not connected.

It will be very helpful if you guys can give anything to starts on with
thanks

Since the first character is either A or B that should be easy enough to handle first.

char inData[32]; // Longest string is 31 characters, plus 1 for the NULL
byte index;
void loop()
{
   index = 0;
   while(Serial.available() > 0)
   {
      char aChar = Serial.read();
      inData[index] = aChar;
      index++;
      inData[index] = '\0'; // NULL terminate string after each addition
   }

   // Parse the string
   if(inData[0] == 'A')
      LCD.print("Somebody get pedaling, quick!");
   else
   {
      // Bike is being pedaled. Parse for relevant bits...
   }
}

hello Paul
first of all I am sorry that I reposted the question a two other places which with your advice I have taken away. I really do appreciate your help you gave me. It is just when you are terribly stuck with something you try to do any thing possible and I thought placing the question at different place might get some attention (it is my first time posting question).
I have also tried your code but with no luck probably I am not doing something right.
thanks again

I thought placing the question at different place might get some attention

Attention is like publicity. There's the good kind, and the bad kind. Cross posting does not get the good kind. Many people here refuse to respond to anything that is cross-posted.

I have also tried your code but with no luck

I consulted with a psychic, but she couldn't tell me what your problem was either. I talked to a crystal ball reader. No luck there, either. The tea leaf reader was no help.

I guess that you're going to have to tell us what the problem is.