Skip to main content

Hi,

I am changing an existing, working Oracle Pro*Cobol, Visual COBOL program.

I was able to change 2 .cpy COPY files and compile.

I was able to change 1 .cob INCLUDE (EXEC SQL) file and compile.

Now, whatever I change in any .cob file, I systematically get the same compiler errors:

COBCH0562 : An "ELSE" phrase did not have a matching IF and was discarded.

COBCH0564 : A scope-delimiter did not have a matching verb and was discarded

I have tried everything I could think of up to introducing my changes again line per line but with the same result.

I am desperate and out of ideas.

Did any of you ever experience something similar and what was your solution?

Thanks

Stefan



------------------------------
Stefan Thys
Ing Belgique
Brussels BE
------------------------------

Hi,

I am changing an existing, working Oracle Pro*Cobol, Visual COBOL program.

I was able to change 2 .cpy COPY files and compile.

I was able to change 1 .cob INCLUDE (EXEC SQL) file and compile.

Now, whatever I change in any .cob file, I systematically get the same compiler errors:

COBCH0562 : An "ELSE" phrase did not have a matching IF and was discarded.

COBCH0564 : A scope-delimiter did not have a matching verb and was discarded

I have tried everything I could think of up to introducing my changes again line per line but with the same result.

I am desperate and out of ideas.

Did any of you ever experience something similar and what was your solution?

Thanks

Stefan



------------------------------
Stefan Thys
Ing Belgique
Brussels BE
------------------------------

Hi Stefan,

I Googled and found the following post which appears to be describing the same error that you are experiencing.

Compile Issue under ProCOBOL due to SQLBEX - Stack Overflow

In this case the cause was that the host variable used in an EXEC SQL statement was incorrect and so the code generated by Pro*COBOL was not correct.

Please check the changes that you made and ensure that the host variables are correct.



------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

Hi Stefan,

I Googled and found the following post which appears to be describing the same error that you are experiencing.

Compile Issue under ProCOBOL due to SQLBEX - Stack Overflow

In this case the cause was that the host variable used in an EXEC SQL statement was incorrect and so the code generated by Pro*COBOL was not correct.

Please check the changes that you made and ensure that the host variables are correct.



------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

Hi Chris,

Thanks for your reply.

I saw that post too but I can't find a problem in my host variables so far.

The compiler is giving the error on the line 'EXEC SQL INCLUDE xxxx.cob END-EXEC' and is not showing the exact line where the error is occurring.

Do you know of a way to get the exact line of the compile error and jump to it when clicking on the compile error?

Thanks

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Hi Chris,

Thanks for your reply.

I saw that post too but I can't find a problem in my host variables so far.

The compiler is giving the error on the line 'EXEC SQL INCLUDE xxxx.cob END-EXEC' and is not showing the exact line where the error is occurring.

Do you know of a way to get the exact line of the compile error and jump to it when clicking on the compile error?

Thanks

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Try adding the COBSQL directive SQLDEBUG. This will cause the precompiled source code to be left in the compile folder (.cbl) along with a listing file (.lis).

The error should be listed in one of those or you could try compiling the .cbl file on its own to see what line the error is on.



------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

Hi Chris,

Thanks for your reply.

I saw that post too but I can't find a problem in my host variables so far.

The compiler is giving the error on the line 'EXEC SQL INCLUDE xxxx.cob END-EXEC' and is not showing the exact line where the error is occurring.

Do you know of a way to get the exact line of the compile error and jump to it when clicking on the compile error?

Thanks

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Which Visual COBOL product version and patch update level are you using?

Which Oracle version are you using?

Is this on Windows or Linux/Unix?



------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

Which Visual COBOL product version and patch update level are you using?

Which Oracle version are you using?

Is this on Windows or Linux/Unix?



------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

Chris,

Windows Server 2016 Standard

Visual COBOL 9.0 PU13

Oracle Client 19

Oracle DB 19.0.0.0.0 Enterprise Edition Production Version 19.22.0.0.0

I added SQLDEBUG but did not see a .cbl appear, in the .lis I do not see any errors.

A .cs9 file was created but no errors there either.

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Chris,

Windows Server 2016 Standard

Visual COBOL 9.0 PU13

Oracle Client 19

Oracle DB 19.0.0.0.0 Enterprise Edition Production Version 19.22.0.0.0

I added SQLDEBUG but did not see a .cbl appear, in the .lis I do not see any errors.

A .cs9 file was created but no errors there either.

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Can you please try renaming the .cs9 file to .cbl and then compiling it using the cobol command from a visual cobol command prompt? i.e. cobol myfile.cbl;

If that doesn't display any errors I might need you to send me the source in question so that I can try it here.



------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

Can you please try renaming the .cs9 file to .cbl and then compiling it using the cobol command from a visual cobol command prompt? i.e. cobol myfile.cbl;

If that doesn't display any errors I might need you to send me the source in question so that I can try it here.



------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

Chris,

I commented out the line where the compiler pointed me to:

EXEC SQL INCLUDE xxxxx.cob END-EXEC.

and put its code (about 7000 lines, not ideal but...) directly in my .pco source

I could compile without the errors.

I am now progressively re-introducing my changes in the rest of the code and it is going well so far.

If you have any ideas why it is compiling like this, I'm interested.

I will keep you posted.

Thanks

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Chris,

I commented out the line where the compiler pointed me to:

EXEC SQL INCLUDE xxxxx.cob END-EXEC.

and put its code (about 7000 lines, not ideal but...) directly in my .pco source

I could compile without the errors.

I am now progressively re-introducing my changes in the rest of the code and it is going well so far.

If you have any ideas why it is compiling like this, I'm interested.

I will keep you posted.

Thanks

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Hi,

I was finally able to open a case on the microfocus support portal.

This issue will be treated further there.

Thanks

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------