Program for renames clause, COBOL Programming


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.


    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
RENAMES CLAUSE: At times re-grouping of an elementary data items in a record may be essential so that they can belong to the original as well as to the latest group. This is o

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

When using the accept verb in cobol is it possible to assign something other then "SYSIN" for a ddname?

Data Division: The Data Division is a part of the COBOL program where every data item processed by the program is described. It is very important to note that unless a data

MOVE CORRESPONDING: It is frequently required to move some of the data items of one group to some other data items in the other group. If the names of the equivalent data item

Example of Move corresponding: Consider the DATA DIVISION entries shown below. Suppose it is needed that the data stored in the 4 fields of the PAY_REC should be

calculate simple interest

SUBTRACT VERB: The SUBTRACT verb is used to subtract one, or the sum of two or more numbers from one or more numbers and to store the result. The form of the SUBTRACT verb

OPEN STATEMENT: Whenever a READ or a WRITE operation is executed on a file, then it should be open. The opening of a file may be completed with the help of the OPEN verb. With

NONSTANDARD CLAUSES: The various clauses explained above are as per the ANSI standard. Also, most compilers provide for additional nonstandard clauses to meet the specific nec