TypeCobol
TypeCobol copied to clipboard
Cobol check: UNBOUNDED can be used only in LINKAGE SECTION
Describe the bug Unbounded tables can only be declared in LINKAGE SECTION, this is currently not checked.
To Reproduce (Type)Cobol code that cause the bug : (if any)
IDENTIFICATION DIVISION.
PROGRAM-ID. TCOFM117.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 notAllowed.
*KO: An unbounded table was defined outside the"LINKAGE SECTION".
*A table that consist of one element was assumed.
05 item PIC X OCCURS UNBOUNDED.
LINKAGE SECTION.
01 allowed.
05 item PIC X OCCURS UNBOUNDED.
PROCEDURE DIVISION.
GOBACK
.
END PROGRAM TCOFM117.
Expected behavior A clear and concise description of what you expected to happen.
Expected (Type)Cobol code :
Technical
Must be done in CrossCheck. Use node or symbol flag to check whether the data having an UNBOUNDED
occurs is in linakge or not.
Unit test OccursUnbounded.rdz.cbl
must be updated.
How to test automatically Standard unit tests.