View previous topic :: View next topic |
Author |
Message |
bala Beginner
Joined: 08 Dec 2005 Posts: 17 Topics: 6 Location: India
|
Posted: Tue Dec 13, 2005 12:25 am Post subject: Maximum Array size in PL/1 |
|
|
Hi,
My following PL/1 program abends with an error "AN OUT-OF-STORAGE ABEND HAS OCCURRED". When I try with 1271000(array limit), yes it is working. But, the same value in different program abends again.
Code: |
MAS: PROCEDURE OPTIONS(MAIN);
DCL PRO_WEEKS FIXED BIN(15) INIT(2);
DCL PRO_STORES FIXED BIN(31) INIT(1271120);
DCL 1 PROJ_ARR(PRO_WEEKS) CONTROLLED UNALIGNED,
3 WEEK FIXED BIN(15),
3 OFFSET FIXED BIN(31),
3 PROJ(PRO_STORES),
5 STORE FIXED BIN(31),
5 OUTLET CHAR(04),
5 WT_CNT FLOAT(24),
5 ACV FLOAT(24);
ALLOCATE PROJ_ARR;
PUT SKIP LIST('DONE');
END MAS;
|
Can I have answers for the following:
1)Is there any limit for array declarion in PL/1 ( from my search I got that +2147483647 to -2147483647 is the limitation. Is it so?? then why it is not working in my program??)
2) Is there any concept that this much amount of storage will be allocated to the program or it depends on the Server configuration. If yes, then array size limit will vary depends on the amount of storage required for other variables in the program. Is it so??
Thanks in advance for your reply.
Thanks,
Bala |
|
Back to top |
|
|
bauer Intermediate
Joined: 10 Oct 2003 Posts: 315 Topics: 49 Location: Germany
|
Posted: Tue Dec 13, 2005 1:44 am Post subject: |
|
|
Hi bala,
pls provide the exact error message, which version of PL/1 are you using ?
bauer |
|
Back to top |
|
|
bala Beginner
Joined: 08 Dec 2005 Posts: 17 Topics: 6 Location: India
|
Posted: Tue Dec 13, 2005 3:20 am Post subject: |
|
|
I am using PL/I VER 2 REL 3 compiler.
I got the following Error message (from the log):
IBM912I 'ONCODE'=3920
AN OUT-OF-STORAGE ABEND HAS OCCURRED.
IN STATEMENT 100120 AT OFFSET +00010C IN PROCEDURE WITH ENTRY MAS
100120 1 0 ALLOCATE PROJ_ARR; (from the compiled pgm log of MAS)
Let me know if you need more details.
Thanks,
Bala |
|
Back to top |
|
|
bauer Intermediate
Joined: 10 Oct 2003 Posts: 315 Topics: 49 Location: Germany
|
Posted: Tue Dec 13, 2005 3:44 am Post subject: |
|
|
Try to uncrease the region size, see explanation of errormessage in manual sc26-4309-2. |
|
Back to top |
|
|
bala Beginner
Joined: 08 Dec 2005 Posts: 17 Topics: 6 Location: India
|
Posted: Tue Dec 13, 2005 6:02 am Post subject: |
|
|
Yes, I have tried with Region = 0M (it takes max storage limit, hope I am right here) as well as Region = 2027M (2GB limit) also. I have got the same error. Any update do you like to give here??
(Thanks for your quick responses).
Bala |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Tue Dec 13, 2005 3:12 pm Post subject: |
|
|
perhaps 24 bits mode instead of 31? |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Tue Dec 13, 2005 4:09 pm Post subject: |
|
|
I mean does your current program address above or under the 16m line. I guess you need to address above. Is that perhaps not the case? |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Dec 13, 2005 5:29 pm Post subject: |
|
|
The max amount of storage available is dependent on lots of things; system exits (IEFUSI, et al), storage fragmentation, etc. It sounds strange, but a request for 20MB of storage is a bit large. On TSO systems I've used, I rarely have ever been able to allocate more than 30MB total, and almost never in large contiguous blocks. I guess I'd wonder about the usefulness of a million element array anyway. There isn't much you can do with it without lots of searching and arrays tend to have pretty bad performance characteristics (order n-squared) so you might find that using a different algorithm for whatever you are trying to do. If you are planning on searching this thing or sorting it, a (preferably balanced) binary tree might be a good bet. Or if PL/I has the ability to use data spaces or 64bit addressing, and I don't know if it does, that would be a good option too. Anyway, search for IEFUSI. Kolusu put out a good post about this. |
|
Back to top |
|
|
|
|