Open PL/I requires a trailing semicolon after the start of an SQL compound statement. For example:
exec sql begin compound atomic static; select count(*) into :tmp3 from department; select count(*) into :tmp4 from project; end compound;