Troubleshooting
Problem
This document describes various ways that message MCH0601 can be caused and prevented within an SQL application.
Resolving The Problem
This document describes various ways that message MCH0601 can be caused and prevented within an SQL application.
Message ID . . . . . . . . . : MCH0601
Message file . . . . . . . . : QCPFMSG
Library . . . . . . . . . : QSYS
Message . . . . : Space offset &2 is outside current limit for object &1
Cause . . . . . . : You tried to operate outside the specified space or to set the space pointer outside the specified space. The object referred to is &1. The offset specified is &2. The instruction ended.
Typical Causes
This is most often due to a programming error.
The from and to program as shown in the job log are the primary suspects. These programs might be operating system or user programs. Most of the problems are user program problems. One way to cause this message is to open a file with a buffer that does not match what the program is expecting. The same is true of a program that attempts to read or write a record that is longer than the actual record in the program-described file.
If the from and to programs are system programs, there might be a software bug. If the from and to program is QSQROUTE or some other QSQ module, the error might be in the coding of the user or third-party program that is using SQL. This is often seen in COBOL programs that have defined arrays that do not fit the results coming from SQL.
Resolution
Debugging the programs is usually the only way to resolve the problem. For example, match the program's file description to the actual record length in the file.
Historical Number
5141038
Was this topic helpful?
Document Information
Modified date:
11 November 2019
UID
nas8N1013213