Err Msg Select function
Posted: June 6th, 2019, 4:57 am
I'm new to cspro and tried to display an error message together with select function. I got an error message says
"Expecting right parenthesis ')' in a function call near line 11 in P35 procedure.
Here is the logic I used:
PROC P35
if P04 + P07 + P10 + P13 + P32 <> P01 then
errmsg("The sum of cattle for < 6 months(%d), 6 months-1 year (%d), 1-3 years(%d), 3-10 years (%d) and 10 years and older (%d) differs from Total Cattle of all age (%d)",
P04, P07, P10, P13, P32, P01)
select("Fix number of < 6 months cattle", P04,
"Fix number of cattle for 6 months-1 year", P07,
"Fix number of cattle for 1-3 years", P10,
"Fix number of cattle for 3-10 years", P13,
"Fix number of cattle for 10 years and older", P32,
"Fix number of Total cattle of all age", P01);
endif;
But if I remove one row at the middle in the select function it works. Can you help me on this?
Thanks;
Ali
"Expecting right parenthesis ')' in a function call near line 11 in P35 procedure.
Here is the logic I used:
PROC P35
if P04 + P07 + P10 + P13 + P32 <> P01 then
errmsg("The sum of cattle for < 6 months(%d), 6 months-1 year (%d), 1-3 years(%d), 3-10 years (%d) and 10 years and older (%d) differs from Total Cattle of all age (%d)",
P04, P07, P10, P13, P32, P01)
select("Fix number of < 6 months cattle", P04,
"Fix number of cattle for 6 months-1 year", P07,
"Fix number of cattle for 1-3 years", P10,
"Fix number of cattle for 3-10 years", P13,
"Fix number of cattle for 10 years and older", P32,
"Fix number of Total cattle of all age", P01);
endif;
But if I remove one row at the middle in the select function it works. Can you help me on this?
Thanks;
Ali