We use something like this for pulling in a group of orders based on a wildcard portion of the purchase order
C+ DECLARE OHBPO CURSOR FOR
C+ SELECT OHORD#, OHBTKY, OHSPO#, OHENTD, OHHOLD, OHFF3, OHSM
C+ FROM OH
C+ WHERE OHHOLD = 'E' AND OHFF3 <> ' '
C+ AND OHSPO# LIKE '%' concat Trim(:INPO) concat '%'
C+ AND OHBTKY = :INCUST
C+ OPEN OHBPO