Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
I stopped using initialization-method this once COBOL2 was released. Although, it did work well in OS/VS COBOL.
But in this example, if the array is to be cleared to SPACES, then MOVE SPACES to the 05 level will generate (most likely) an MVCL and hence, 5 instructions to perform this initialization or a series of MVC's (as you've shown).
Also, since COBOL2, a VALUE clause can be used for each elementary item of an array and then the entire array can be cleared in the program Prologue code.