2023-05-03 11:06:20 +02:00
== Why is this an issue?
2021-04-28 16:49:39 +02:00
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.
2021-04-28 18:08:03 +02:00
2023-05-03 11:06:20 +02:00
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
D WSFD08 S 30A 0
C IN WSFD08
C MOVEL WSFD08 VAR9S
----
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
D WSFD08 S 30A 0
/free
in WSFD08;
/end-free
----
2021-04-28 18:08:03 +02:00
2023-05-03 11:06:20 +02:00
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
D WSFD08 DS 30 DTAARA(HEPDTAR005)
D W3SPNO 123 124B 0
D W3LNCT 367 368B 0
C IN WSFD08
----
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
D WSFD08 DS 30 DTAARA(HEPDTAR005)
D W3SPNO 123 124B 0
D W3LNCT 367 368B 0
/free
in WSFD08;
/end-free
----
2021-04-28 18:08:03 +02:00
2021-09-20 15:38:42 +02:00
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
2023-05-25 14:18:12 +02:00
=== Message
Define the data structure for this "IN" statement in its D spec
2021-09-20 15:38:42 +02:00
endif::env-github,rspecator-view[]