Multi-dimensional tables, COBOL Programming

Assignment Help:

MULTI-DIMENSIONAL TABLES:

The type of table which has been considered above is known as one-dimensional table. Whenever a table is such that each of its elements in turn is a table of one dimension, it is known as the two-dimensional table. The illustration of a two-dimensional table is as shown below:

01  SALES-TABLE

             02  BRANCH-FIGURES OCCURS  18  TIMES.

    03  MONTHLY-SALES  PIC  9(6)  V99  OCCURS  12

  TIMES.

The table is supposed to store monthly sales figures for 12 months for each of the 18 branches of an organization. Keep in mind that this is a two-dimensional table as each of the 18 BRANCH-FIGURES is itself a table having 12 elements. It might be further noted that a reference to an element of a two-dimensional table needs two subscripts. We should specify the branch as well as the month so that the preferred element is identified. Therefore, the MONTHLY-SALES (3, 5) means that the sales figure for fifth month of the third branch. Because of the organization identified in the above description of the table, the initial subscript implicitly refers to the branch and the second subscript to the month. The two-dimensional table has been separated first into 18 one-dimensional tables through the entry at level 02. Each of such tables has then been defined by the entry at level 03. This organization can be shown diagrammatically as:

1355_MULTI-DIMENSIONAL TABLES.png

If needed, the tables for the individual branches can be referred to by the name BRANCH-FIGURE with only one subscript specifying the branch. Therefore the BRANCH-FIGURE (4) will show the monthly sales table for the fourth branch. \


Related Discussions:- Multi-dimensional tables

.QUADRATIC EQN ROOTS, TO WRITE A QUADRATIC EQN ROOTS ARE COMPLEX IN COBOL P...

TO WRITE A QUADRATIC EQN ROOTS ARE COMPLEX IN COBOL PROGRAM

Edit characters for numeric data, Edit Characters for Numeric Data: Th...

Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing.   Z    *  $  -    +    CR    DB    .    ,    B    O    /

Example of perform statement, Example of Perform statement: PERFORM BE...

Example of Perform statement: PERFORM BEGIN-CALCULATION THRU END-CALCULATION. Assume, BEGIN-CALCULATION and END-CALCULTION is paragraph names. The execution of the PERFORM

Example of sign condition , Example of Sign condition: The illustratio...

Example of Sign condition: The illustration below describes the use of the sign condition. Illustration:     77  BALANCE  PIC  S9 (6) V99.       .       .     I

Program for output file that can be our vsam file, We have input file, reco...

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 f

Program using occurs clause, PROGRAM USING OCCURS CLAUSE: We have to w...

PROGRAM USING OCCURS CLAUSE: We have to write a simple program to demonstrate Occurs Clause. Get the employee details for 3 persons and compute the total salary. identifica

Updating of the relative and indexed files, UPDATING OF THE RELATIVE AND IN...

UPDATING OF THE RELATIVE AND INDEXED FILES: The Sequential files are updated by creating a new master file from an existing old master file and a transaction file. Such an Upda

Indexed tables, INDEXED TABLES: The OCCURS clause that is used to defi...

INDEXED TABLES: The OCCURS clause that is used to define tables can optionally have an INDEXED phrase. This phrase involves the names of data items which are to be used as sub

Occurs clause - program, OCCURS CLAUSE - PROGRAM: We have to write a p...

OCCURS CLAUSE - PROGRAM: We have to write a program to demonstrate the occurs clause. Get names of the students and show them on the screen.  identification division.

Example of constructing an arithmetic expression, Example of constructing a...

Example of constructing an arithmetic expression: An arithmetic expression may be proceeded by a + or - sign. These operations are known as unary + or unary - operators. Il

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd