rad application call from JS

Experts,

I am trying to do the rad app call us.rebuild.groups from the JS. 

Tested the rad app by merely passing the group name , but didnt return anything,  How do I test the return code of the rad app call.

please guide.

 // Mass rebuild of the all the cmgroups.

var cmProf = new SCFile('cm3profile')
if (cmProf.doSelect(query) == RC_SUCCESS)	{	

	print(cmProf.name)
	print(cmProf.approval_groups)
	var aArray = []
	aArray = cmProf.approval_groups.toArray()
	
	for (var i = 0; i < aArray.length; i  )	{	
		
		print(aArray[i])
		var cmGrp = new SCFile('cm3groups');
		var q1 = "name=\"" cmProf.name "\"";

		
		
		if (cmGrp.doSelect(q1) == RC_SUCCESS)	{	
			
		
			
			var rc = 		new SCDatum()
			var rteNames  = new SCDatum()
			var rteValues = new SCDatum()
			
			
			rteNames.push("group")						
			rteValues.push(cmGrp.name);
						
			print(rteNames "---------------" rteValues);

												  
			var z = system.functions.callrad("us.rebuild.group",
											   rc,
											   ["name"],
											   [cmGrp.name],
											   true)
			
			 print(RCtoString(rc));
			
			
		}
	
	}
	
}