Programming Languages on Power

 View Only

 Embeded SQL in COBOL program doesn't accept - SET OPTION CLOSQLCSR = *ENDACTGRP

PABLO IBARRA DUPRAT's profile image
PABLO IBARRA DUPRAT posted 04/30/26 11:46 AM

Hi 

My environment is i-series v7.4.

I'm trying to reduce the phenomena of full-open on cobol programs using cursors and the one possible solutions is to set a option named *ENDACTGRP, to avoid or reduce full-open conditions, but when specify at COBOL program an compile, the compilation return errors (the image attach in question).

I follow Daniels Advice, but:

The error Continue.

 

Any Advice to solve this problem?

Daniel Gross's profile image
Daniel Gross IBM Champion

Hi Pablo,

most probably the sequence of statements is wrong. The SET OTIONS statement should be the first SQL statement in your program.

           EXEC SQL SET OPTION CLOSQLCSR = *ENDACTGRP END-EXEC.

This line works absolutely fine, when placed as the first line in your PROCEDURE DIVISION.

HTH
Daniel