Previous Page | Next Page

Error-Handling Techniques and Error Messages

Logical Errors


Types of Logical Errors

Logical errors result from mistakes in program logic. There are two types of logical errors that can occur when you process VSAM data sets in a SAS program:


SAS Logical Errors

The SAS VSAM interface looks for logical errors before it invokes VSAM. When SAS detects an error condition, it is a SAS logical error. When SAS cannot pass a request on to VSAM because of an error in your program, the DATA step terminates, and an error message that describes the error is printed on the SAS log. The following conditions are examples of SAS logical errors:

By default, the standard INFILE statement options MISSOVER and STOPOVER are in effect for VSAM data sets, and they relate to SAS logical error conditions.

For more information on these options, refer to Processing VSAM Data Sets in SAS Programs.


VSAM Logical Errors

Errors in your program logic that VSAM detects are called VSAM logical errors. Here are some common VSAM logical errors:

When a VSAM logical error is encountered, the following automatic SAS variables are set:

  1. The _IORC_ variable is set to a value of 8. (_IORC_ contains the value of the VSAM input/output return code.)

  2. The _FDBK_ variable is set to the VSAM feedback code. Some of the _FDBK_ values depend on the type of operating system and the VSAM release in use. However, the most common values are the same for all operating systems. For more information about the VSAM logical error and feedback codes, refer to your IBM documentation.

VSAM sets the I/O return code and the feedback code and returns their values to the SAS VSAM interface. The interface makes these values available to your SAS program in the automatic SAS variables _IORC_ and _FDBK_.

Previous Page | Next Page | Top of Page