Serial printing the hex value ..fully

Hi,
I am trying to print the last 8 digits of the MAC address of my sender and receiver xbee module with its signal strength to the serial monitor and it should be in this format "408a2447,40ae1176,54"....(excluding the quotes,including the commas...)because the application which uploads the data to the web server from the serial port will only accept it in this format.which is in HEX form..except the signal strength which is a integer....here is my code which i have written for sending the long integers instead of the hexadecimals....

void setup() {
Serial.begin(9600);
}

void loop()
{
if (Serial.available())
{
Serial.write(Serial.read());
delay(500);
int rssiDur = pulseIn(8, LOW, 200);
if(!Serial.available())
{
unsigned long int a = 97650123;
Serial.print(',');
Serial.print(a);
Serial.print(',');
Serial.println(rssiDur);
}
}
}

the output of this code will be coming like 12345678,97650123,54
I have to get the output with the hexadecimals(408a2447,40ae1176) instead of the long integers..
also this is the code i have written for the receiver arduino.
any idea how to get output...help needed please!!!

Serial.print(a,HEX)

Why are you printing to the serial port only when there is data to read from the serial port?