Skip to main content

I was trying to connect to DB2 using ODBC. 

When i try to compile my program on VSCode, I am getting COBCH0149 No SQL directives have been set.

But before compiling I have set the default directives to include SQL also I have set the value before the identification division.

$SET SQL

I tried to include other directives like below:

$SET SQL(INIT DB=PSDB2CONN PASS=postgres.****)

Error: 

COBCH0053 : Directive DB=PSDB2CONN invalid or not allowed here.


#VisualStudioCode
#DB2
#DB2.Connect

I was trying to connect to DB2 using ODBC. 

When i try to compile my program on VSCode, I am getting COBCH0149 No SQL directives have been set.

But before compiling I have set the default directives to include SQL also I have set the value before the identification division.

$SET SQL

I tried to include other directives like below:

$SET SQL(INIT DB=PSDB2CONN PASS=postgres.****)

Error: 

COBCH0053 : Directive DB=PSDB2CONN invalid or not allowed here.


#VisualStudioCode
#DB2
#DB2.Connect

Hi Thea,

Please don't create a new post for the same problem covered in an existing post that you have open.

I responded to your previous post with some questions for you. Please respond to those questions on the original post.

Thank you