Structures or javascript/json objects in progress ABL?
<p>We're migrating to 11.6 and I think it's a great moment to rethink old habits and improve some concepts.</p>

<p>One of these things is the way we've been dealing with parameter definitions in functions and procedures.</p>

<p>Often times we have procedures and functions that need a lot of parameters, either inputs or outputs.  Personally, for readability and maintainability reasons, I don't like to have methods with too many parameters explicitly declared.</p>

<p>In order to avoid this problem and still allow a large number of parameters, we've manually implemented a key-value pair approach with a single parameter.</p>

<p>But there are some drawbacks with this approach:</p>

<ul>
<li>It's not possible to tell which parameters are needed just by inspecting
the method signature. </li>
<li>You'll always need some boilerplate code, like methods for pushing and pulling values.</li>
</ul>

<p>So with that said, I would like to hear some others' thoughts. 
Have you ever implemented something similar?</p>

<p>Is there something that could work as a javascript/json object in ABL?</p>

<p><strong>Current implementation.</strong></p>

<pre><code>DEFINE VARIABLE param as CHARACTER NO-UNDO.

addValue('id', '1', param).
addValue('date', STRING(TODAY), param).

RUN internalProc (INPUT param).
</code></pre>

<p><strong>Desired implementation</strong></p>

<pre><code>param.id   = 1
param.date = TODAY

RUN internalProc (INPUT param)  
</code></pre>