Operating System - OpenVMS
1753411 Members
7070 Online
108793 Solutions
New Discussion

How to determine the limit to a table in a VAX Cobol program

 
SOLVED
Go to solution
yaron1
Advisor

How to determine the limit to a table in a VAX Cobol program

Hi,

Does anybody know how can I determine the limit to a table in a VAX Cobol program? When I say table I mean an array, a vector, with the OCCURS … TIMES. Of course that would depend on many factors. so if anyone can suggest how to determine it or point a document about it that would be good.

Thanks, Yaron
8 REPLIES 8
Hoff
Honored Contributor

Re: How to determine the limit to a table in a VAX Cobol program

Would you mind providing some background on the particular requirement here?

A solution here might well involve examining the particular underlying OpenVMS descriptor data structure, for instance. (Haven't looked underneath COBOL, but Pascal certainly makes effective use of these structures to carefully define its structures.)

Or it might simply be appropriate to pass the size information along with the array.

What are you up to, in other words? (Direct questions don't necessarily always get the best available answers, in other words.)

yaron1
Advisor

Re: How to determine the limit to a table in a VAX Cobol program

Hi,
The data structure is a one dimension array of 6 alphanumeric characters for each cell or occurrence, I need to extend it. It already has 2500 occurrences.

thanks,
Hoff
Honored Contributor

Re: How to determine the limit to a table in a VAX Cobol program

Your questions and responses both here and elsewhere in ITRC can be inferred as seeking assistance with an exam question, or as seeking assistance with a run-time application error. I'm not sure which of these two is your goal here, and the answers and information involved will obviously differ depending on what your particular goal is.

If you're working with an application error, please post up the system and compiler version information, some source code from the data division, and the error message(s) generated when you try making your coding changes. Usually, this is little more than cranking up the value in OCCURS n TIMES in the data division, so there is probably something else going on here.

If this is a test question and you are looking for some relevant background information for that goal, please read up on the virtual address space design of OpenVMS VAX -- the chief resource here is a book known as the Internals and Data Structures Manual (IDSM), do look around for the INSVIRMEM discussions, and also take a look at the limits described within the COBOL documentation. Current COBOL has documented limits around the OCCURS n TIMES syntax, in addition to the virtual memory limits. Also consider running some tests, and see what happens, too.

Had I created a test question such as what can be inferred as the question here (and if this is a test question you're looking for help on), I would be looking for knowledge both of the COBOL limits and of the target OpenVMS platform limits. There are discussions of virtual memory around too, as this discussion inevitably gets involved in similar questions. There are a bunch of related discussions, including paging and locality and...

The current OpenVMS and the current COBOL documentation is available at http://www.hp.com/go/openvms/doc

The IDSM itself is available only in printed form, though most schools and most businesses using OpenVMS will have one or more copies around. If this is a test question or an application question, the IDSM can definitely help explain how OpenVMS itself works.

Your local COBOL environment may well have different (and potentially lower) limits here. OpenVMS VAX definitely has more constrained addressing limits, though I don't know off-hand if the current COBOL has gone fully 64-bit. VAX COBOL is definitely not 64-bit, however.

Arch_Muthiah
Honored Contributor

Re: How to determine the limit to a table in a VAX Cobol program

Yaron,

Please go through this thread and it would be better to past the error meesage and the portion of your source possibly the table declaration portion and any specific usuage of that table would be good enough to further assist you.

http://h18000.www1.hp.com/info/SP4816/SP4816PF.PDF


Archunan
Regards
Archie
Arch_Muthiah
Honored Contributor

Re: How to determine the limit to a table in a VAX Cobol program

Oops!!!, the URL on my prev answer was totally incorrect, by mistake I pasted there.
This is the URL I wanted to give for your reference.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1039791


Archunan
Regards
Archie
Bojan Nemec
Honored Contributor

Re: How to determine the limit to a table in a VAX Cobol program

Yaron,

An array of 2500 * 6 characters (bytes) is not so big. It is less than 15K. You can simply determine the size of the table by multiplying the size of the single table element by the occurences. The table in COBOL is a single portion of contiguous memory without any aditional bytes. The times number can be up to 2,147,483,647 (2G ocurences) but you must take care of the memory size of P0 user space which is 1G and the user quota limits.

The compiler implementation specifications (read as limits) are described in the COBOL User Manual:

http://h71000.www7.hp.com/doc/82final/6297/6297pro_112.html#index_x_2271

The link is to the last COBOL version, so you should search for yours version.

Bojan
Richard J Maher
Trusted Contributor
Solution

Re: How to determine the limit to a table in a VAX Cobol program

Hi

As others have said, just extend it. I have seen (and used) some *big* tables and yours aint it. Things to watch-out for are any "redefines" clause and if your table gets over 65535 bytes and you're used to manipulating the whole structure with single MOVEs then they'll break. Also COBOL does not use VMS array descriptor classes so if you're passing the table to a subroutine you may want to check that the sub-program knows about any change in length.

Cheers Richard Maher
Ken Feese
Occasional Advisor

Re: How to determine the limit to a table in a VAX Cobol program

just saw this post and thought i'd reply but the answer is fairly simple, at least to me.

The data dictates the size of the table so in your Cobol program use OCCURS 1 TO X depending on MAX-TABLE-SIZE should do the trick for you