Page 319 of the Enterprise COBOL
Language Reference manual version 6.2 states (with emphasis added by me)
Include the USING phrase in the CALL statement only if there is a USING phrase in the PROCEDURE DIVISION header or the ENTRY statement through which the
called program is run. The number of operands in each USING phrase must be identical.
For more information about the USING phrase, see “The PROCEDURE DIVISION header” on page 255.
The sequence of the operands in the USING phrase of the CALL statement and in the corresponding USING phrase in the called subprogram's PROCEDURE
DIVISION header or ENTRY statement determines the correspondence between the operands used by the calling and called programs. This correspondence is
positional.
The values of the parameters referenced in the USING phrase of the CALL statement are made available to the called subprogram at the time the CALL
statement is executed. The description of the data items in the called program must describe the same number of character positions as the description of the
corresponding data items in the calling program
Some points to consider:
- Using 4 operands in the CALL USING statement and 5 in the PROCEDURE DIVISION USING means that the odds are good that a storage violation will occur when the subprogram references the 5th operand.
- If a storage violation does not occur when the subprogram attempts to use the 5th operand, what value will that operand have?
- Positional in the quote MEANS positional -- at a previous employer, we ran into storage issues when we changed the subprogram from 1500 byte variables to 9999 byte variables as the new length requires 3 assembler offset addresses (4096, 4096, 1807 bytes referenced) and since the calling program wasn't passing 3 addresses per variable the offsets for the variables after the changed variable were completely off.
There won't be a compile error since COBOL cannot know at compilation time that there is a mismatch in the CALL USING and PROCEDURE DIVISION USING counts -- they are, after all, in different programs. You won't get "junk" data (since there is NO SUCH THING AS JUNK DATA to a computer), but the results certainly will not be predictable nor repeatable, necessarily. Can you get away with doing this? Maybe -- as long as your are intimately familiar with HLASM and how data passing works.