Continuation of DISPLAY statement over two lines of code displays the ‘white space’ between the end of the first line and the first character to be displayed on the next line
A client found an issue during the migration of an application into Visual COBOL managed code that uses character based screen displays in the SCREEN SECTION. In previous versions of Micro Focus COBOL (eg Net Express) if they had a single DISPLAY statement that was required to straddle 2 lines of code in the COBOL source, they were able to use the continuation character (-) in column 7 of the 2nd line to string both lines to be displayed as one.
For example, note the following code, which has a continuation character in column 7 in the 2nd line of the text to be displayed:
So the white space between the end of the last character on the first line and the first character on the second line of the DISPLAY statement is displayed as spaces. The continuation character is ignored. Yet this same code in an unmanaged project displayed as it had in Net Express.
This can be set in the source code (if so, this MUST be the first line of the code and the dollar sign must be in column 7) or it can be set as a project directive or in an appropriate directives file (eg cobol.dir).
However, if you want to use SOURCEFORMAT”FREE” but still display the line of code as one line, then you will have to combine the code to be displayed on 1 line. With SOURCEFORMAT”FREE” set you are not constrained to the code finishing in column 72 as you are with FIXED SOURCEFORMAT.
This is not an issue specific to Visual COBOL – if SOURCEFORMAT”FREE” is set in Net Express the result of the DISPLAY statement is the same.