Skip to content

Commit

Permalink
Modify rule S6937: Extend support to other statements (#3746)
Browse files Browse the repository at this point in the history
* Modify rule S6937: Extend support to other statements

* Add more documentation

* address review comment
  • Loading branch information
rudy-regazzoni-sonarsource authored Nov 6, 2024
1 parent f565145 commit 65d1ffd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rules/S6937/jcl/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"tags": [
],
"defaultSeverity": "Major",
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-6937",
"sqKey": "S6937",
"scope": "All",
Expand All @@ -18,6 +18,6 @@
"impacts": {
"RELIABILITY": "HIGH"
},
"attribute": "CONVENTIONAL"
"attribute": "LOGICAL"
}
}
14 changes: 11 additions & 3 deletions rules/S6937/jcl/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
In-stream procedures should always have a name.

== Why is this an issue?

In JCL, it is expected for a PROC statement inside of a job stream to have a name.
In JCL, some statements require to have a label or name defined, otherwise it will trigger a JCL error.
The statements that require a name/label are:
* CNTL
* JOB
* NOTIFY
* OUTPUT
* in-stream PROC

== How to fix it

Expand Down Expand Up @@ -32,4 +36,8 @@ In JCL, it is expected for a PROC statement inside of a job stream to have a nam

=== Documentation

* https://www.ibm.com/docs/en/zos/3.1.0?topic=description-label-field[IBM Reference - CNTL Label field]
* https://www.ibm.com/docs/en/zos/3.1.0?topic=d-name-field-5[IBM Reference - JOB Name field]
* https://www.ibm.com/docs/en/zos/3.1.0?topic=statement-label-field[IBM Reference - NOTIFY Label field]
* https://www.ibm.com/docs/en/zos/3.1.0?topic=d-name-field-6[IBM Reference - OUTPUT Name field]
* https://www.ibm.com/docs/en/zos/3.1.0?topic=d-name-field-8[IBM reference - PROC statement - Name field]

0 comments on commit 65d1ffd

Please sign in to comment.