


You may use the "VALUE IS MULTIPLE value" option with multi-line entry fields. The value data item should be a one-dimensional table with no subscript specified. The effect of the MULTIPLE phrase is to match each line of the entry field to occurrences in the table. The first line is matched to the first occurrence in the table, the second line with the second occurrence, and so on. Occurrences that are larger than the number of lines in the entry field are set to spaces when the entry field is accepted. The MULTIPLE option makes it easy to process a large multi-line entry field in COBOL.
There is one important issue to consider when you use the MULTIPLE value option. The runtime does not provide a way to limit the amount of text the user can enter on a single line. Thus, the user could enter more text than a single occurrence of the value data item can hold. Normally, to prevent the user from entering extra data, you might set the width of the entry field to be the same as the size of the value data item. However, this does not always work, because entry fields typically use a proportionally spaced font. Some characters are smaller than others, and the user can thus enter more of those characters than the width of the entry field might suggest.
There are two possible ways of addressing this issue. One option is to use a fixed-width font with the entry field. Then the width of the field matches the number of characters that the user can enter. The other option is to use a value data item that is larger than the width of the entry field. You will need to experiment to find appropriate sizes. You might try a value data item that is 20% larger than the entry field.
This issue is not normally a problem for single-line entry fields: the MAX-TEXT property (see below) prevents the user from entering too much data.
Finally, note that you can have a multiple-line entry field without using the MULTIPLE value phrase. In this case, the entire contents of the entry field are returned as a single string. Any carriage returns that the user enters directly are kept as part of the string. Carriage returns implied by word-wrapping are discarded.