[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Information hiding

From: john Culleton
Subject: Re: [open-cobol-list] Information hiding
Date: Fri, 1 Mar 2013 13:17:20 -0500

On Thu, 28 Feb 2013 01:10:34 -0500
Patrick <address@hidden> wrote:

> Hi Everyone
> I am studying Cobol everyday and making progress. I do have a
> question about information hiding though.
> In most languages I have encountered there is some sort of
> associative array. If we have arrays foo and boo they could both have
> a key doo. doo is local to the array. In Cobol it looks like
> everything in the working storage section is global.  I realize that
> with foo.doo and boo.doo there are not really two doo variables as
> they are part of a larger structure but for simplicity sake, we could
> sort of think of them as two variables. Is it possible to create this
> in Cobol?
> I could imagine needing to use the same name twice. I thought that
> the 05 tagged variables were local to their 01 parent but it now
> seems that they are sort of tethered together with it but also global.
> Thanks for reading, hope this email was clear, I am pretty
> sleepy-Patrick

Don't forget the indexed sequential file format. You can have one
primary key (required) and several secondary keys. This can be a
good substitute for an in-memory table, depending on the
application of course.  See pages 4-9,6-70 and 6-74 in the
Manual. I seldom use tables in COBOL.
John Culleton
Wexford Press
Free list of books for self-publishers:
PDF e-book: "Create Book Covers with Scribus"
available at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]