IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REDEFINES a SMALLER ITEM


IBM Mainframe Forums -> COBOL Programming
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Mohan raj

New User


Joined: 08 Aug 2009
Posts: 1
Location: Chennai

PostPosted: Fri Aug 21, 2009 6:45 pm
Reply with quote

Hi,

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.

Example:
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.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 21, 2009 6:59 pm
Reply with quote

I've never heard of any way to control the severity level of compiler messages -- what they are set by IBM is what they are, period.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Aug 21, 2009 7:38 pm
Reply with quote

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.
Back to top
View user's profile Send private message
fairplay27

New User


Joined: 20 Mar 2009
Posts: 1
Location: Italy

PostPosted: Fri May 04, 2018 6:25 pm
Reply with quote

Some years after this thread I may read in the manuals that it's possible to change some compiler message severity:

For Cobol 5.2 :

Cobol 5.2 Programming Guide


...
As examples, you can:
...
Disallow REDEFINING a smaller item with a larger item by raising the severity of message 1154.
...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TSQ Item Count increments to plus 1 CICS 1
No new posts Cobol redefines for Signed pictured c... COBOL Programming 4
No new posts Moving a COMP-3 Variable to a Numeric... COBOL Programming 2
No new posts Compiler option for override the exte... COBOL Programming 9
No new posts Another redefines in COBOL COBOL Programming 1
Search our Forums:

Back to Top