A common approach is to lump all these fields together into a single group item. The alternative is to pass each field as a separate parameter. Sometimes one approach is appropriate, and sometimes the other is appropriate.
Lumped parameters may be appropriate when:
Street address, city, state, and ZIP code go together. It makes sense to combine them into a common structure, which may be useful in other contexts.
On the other hand: suppose a subprogram requires a telephone number, a department code, a security level, and an employee ID. Lumping these fields together just creates an ugly, artificial hodge-podge.
It's no fun writing a CALL statement with twenty or thirty parameters. More importantly, it's easy to forget one, or to code them in the wrong order. This blunder will slip right past the compiler and bite you at run time.
If you find yourself passing large numbers of fields, you should reconsider your design. Maybe your subprogram is doing too many unrelated things. Maybe you can partition the task better.
This symptom often occurs together with action codes which tell the subprogram what to do. The use of multiple entry points usually leads to a simpler, more manageable interface.
For example: suppose we have a subprogram which reformats a name. Its input is a fixed-field group item, with first name, middle name, and last name. Its output is text: last name, comma, first name, and middle initial, with mixed upper and lower case as appropriate.
Let's further suppose that we have two different names to reformat: an employee's name and his spouse's name.
With a single lumped parameter, we code something like the following:
[Warning: bad code ahead]
MOVE EMP-NAME TO FORMNAME-NAME-IN.
CALL 'FORMNAME' USING FORMNAME-PARM.
MOVE FORMNAME-NAME-OUT TO EMP-NAME-OUT.
*
MOVE SPOUSE-NAME TO FORMNAME-NAME-IN.
CALL 'FORMNAME' USING FORMNAME-PARM.
MOVE FORMNAME-NAME-OUT TO SPOUSE-NAME-OUT.
Now suppose we pass two separate parameters (we retain the fixed-field
name as a group item, since it forms a natural aggregation):
CALL 'FORMNAME' USING EMP-NAME
EMP-NAME-OUT.
CALL 'FORMNAME' USING SPOUSE-NAME
SPOUSE-NAME-OUT.
This version is not only shorter, but also easier to read, and less
likely to be corrupted or obscured by later maintenance.