Posted: Fri Jun 28, 2024 2:10 pm Post subject: Period missing after END-EXEC in WS
Hi
We have a number of programs that are in production where we have this construct in W-S
EXEC SQL
INCLUDE blah
END-EXEC
EXEC SQL
INCLUDE blah
END-EXEC
Note that there is no period after the END-EXEC
These programs, as I said, were successfully compiled, linked and bound and are running in prod.
Recently I had reason to recompile one of these programs in dev and I started getting compiler errors which disappeared once I added the period after the END-EXEC
I was curious if anyone knew of a change in the way the cobol compiler works that would cause this behaviour to change? Did IBM, like, "tighten up" the compiler?
I know that periods are not needed in the Procedure Division
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
Posted: Fri Jun 28, 2024 4:52 pm Post subject:
chuck,
Is it the Precompiler that issued the error message when the period is missing or is it the COBOL compiler that issued the message?
According Db2 12 , Period is OPTIONAL if it is in between COBOL statements.
Db2 12 Programming Guide wrote:
If the SQL statement appears between two COBOL statements, the period after END-EXEC is optional and might not be appropriate. If the statement appears in an IF?THEN set of COBOL statements, omit the ending period to avoid inadvertently ending the IF statement.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum