Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

NAT1316 Index not within array structure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
Ashish.Srivastava.123

New User


Joined: 29 Jun 2014
Posts: 16
Location: India

PostPosted: Thu Feb 26, 2015 4:27 am    Post subject: NAT1316 Index not within array structure
Reply with quote

Hi All,

I am facing run time error in the program. This is working fine with Test data but when I run the program with Prod data , it errors out.

I am new to NATURAL and it is difficult to get its documentation also.
Can someone suggest/guide me. I know I have to increase the array size but I am not able to do it as I get compile errors.

Error message
Page 1
EXTRACTING DATA FROM FDT FILE 159 DBID 3
PROGABCD 1130 NAT1316 Index not within array structure.
NEXT FIN
NAT9978 ERROR OCCURRED DURING EXECUTION/COMPILATION

Explanation


Tx *** Short Text ***

Index not within array structure.

Ex *** Explanation ***

The index specified for an array is not within the dimensions
defined for the array.

Ac *** Recommended Action ***

Check program and correct error.


Code:


 MOVE *ISN TO DB2-XXXA_XXX_G_DETAIL_DATA.ISN   
 MOVE C*XXX-G-DETAIL-DATA TO #MAX               
 FOR #I1 = 1 TO #MAX                             
   IF DDM-VIEW.XXX-C-TAX-CODE   (#I1) NE ' ' OR  <-- ERROR LINE
      DDM-VIEW.XXX-A-TAX-LLL   (#I1) NE 0   OR 
      DDM-VIEW.XXX-A-TAX-CURR   (#I1) NE 0   OR 
      DDM-VIEW.XXX-A-TAX-CURR-ER(#I1) NE 0       


01 DDM-VIEW VIEW OF XXXA 
   02 XXX-N-EMPLID /* (A11)
   02 XXX-D-PAYDT /* (A8) 
--
--
--
02 XXX-I-SUB-TYPE /* (A3)                             
 02 XXX-G-DETAIL-DATA (40)                             
   /* PE GROUP - SET OCCURENCES LOWER IF ERROR OCCURS   
   03 XXX-C-TAX-CODE /* (A6)                           
   03 XXX-A-TAX-LLL /* (P9.2)                         
   03 XXX-A-TAX-CURR /* (P9.2)                         
   03 XXX-A-TAX-CURR-ER /* (P9.2)                     
 02 C*XXX-G-DETAIL-DATA /* (N3)


Thanks
Ashishsr123
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Thu Feb 26, 2015 7:01 am    Post subject: Reply to: NAT1316 Index not within array structure
Reply with quote

Looks like you have some data where C*XXX-G-DETAIL-DATA which is not in the range one to 40. You have to find that record(s) and see what is wrong with it(them).
Back to top
View user's profile Send private message
Ashish.Srivastava.123

New User


Joined: 29 Jun 2014
Posts: 16
Location: India

PostPosted: Thu Feb 26, 2015 12:27 pm    Post subject: Reply to: NAT1316 Index not within array structure
Reply with quote

You are right , I put some display statements. 'C*XXX-G-DETAIL-DATA' is normally is 40 but it goes to 50 and program abends.

This could be data issue or we could increase array size.

I tried increasing array size but got below error.

Tx *** Short Text ***

Storage overflow while creating format buffers.

Ex *** Explanation ***

An overflow condition has occurred in the buffer used to store format
buffers which define the fields to be read from the database.

* Recommended Action ***

Reduce the number of files or number of fields referenced from the
database, reduce the program size, or ask your NATURAL administrator
if the USIZE parameter value can be increased.


Code:

02 XXX-G-DETAIL-DATA (50)    <-- changed to 50 from 40                         
   /* PE GROUP - SET OCCURENCES LOWER IF ERROR OCCURS   
   03 XXX-C-TAX-CODE /* (A6)                           
   03 XXX-A-TAX-LLL /* (P9.2)                         
   03 XXX-A-TAX-CURR /* (P9.2)                         
   03 XXX-A-TAX-CURR-ER /* (P9.2) 


[/code]
Back to top
View user's profile Send private message
Ralph Zbrog

New User


Joined: 21 Nov 2009
Posts: 58
Location: California

PostPosted: Fri Feb 27, 2015 2:42 am    Post subject: Reply to: NAT1316 Index not within array structure
Reply with quote

The C* variable (C*XXX-G-DETAIL-DATA) tells you how many occurrences are in the record, but you retrieve only 40. The 1316 tells you that you are trying to access occurrences that were not retrieved. The error will be corrected with the index range increase from 40 to 50, unless there are records with more than 50 occurrences.

To correct the format buffer error, move the number of occurrences from the group name to the individual fields. To simplify maintenance, use a named constant.
Code:
1 #MAX-O (I4)  CONST <50>

Code:
02 XXX-G-DETAIL-DATA
   /* PE GROUP - SET OCCURENCES LOWER IF ERROR OCCURS   
   03 XXX-C-TAX-CODE (#MAX-O)  /* (A6)                           
   03 XXX-A-TAX-LLL (#MAX-O)   /* (P9.2)                         
   03 XXX-A-TAX-CURR (#MAX-O)   /* (P9.2)                         
   03 XXX-A-TAX-CURR-ER (#MAX-O)   /* (P9.2)
Back to top
View user's profile Send private message
Ashish.Srivastava.123

New User


Joined: 29 Jun 2014
Posts: 16
Location: India

PostPosted: Fri Feb 27, 2015 8:45 pm    Post subject: Reply to: NAT1316 Index not within array structure
Reply with quote

Hi Ralph ,

Thanks a million , it worked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm
No new posts Drop building Alternate Index for a p... bhavin.mehta JCL & VSAM 6 Mon Jul 04, 2016 3:47 pm
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
No new posts VSAM Alternate Index in CICS jacobdng CICS 2 Fri May 06, 2016 1:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us