Dynamic Array



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: Dynamic Array

Postby BillyBoyo » Tue Jan 24, 2012 3:02 pm

I hope I understand as well.

There is not even a point in pseudo-coding it. The use of a large table is the same as the use of a small, or middle-size, or any-sized, table.

To get some heap storage from the Language Environment involves a CALL. Not really worth pseudo-coding. There are readily-available examples of doing this in IBM manuals.

The code that may be additional for a requirement that is actually best-fulfilled by a/some huge table(s) is specific to that requirement, and is out-of-the-ordinary, and it is not much use to invent for a "general" situation when I feel that in almost all cases there are better ways to service the requirement.

Large tales in themselves are not difficult to code. Using LE Heap Storage is not difficult to code. Large tables and large amounts of Heap Storage are not generally good things to use in your environment. If I was doing a "code review" I would not let such a solution go further if there was a better way to do it differently. Which would mean your time wasted and your part of the project late as you have to start again.

Bill Woodger wrote:So, no, I'm not going to show you how to do it. It is simple enough coding that you can achieve your aim through research. Other than a knowledge exercise, I hope you don't do it.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Dynamic Array

Postby Robert Sample » Tue Jan 24, 2012 3:43 pm

Can you provide the solution for learners like me
Sure sounds like you're asking for code here. If not code, what other solution did you mean?

You develop the solution just like any other coding problem in IT -- you look at the outputs you need, you look at the inputs you have, and you determine -- step by step -- the processing required to transform the inputs into outputs. Once you understand the processing well enough (pseudocode helps a lot with this), you can write COBOL (or C or BASIC or FORTRAN or Perl or whatever the language of your choice is) code to implement the processing.

The IBM COBOL manuals (Application Programming Reference and Application Programming Guide) both have many examples of code in them -- for handling tables and files among other techniques -- and you would be well-served by spending the time it takes to go through them, thoroughly. Once you've done that, spending some time in the Language Environment bookshelf pays big dividends as well.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post