rspec/rules/S1733/cobol/rule.adoc

57 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

== 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.
Sassurer 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
2022-02-04 17:28:24 +01:00
[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
2022-02-04 17:28:24 +01:00
[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[]