FILLER for Discontiguous Output Area and Return Value
If the return value is discontiguous from the output area, you must calculate and manually specify the filler between the return value and the output area.
The following example shows the calculation for the filler from the original COBOL that goes into the Import Wizard (the byte counts on the right are added as an illustration):
01 OUTPUT-AREA.
05 SELECTED-OUTPUT-AREA.
10 FIELD1 PIC S9(4) COMP. [2 Bytes]
10 FIELD2 PIC S9(9) COMP. [4 Bytes]
05 DISCONTIG-UNSELECTED-AREA.
10 NOTSELECTED PIC X(10). [10 Bytes]
10 ALSO-NOTSELECTED PIC S9(9) COMP. [4 Bytes]
05 RETVAL PIC S9(9) COMP. [4 Bytes]
In this case, because the return value follows the output area, filler must be added to the last output parameter. To do this, perform the following steps.
Unlock the method.
In the details pane, click FIELD2.
On the File menu, click Properties, and then click the COBOL Definition tab.
In the From Host box, type 14 as the trailing filler.
Click OK.
To verify your modified code, in TI Project, use the Export command on the File menu. You can then see your code in Notepad.
The following is the output with the added filler:
01 DISCONTIGCBL-OUTPUT-AREA.
05 LL PIC S9(4) COMP. OUTPUT [2 Bytes]
05 ZZ PIC S9(4) COMP. OUTPUT [2 Bytes]
05 FIELD1 PIC S9(4) COMP. OUTPUT [2 Bytes]
05 FIELD2 PIC S9(9) COMP. OUTPUT [4 Bytes]
05 RETVAL PIC S9(9) COMP. OUTPUT [4 Bytes]