
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.
61 lines
1.3 KiB
Plaintext
61 lines
1.3 KiB
Plaintext
== Why is this an issue?
|
|
|
|
Both the name and the field definitions of a parameter 2 data area used in an ``++IN++`` should be coded in the ``++D++`` specification. This ensures that all definition data is kept together, and the specific data is not manually extracted in the code, thus making the code easier to read and maintain.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,rpg]
|
|
----
|
|
D WSFD08 S 30A 0
|
|
|
|
C IN WSFD08
|
|
C MOVEL WSFD08 VAR9S
|
|
----
|
|
|
|
[source,rpg]
|
|
----
|
|
D WSFD08 S 30A 0
|
|
|
|
/free
|
|
in WSFD08;
|
|
/end-free
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,rpg]
|
|
----
|
|
D WSFD08 DS 30 DTAARA(HEPDTAR005)
|
|
D W3SPNO 123 124B 0
|
|
D W3LNCT 367 368B 0
|
|
|
|
C IN WSFD08
|
|
----
|
|
|
|
[source,rpg]
|
|
----
|
|
D WSFD08 DS 30 DTAARA(HEPDTAR005)
|
|
D W3SPNO 123 124B 0
|
|
D W3LNCT 367 368B 0
|
|
|
|
/free
|
|
in WSFD08;
|
|
/end-free
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Define the data structure for this "IN" statement in its D spec
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|