Skip to main content

COBCH0149 and COBCH0053 on VSCode Micro Focus Visual Cobol

  • March 6, 2024
  • 1 reply
  • 0 views

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

1 reply

Chris Glazier
Forum|alt.badge.img+2
  • Moderator
  • 3697 replies
  • March 6, 2024

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