To find documentation that will help with your stored procedure (user-defined routine), check out this link:
http://www-306.ibm.com/software/data.../pubs/library/
That said, FOREACH declares and opens a cursor, fetches rows, then closes the cursor. Remove the DECLARE statement and try this:
foreach select tkinit into lv_tk from timekeep
where tktmdate IS NULL
SELECT COUNT(*)
INTO lv_tk_count
FROM bo_calendar boc ...
end foreach;
If you feel you need a named cursor, you may do that too, but with the FOREACH. See the documentation for your version of Informix.