Hi Pedro,
Tony's response is correct if you are using Oracle Pro*COBOL. If you are using OpenESQL and ODBC then the BEHAVIOR setting determines whether or not a COMMIT will close a cursor. If BEHAVIOR=MAINFRAME then cursors will automatically be closed otherwise they will remain open.
All cursors are automatically closed on a DISCONNECT or when the program terminates.