Visual COBOL offers commands and preferences for formatting COBOL code. Formatting means applying consistent indentation and new lines, removing any extra white spaces, aligning keywords and improving the source's readability. You can format entire programs, files or a selection of code in the editor. You can also mark portions of code that are not to be formatted.
Visual COBOL offers configurable settings for formatting a number of the elements of the COBOL language in the Data, Identification and Procedure Divisions. The default settings are the ones most likely to be commonly used for COBOL code but you are free to change them as necessary in the Visual Studio options.
If you have a program that includes sections of code that you do not want to format you can use one of the following options to ensure that only the desired sections are formatted:
*> 01 var1 pic x(30).
*> cblformat off ... code below this line will not be formatted...
To indicate the end of the area which must not be formatted, enter the following:
*> cblformat on ... code below this line will be formatted...
See Known Issues for restrictions in formatting.