You can specify the XDB directive anywhere where you can specify any other compiler directive, that is:
$set xdb(autobind collection-id=myschema)
cob -Vt testconn.cbl -C"anim xdb(autobind collection==myschema)"