AS/400 flat file

620 pts.
Tags:
AS/400
Flat files
When I'm reading a flat file using pre-runtime array, I got the below run time error. Please help us.. Range of subscript value or character string error. Function check. MCH0603 unmonitored by FLAT1 at statement 0000000005, instruction X'0000'. An array index is out of range (C G D F).
................................................

Note:Record length of flat file(flat10) is 48.
FLAT10
000001 00001chow
000002 00002balu
000003 00013ram
000004 00014sai
********  End of report  ********

0001.00 FFLAT10    IT   F   48        DISK
0002.00 DARRAY            S             48A   DIM(4)  FROMFILE(FLAT10)
0003.00 DI                S              2S 0
0004.00 C                   DO        4
0005.00 C     ARRAY(I)      DSPLY
0006.00 C                   EVAL      I=I+1
0007.00 C                   ENDDO
0008.00 C                   SETON                                        LR
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

initially I is = 0, that is an invalid index. Initialize it before your loop and adjust your counter accordingly, like DOU I=5

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • chowas400
    Hi Todd,

    Now it's worked.

    Thank you very much..:)


    620 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: