Concept of a two-dimensional table, COBOL Programming

Concept of a two-dimensional table:

Concept of a two-dimensional table can be easily extended to tables having three or more dimensions. The Handling of tables up to three dimensions is permitted by most compilers; some even allow more than three. The rules below may be noted in connection with multi-dimensional tables.

(i)  The Multi-dimensional tables are to be defined as records with OCCURS clauses at different levels. As we go down the hierarchy, each lower level item with an OCCURS clause identifies an additional dimension. For illustration, consider the table shown below:

(ii)         

1049_Concept of a two-dimensional table.png

2053_Concept of a two-dimensional table1.png

A & C are one-dimensional, F is a two-dimensional table and E is a three dimensional table. B & D are group items that can be referred to as one-dimensional and two dimensional tables correspondingly. 

 

 (ii)  A table is stored in such a way that a subscript on the right of the other subscript changes more rapidly than the later.

The organization of the SALES-TABLE shown above describes this. The elements MONTHLY-SALES (1, 12) are stored first. The elements MONTHLY-SALES (2, 1) to

MONTHLY-SALES (2, 12) are stored next, and so on. Keep in mind that the second subscript is changed more regularly than the first subscript. This fact must be taken into consideration while redefining a multi-dimensional table.

(iii)  The Multiple subscripts must be separated from one another either by a space or comma.  

Posted Date: 10/18/2012 1:39:00 AM | Location : United States







Related Discussions:- Concept of a two-dimensional table, Assignment Help, Ask Question on Concept of a two-dimensional table, Get Answer, Expert's Help, Concept of a two-dimensional table Discussions

Write discussion on Concept of a two-dimensional table
Your posts are moderated
Related Questions
Can u please let me know how can i use SSA''s in IMS while fetching segments. Thanks, Rajesh

PROGRAM FOR SCREEN SECTION:  identification division.   program- id.   environment division.   data division.   working-storage section.   01  a pic 9(2) value

NONSTANDARD CLAUSES: The various clauses explained above are as per the ANSI standard. Also, most compilers provide for additional nonstandard clauses to meet the specific nec

Occurs Clause: Let us establish tables with the help of an illustration. Assume that there are ten different types of income-tax rates that are read from some input medium and

Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an

PROGRAM FOR RENAMES CLAUSE: identification division. program- id. environment division. data division. working-storage section. 01 emp.      02 empdet.

Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu

Picture Clause: The picture clause explains the general characteristics of an elementary data item. These characteristics are elaborated below: Class: In COBOL the

Figurative Constants: The Figurative constants have several fixed names and the compiler recognizes these names and it sets up the equivalent values in the object program.

RESERVE clause: This clause indicates the number of buffers to be used for the file. Integer-1 specifies this number. ORGANIZATION/ACCESS clause: These two clause