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
Example of Special-names: Consider the illustration: Let the SPECIAL-NAMES paragraph be as shown: SPECIAL-NAMES. CHANNEL 1 IS PAGE-TOP. The Channel is related with the t

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

DELETE STATEMENT: The format of the delete statement is as shown below: DELETE   file-name RECORD   [  ;   INVALID   KEY  imperative-statement  ] Whenever the ACCESS MOD

How do I move a single QUOTE to a field or set the value clause? "''" does not work?

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

Program for Sequential File Creation & Rewriting  We have to write a program to create a Length file with just two fields: l (Length) and l-c (Length-Code). Add a few records.

PROGRAM FOR ELECTRICITY BILL: An electricity company supplies electricity to 4 types of customers coded 1, 2, 3 & 4.The rate schedule for customers is shown in one table as

PROGRAM FOR IF :   We have to write a program to check whether the given number is ODD or EVEN. Identification division. Program- id. Ifst. Environment division.

SIMPLE MERGE VERB: Like sorting, the merging of files is often required in different commercial application. It is likely to merge two or more files with the help of one MERGE

Column and Field in COBOL program: In COBOL there are 2 types of entries termed as margin A and margin B entries. The Margin A entries start from the column 8, 9, 10 or 11 and