== Why is this an issue?

Afin de ne pas perturber via la programmation, les paramètres positionnés sur les BIND PACKAGE pour des environnements de type 24/24 7/7, il est important de vérifier que les ordres de SELECT simples ou dans les DECLARE CURSOR que les mots clés WITH RR, WITH RS er WITH CS ne soient pas positionnés. Le seul mot clé accepté est WITH UR.


S’assurer que sur les ordres de SELECT (simple ou mis dans des DECLARE CURSOR) que les mots clés WITH RR, WITH RS er WITH CS ne soient pas positionnés.


=== Noncompliant code example

[source,cobol]
----
EXEC SQL DECLARE CLEC_0 CURSOR WITH HOLD
                    	FOR SELECT	C_BQ
                              		,C_CARNT_ORDREB
                              		,N_REF_ORDREB…..
          FROM       S1ORDCOU
          WHERE
( C_BQ               >=  :TORD-C-BQ               ) AND NOT
( C_BQ                =  :TORD-C-BQ                 AND…..
ORDER BY C_BQ,C_CARNT_ORDREB,N_REF_ORDREB
FOR FETCH ONLY
WITH RR
END-EXEC.
----


=== Compliant solution

[source,cobol]
----
EXEC SQL DECLARE CLEC_0 CURSOR WITH HOLD
                    	FOR SELECT	C_BQ
                              		,C_CARNT_ORDREB
                              		,N_REF_ORDREB…..
          FROM       S1ORDCOU
          WHERE
( C_BQ               >=  :TORD-C-BQ               ) AND NOT
( C_BQ                =  :TORD-C-BQ                 AND…..
ORDER BY C_BQ,C_CARNT_ORDREB,N_REF_ORDREB
FOR FETCH ONLY
WITH UR ou RIEN
END-EXEC.
----



ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

=== on 27 May 2014, 09:15:07 Freddy Mallet wrote:
This rule is specific to the BNP context, we should provide the XPath rule allowing to get the same result

endif::env-github,rspecator-view[]
