We would like to have more formatting options for "data-entry description" declarations.
It would also be necessary to be able to align certain information (keyword) on specific columns:
depending on their nature: descriptive clauses based on keyword recognition
depending on their value: number of data-entry levels, kind of keyword recognition
It would also be necessary to manage the spacing between the terms of a descriptive clause, in particular to remove superfluous spacing.
Below are the rules that we currently apply (by a tool for generating data description copybooks), and that we would like to be able to also manage by the reformatting functionality.
For the management of level numbers:
force an alignment column for certain level numbers: levels 01 and 77 at column 8, level 02 at column 12, level 03 at column 13, level 05 at column 14, level 10 at column 16, level 49 and 88 at column 21
for level numbers without specific alignment, taking into account the requested indentation value, for us indentation of 1, (with respect of the margin A or B depending on the value of the level number)
This can also result in a alignement calculation:
number levels 01 and 77: aligned in column 8
number levels 02 to 09: aligned on column 10 + value of the level number, i.e. columns 12 to 19, with an indentation of 1
level number 10 to 14: aligned on column 6 + value of the level number, i.e. columns 16 to 20 with an indentation of 1
level number >= 15: aligned with column 21
Note: we only use certain values of level numbers, (01, 02, 03, 05 which correspond to structures, translated into group zones, 10 which corresponds to elementary data or group zones in a structure, then from 1 to 1).
For the different parts of a "data entry description" declaration:
the data-name is aligned in column 25 (so only the level numbers are indented)
the déclarations of the PICTURE, REDEFINES, OCCURS clauses are aligned at column 40 (and move to the next line if necessary)
a single space between the different terms of the same clause (PICTURE, REDEFINES, OCCURS...)
Samples, (from our copybook generator, compatible with IBM VisualAge Pacbase generator, deprecated):
Note that some data type expressions for SQL type declarations are not correctly recognized by the textmate grammar.
Description of the enhancement requested
Hi,
The COBOL formatting functionality is limited as far as the DATA DIVISION is concerned:
Experimental: Formatting COBOL source code Formatting COBOL code elements Quick Look: IDz COBOL Code Formatter
We would like to have more formatting options for "data-entry description" declarations.
It would also be necessary to be able to align certain information (keyword) on specific columns:
It would also be necessary to manage the spacing between the terms of a descriptive clause, in particular to remove superfluous spacing.
Below are the rules that we currently apply (by a tool for generating data description copybooks), and that we would like to be able to also manage by the reformatting functionality.
For the management of level numbers:
This can also result in a alignement calculation:
Note: we only use certain values of level numbers, (01, 02, 03, 05 which correspond to structures, translated into group zones, 10 which corresponds to elementary data or group zones in a structure, then from 1 to 1).
For the different parts of a "data entry description" declaration:
Samples, (from our copybook generator, compatible with IBM VisualAge Pacbase generator, deprecated):
Note that some data type expressions for SQL type declarations are not correctly recognized by the textmate grammar.