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
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

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us

PERFORM STATEMENT:   The PERFORM statement can be used to execute the group of consecutive statements written elsewhere in the program. We refer to this group of statements a

Selection of file Organization: While designing a file, the programmer should select an appropriate association for a file. The order in which the choice is to be made is as s

PROGRAM FOR PERFORM - VARYING: We have to write a program to elaborate PERFORM ...VARYING Identification division. Program- id. PerfVary. Environment division. Dat

CONDITION - COBOL Programming: The condition is an entity which at one point of time can have only one of the two values - true or false. As we already know that, the IF verb

REWRITE STATEMENT: The REWRITE statement has the format for a relative file as shown below, REWRITE record-name  [ FORM identifier ]

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:

single program how may when statement has used