We have declared the array like below one,
DCL A FIXED BIN(31) INIT(0);
DCL I FIXED BIN(31) INIT(0);
DCL AY(*) CHAR(1) CONTROLLED;
A = 2147483647;
FREE AY;
PUT SKIP LIST('BEFORE ALLOCATE');
ALLOCATE AY(A) CHAR(1);
PUT SKIP LIST('AFTER ALLOCATE');
DO WHILE (I <= 2147483647);
I = I + 1;
AY(I) = 'M';
END;
PUT SKIP LIST('I',I);
FREE AY;
and we got the following error in run time
********************************* TOP OF DATA **********************************
IBM0451S ONCODE=451 The STORAGE condition was raised.
From entry point SAMPLEM at compile unit offset +00000136 at entry offs
******************************** BOTTOM OF DATA ********************************
While checking for maximum array indexing , we got the limit of 2147483647 but its not working when we tried to allocate dynamically or by static.
Please provide us your suggestions
Thanks in advance!!!
Maximum limit for dynamic array allocation
Moderator: Moderator Group
-
- Member
- Posts: 2
- Joined: Wed Nov 07, 2012 4:21 pm
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Member
- Posts: 2
- Joined: Wed Nov 07, 2012 4:21 pm
If the abend happened BEFORE the allocation statement then why do you think the allocation statement is causing a problem? Which statement is at offset 136? Did you get your diagnostic 'BEFORE ALLOCATE' in your SYSPRINT. If not then either your did not even get that far or the abend was after BUT you need to double up on your PUT SKIP to ensure it comes out.
Regards
Nic
Nic
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page