RP4 *DATE INCREMENT returns “array index out of range” error when calculating past dates using negative day values
search cancel

RP4 *DATE INCREMENT returns “array index out of range” error when calculating past dates using negative day values

book

Article ID: 421255

calendar_today

Updated On:

Products

CA 2E

Issue/Introduction

Consider the following scenario:

  1. Create an EEF function and call the *DATE INCREMENT BIF with a *Duration parameter using negative days, and specify a *Date List name.
  2. Generate the EEF as RP4.
  3. During runtime execution, the function fails with an “array index out of range” error.

Environment

CA 2E 8.7.3 to 8.7.4

Cause

In the generator program, the result indicator was incorrectly reused during duplicate detection in the *Date Lists array. This caused the indicator to become unsynchronized with the Result value used by %LOOKUP, leading to inconsistent date calculations. When the *DATE INCREMENT logic processed negative day increments in the RP4 runtime environment, the mismatched indicator caused invalid array indexing, resulting in the “array index out of range” error.

Resolution

Open a support case and request PTF "Y287427843".