DROP PROCEDURE IF EXISTS `CALCMAIN`;
delimiter ;;
CREATE PROCEDURE `CALCMAIN`(IN `PCPID` int,OUT `PRESULT` varchar(100))
BEGIN
	#Routine body goes here...
DECLARE EXIT HANDLER FOR SQLEXCEPTION  
SET PRESULT = 'FAIL';
 CALL CalcBlue(PCPID);
SET PRESULT = 'SUCCESS';
END
;;