When a (Working Storage) variable is declared with the format 'PIC S9(n)V9(n) SIGN LEADING' cobol-check fails to recognize is as numeric. The subsequent comparison in the expect statement is (default) alfa-numeric.
To insure the comparison in the expect is correct and trustworthy, the data type must be numeric.
The problem be reproduced by adding a variable to a program with this type of format. Then perform an expect.
You can now se the comparison is alfa-numeric in the generated program.