problem in msgctl() system call

Hi,

 i am using IBM P6 server and OS is AIX 5.3. my code is written in c/pro C. 

i am facing problem in msgctl() system call.The variables msg_qbytes and msg_cbytes are used to store total no of bytes and current no of bytes in a QUEUE,but it is showing me as ZERO though data are there in QUEUE.

since the same code is working fine in IBM P5 MACHINE, i am quiet surprised.
please help.