rspec/rules/S1579/cobol/rule.adoc
2022-02-04 16:28:24 +00:00

39 lines
811 B
Plaintext

Shared coding conventions allow teams to collaborate efficiently. This rule checks that file-code names conform to a specified regular expression.
== Noncompliant Code Example
Given a pattern of ``++FC-.*++``:
[source,cobol]
----
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT Y27MVTS ASSIGN TO S1 >Noncompliant; S1 doesn't match "FC-.*" pattern
FILE STATUS IS S1.
----
== Compliant Solution
[source,cobol]
----
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT Y27MVTS ASSIGN TO FC-S1 >OK as FC-S1 matches "FC-.*" pattern
FILE STATUS IS FS-S1.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::parameters.adoc[]
endif::env-github,rspecator-view[]