Program for renames clause, COBOL Programming

PROGRAM FOR RENAMES CLAUSE:

identification division.

program- id.

environment division.

data division.

working-storage section.

01 emp.

     02 empdet.

        03 name pic x(25).

        03 age  pic 9(3).

        03 sal  pic 9(6).

 

       66 paydet renames name thru sal.

  procedure division.

  p1.

    display(1 1) erase.

    display(5 5) "Name : ".

    accept name.

    display(7 5) "Age : ".

    accept age.

    display(9 5) "Sal : ".

    accept sal.

    display(1 1) erase.

    display(5 5) "Details (Renaming used) : " paydet.

    stop run.

Posted Date: 10/17/2012 7:51:10 AM | Location : United States







Related Discussions:- Program for renames clause, Assignment Help, Ask Question on Program for renames clause, Get Answer, Expert's Help, Program for renames clause Discussions

Write discussion on Program for renames clause
Your posts are moderated
Related Questions
Illustration of perform statement: PERFORM    CALCUALTE-TAX. In this illustration, the CALCULATE-TAX is either a section name or paragraph name. Assume that it is a section

BLANK WHEN ZERO: BLANK WHEN ZERO is an editing clause that may be used along with a picture. This will set the whole data item to blanks of its value is equal to zero. Though,

RULES FOR INDEXED TABLES: The rules of indexing a table with an INDEXED phrase are as shown below: (1) If indexing is completed for any one level of a table, then indexing

Common form of the READ statements: Format 1 is the common form of the READ statements. Format 2 is used when the access mode is either random or dynamic. For illustration,

Block Size: The normal practice is to group a number of consecutive records to form that is termed as a block or a physical record. The number of records in a block is frequen

WRITE statement: The WRITE statement for tape and sequential-disk files has the syntax shown below. WRITE            record-name      [  FROM    identifier   ] As a resu

Example of Redefines clause: This illustration describes a sales record that may either contain the total amount of sale or the quantity (QTY) and UNIT-PRICE. The aim of such

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

Illustration of Search verb: To illustrate the other use of SEARCH verb, assume we wish to search the similar tab to find the number of persons whose deposited amount is more

STATEMENTS FOR SEQUENTIAL FILES: A basic operation on a file includes the reading and writing of its records. Whenever the file is sequential, there are three verbs for the