P. 1
COBOL - Programming Guide

COBOL - Programming Guide

|Views: 968|Likes:
Publicado pormukesh

More info:

Published by: mukesh on Jul 01, 2011
Direitos Autorais:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
See more
See less


All errors in processing a VSAM file, whether logic errors in your program or
input/output errors on the external storage media, return control to your COBOL

When an input/output statement operation fails, COBOL/VSE will not perform cor-
rective action for you.Such errors return control to your program.You choose
whether or not your program will continue executing after a less-than-severe
input/output error occurs.COBOL/VSE provides the following techniques for inter-
cepting and handling certain VSAM input/output errors:

The end-of-file phrase (AT END)
The EXCEPTION/ERROR declarative
The FILE STATUS clause (file status key and VSAM return code)
The INVALID KEY phrase

If you do not specify a file status key and you do not code a declarative, serious
VSAM processing errors can go undetected by your program.VSAM file proc-
essing problems do not usually cause an abend, and it is possible your program
will be processing wrong data.

If you continue processing after such errors occur, you may impair the integrity of
your data.Good coding practice demands that you check the status key value
after every input/output request (including OPEN and CLOSE).Each VSAM file
should have its own status key defined in your program.

For details on detecting input/output processing problems, see “Input/Output Error
Handling Techniques” on page192.

Chapter 11.Processing VSAM Files


Coding Your Program

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->