TypeCobol icon indicating copy to clipboard operation
TypeCobol copied to clipboard

Detect error "USAGE" was different from the "USAGE" specified at the group level

Open smedilol opened this issue 1 year ago • 0 comments

What is the current problem Implement new check: The specified"USAGE"was different from the "USAGE" specified at the group level. The group "USAGE" was assumed for this item.

Cobol code to illustrate.

      IDENTIFICATION DIVISION.
       PROGRAM-ID. DetectWrongUsage.
       DATA DIVISION.
       WORKING-STORAGE SECTION.

       01 Group1 pointer-32.
      *    Ok because group has a valid usage that apply to its children
           05 Var5.
      *    Ok same usage as parent
           05 Var6 pointer-32.

      *    Ko usage different than parent
      *The specified"USAGE"was different from the "USAGE"specified at
      *the group level.  The group "USAGE" was assumed for this item.
           05 Var7 pointer.

Technical New check in CrossChecker. Be aware that DataDefinition.DataUsage is currently a recursive property and the result is not cached.

How to test automatically Standard program test with Mix comparator.

smedilol avatar May 10 '23 08:05 smedilol