Solution to question two (I have found yesterday):
assumption: X is the name of one of the intab columns - therefore should be written between quotation marks
CREATE PROCEDURE simpl (in intab tableau, in i integer, out outtab tableau)
AS
BEGIN
outtab= select top 10 from :intab where :intab."X" = :i;
END;