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
PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil

PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

Major difference between file and array how does record read from array and file why we are not preparing array for real time

Second form of Divide verb: The second form of this verb is as shown below: In this situation the identifier-1 or numeric- literal-1 will be divided by identifier-2 or

MULTIPLY VERB:   The Multiply Verb causes one or more multiplicands to be multiplied by the multiplier and to store the products. The form of the MULTIPLY verb is as shown be

SPECIAL-NAMES: This paragraph is used to associate some hardware names to the user-specified mnemonic names. This paragraph is elective in all compilers. The format of this pa

WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us

GO TO, STOP RUN: The GO TO verb is used to completely transfer the control to elsewhere in the program. Its form is as shown below: GO TO procedure-name As a result o

COMPOUND CONDITION: The two simple conditions can be connected by the logical operators AND or OR to form a compound condition (also termed as combined condition). When two co

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