Skip to main content

Problem:

This is working as defined in the IBM COBOL documentation:

Title: COBOL Language Reference

Document Number: SC26-9046-04

Build Date: 09/27/10 03:08:01 Build Version: 1.3.0

Book Path: /home/publib/epubs/book/igylr205.boo

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igylr205/6.2.40.5

After the WRITE statement is executed, the logical record is no longer available in record-name-1, unless:

Resolution:

The associated file is named in a SAME RECORD AREA clause (in which case, the record is also available as a record of the other files named in the SAME RECORD AREA clause),

                     or

The WRITE statement is unsuccessful because of a boundary violation

A  WRITE followed by a an ADD of a FD field should fail as well, but the IBM documentation states one thing while their code does another.  

Micro Focus is helping the customer by catching such coding errors. I haven't checked the ANSI standards, but I suspect they use the same wording since IBM normally places extensions in blue in their printed docs and labels them in their online docs.

Old KB# 6635

#MFDS
#EnterpriseDeveloper