COBCH1176 Literal is greater in length than data item

When compiling with mainframe dialects, this warning is produced when a data item is compared with a literal of greater length.

Resolution:

Correct the length of the literal and/or data item as required; then recompile.

Example:

In the following example, the X1 data item is shorter than the literal string provided for the test, ABC. Increase the size of the X1 data item to accommodate the ABC literal.

      $set warning(2) vsc2
       01 x1 pic x(2).
       01 n1 pic 9(2).
           if x1 = "ABC"
               display "Possibly"
           end-if
           if n1 = 123
               display "Possibly"
           end-if