rspec/rules/S2269/cobol/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

61 lines
1.7 KiB
Plaintext

== Why is this an issue?
To ensure future code portability, obsolete keywords should not be used. The following keywords were declared obsolete in the COBOL ANSI-85 standard and removed in the ISO/IEC 1989:2002 standard:
* Paragraphs: ``++AUTHOR++``, ``++INSTALLATION++``, ``++DATE-WRITTEN++``, ``++DATE-COMPILED++``, ``++SECURITY++``
* Clauses: ``++DATA RECORD(S)++``, ``++LABEL RECORD(S)++``, ``++MEMORY SIZE++``, ``++MULTIPLE FILE (TAPE)++``, ``++RERUN++``, ``++VALUE OF++``, ``++CODE SEGMENT-LIMIT++``
* Statements: ``++ALTER++``, ``++ENTER++``, ``++STOP++`` _literal_, ``++GO TO++`` without an argument
* Phrases: ``++REVERSED++`` phrase of the ``++OPEN++`` statement
* Special registers: ``++DEBUG-ITEM++``
* Sections: Debugging sections
* Declarative: ``++USE FOR DEBUGGING++``
The following keywords were declared obsolete in the ISO/IEC 1989:2002 standard:
* Phrase: ``++DEBUGGING MODE++``
* Clause: ``++PADDING CHARACTER++``
=== Noncompliant code example
[source,cobol]
----
IDENTIFICATION DIVISION.
PROGRAM-ID. AcceptAndDisplay.
AUTHOR. Michael Coughlan. *> Noncompliant
----
=== Compliant solution
[source,cobol]
----
IDENTIFICATION DIVISION.
PROGRAM-ID. AcceptAndDisplay.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
"XXX" is obsolete.
'''
== Comments And Links
(visible only on this page)
=== on 8 Dec 2014, 14:24:50 Pierre-Yves Nicolas wrote:
Other language elements were categorized as obsolete in COBOL 85 and removed in COBOL 2002. See:
* \http://www-01.ibm.com/support/knowledgecenter/SSQ2R2_8.5.1/com.ibm.etools.cbl.win.doc/topics/rlpreobs.htm?lang=en
* \http://supportline.microfocus.com/documentation/books/sx22sp1/atobsl.htm
endif::env-github,rspecator-view[]