Re: MV Keys

From: dawn <dawnwolthuis_at_gmail.com>
Date: 3 Mar 2006 06:44:24 -0800
Message-ID: <1141397064.340312.148370_at_j33g2000cwa.googlegroups.com>


Marshall Spight wrote:
> dawn wrote:
> >
> > I'm catching up, but I don't think this is what Codd meant by the
> > phrase "repeating group." We used to use "repeating group" to refer to
> > data defined with an OCCURS clause in COBOL, for example.
>
> Since I'm a languages geek, I can maybe understand what you mean
> if you use terminology based on such languages as C, C++, Java,
> Fortran, Ratfor, SML, Haskell, Lisp, Scheme, Prolog, Eiffel, Erlang,
> Icon, Python, Ruby, Smalltalk, C#, BASIC, Clean, Nice, Scala,
> Sawzall, Javascript, Mercury, Sather, Oz, OOK*, Turing machines,
> or the lambda calculus.
>
> COBOL, not so much.

OK, but that's my language of choice ;-)

> What, may I ask, is an OCCURS clause?

I would have called it an array, but thought there could be a nuance worth capturing in that it is within a record definition. IIRC (haven't actually looked at COBOL since 1989) you might define a record for a file (such as VSAM) like

01 MYRECORD.
    03 FIRSTNAME PIC X(18).
    03 LASTNAME PIC X(36).
    03 EMAILS PIC X(60) OCCURS 10.
    03 PHONES OCCURS 40.

         05 PHONETYPE  PIC X.
         05 PHONENUMBER PIC X(10).

Both EMAILS and PHONES would be repeating groups in this record. --dawn Received on Fri Mar 03 2006 - 15:44:24 CET

Original text of this message