IBM Support

Causes for Message MCH0601 in an SQL Application

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.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

5141038

Document Information

Modified date:
11 November 2019

UID

nas8N1013213