Once you have written your COBOL application containing embedded SQL, you must compile it specifying the appropriate Compiler directive such that the preprocessor converts the embedded SQL statements into function calls to the database:
Specify the SQL Compiler directive.
Specify the DB2 Compiler directive.