I need severe error in compilation for Redefining a smaller item in "IBM Enterprise COBOL for z/OS 3.4.0". I am using the IGYCRCTL compiler.
05 VAR-A PIC X(5).
05 VAR-B REDEFINES VAR-A PIC X(10).
In compilation it is just giving a Warning message. Is it possible for me to get a SEVERE error in "Enterprise COBOL for z/OS 3.4.0" itself by using any compiler option.
Note : "IBM COBOL for OS/390 & VM 2.2.1" is giving SEVERE error.
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
Although it's not a good practice (in my opinion) to redefine a smaller area, I understand that the Enterprise compiler, unlike previous compilers, will allocate memory equal to the larger definition, so I wouldn't worry about it. As a rule, I add a filler to the smaller area to document the situation for the next maintainer.