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

PROGRAM FOR MOVE CORRESPONDING: We have to write a simple program to demonstrate Move Corresponding. identification division.   program- id.   environment division.

PROGRAM TO DEMONSTRATE MERGE VERB: The two files for which a record having 2 fields viz. Account Number and Name are already available. Now Merge these two files and create a

TO WRITE A QUADRATIC EQN ROOTS ARE COMPLEX IN COBOL PROGRAM

IF STATEMENT: The easiest form of the IF statement is  IF condition-1 statement-1 where the condition-1 may be any one from the shown below. When the condition-1

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

ROUNDED OPTION: Let us consider the DATA DIVISION entries which are as shown below: Now, subsequent to the execution of the statement ADD A B GIVING C, the C will hold

PROGRAM FOR COMPUTE VERB: We have to write an easy program to elaborate the COMPUTE verb.  Identification division. Program- id. compverb. Environment division. Da

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

Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi