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
we have input file ,record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input file

RULES OF MOVE VERB:  The Data movement is managed by the rules which are as shown below: (a) The contents of the identifier - 1 or the value of the literal - 1 is moved to

ARITHMETIC VERBS: Most of the problems need some computations to be performed on the input or intermediate data that are numeric in nature. The Arithmetic verbs are used to pe

Currency Sign - edit characters for numeric data: $ (Currency Sign): The single currency sign can appear at the leftmost place of a picture. In that situation the $ cha

INPUT AND OUTPUT PROCEDURE IN SORT STATEMENT: The common format of the SORT statement can write as shown below: The format of the RELEASE statement is as shown be

SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various

ADD VERB: The ADD Verb can be used to find the sum of two or more numbers and to store the sum.  The ADD verb takes any one of the two forms as shown below:

PROGRAM TO FIND INTEREST ON BANK DEPOSITS: We have to write a program to find interest on deposits. The criteria is given below : identification division. program-

Comparison of Numeric Operands: We are well-known with the kind of the relational condition where both the operands are numeric. The comparison in this situation is algebraic

COMPUTE VERB: The COMPUTE verb is very powerful. All the evaluations performed by the other 4 verbs can also be completed easily by using the COMPUTE verb. Its normal format i