rspec/rules/S2805/rpg/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

51 lines
1.5 KiB
Plaintext

== Why is this an issue?
While a file I/O call will compile without a file name, such code is almost always an error. The omission of the file name, can cause unexpected results in multi-file programs.
=== Noncompliant code example
[source,rpg]
----
* Noncompliant
C READ DS1 90
----
=== Compliant solution
[source,rpg]
----
C READ PF0001 DS1 90
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
=== on 7 Apr 2015, 09:22:11 Pierre-Yves Nicolas wrote:
I don't manage to compile the noncompliant code example.
=== on 8 Apr 2015, 15:14:44 Ann Campbell wrote:
\[~pierre-yves.nicolas] this rule is based on this: \https://scs.senecac.on.ca/~timothy.mckenna/RPG544/rpg_cls5.html
Perhaps this only applies to some (one?) compilers...?
I'm fine to drop this rule if you like.
=== on 8 Apr 2015, 15:41:19 Ann Campbell wrote:
BTW, I've just spent probably 20min trying to get the author's email address. Apparently it's only available if you're a student of Seneca College. :-(
=== on 16 Apr 2015, 09:45:09 Pierre-Yves Nicolas wrote:
All RPG IV references I could find define the "name" operand as required (e.g. \http://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0925083696.htm#HDRZZREAD).
Maybe this rule applied to RPG III, but we don't support RPG III.
I would drop this rule.
endif::env-github,rspecator-view[]