My recollection [perhaps faulty after all these years] is that when the
SC03 Abend was first introduced that there was auto-close capability at
the job step task termination level that was independent the programming
language. The IEC999I message that indicates that a DEB could not be
properly closed during task close processing is definitely an MVS
message, not from COBOL or LE. The cases where you got the IEC999I and
SC03 were when the storage containing the open DCB could not be
accessed, so that MVS lacked some of the basic control blocks expected
for the auto-close process. This could happen because a module
containing the OPEN DCB had been free-mained before termination, or if a
serious program bug resulted in DCB storage being overwritten.
While there are probably many scenarios where this could happen, one of
the most common in our shop involved a batch DB2 program invoked via the
DB2 DSN command under batch TSO. This form of invocation guaranteed
that the application module (and its DCBs) was long gone by step
termination time, and the SC03 introduction caught a number of programs
that were failing to properly close files.
ABEND SC03 closed a possible opportunity for undetected data loss. If
an output file is not properly closed, there could potentially be
records sitting in buffers that are never written to the actual file.
Prior to introducing the SC03 ABEND, there was no abnormal step
completion status to warn you of this exposure.
Rolf Ernst wrote:
Clark,
the question is to which lengths COBOL goes to determine which files
were opened. Since you indicated the files were opened (and not closed)
by a BAL subroutine, the COBOL code may not even be aware of it. It does
take a bit of poking around to find the DECBs anyhow.
However, since you indicate that you are dealing with VSAM files - are
the ACBs that the subroutine used around at all? Has this storage not
been freed? As long as you have no activity you would not find out until
it's closing time, whether COBOL intends to clean up or someone else.
/re
Clark Morris wrote:
On 22 Jun 2005 15:56:11 -0700, in bit.listserv.ibm-main you wrote:
If my old addled brain is thinking correctly, I believe over 10 years
ago
IBM decided to no longer be nice to programs and require that all
programs
close any files they open. And if they did not close them, the
system would
then issue a SC03 abend.
Probably true for Assembler. The 85 COBOL standard requires COBOL to
clean up after itself and close all OPEN files on a STOP RUN. By
implication GOBACK from a main program probably also does the same
thing but I don't have a compiler and system to test it. Still it is
bad practice not to close all files.
Of course I am wondering what the need for an assembler routine is in
the case that prompted the original posting.
...
--
Joel C. Ewing, Fort Smith, AR [EMAIL PROTECTED]
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html