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
PROGRAM FOR SIMPLE PERFORM: We have to write a program to elaborate simple PERFORM statement Identification division. Program- id.  Perf1. Environment division. Da

SEARCH VERB: The SEARCH verb is used to position elements in one-dimensional tables. Let us consider the following problem. Assume that each element of a table consists of thr

PROGRAM FOR PERFORM ...UNTIL We have to write a program to find the sum of "n" natural numbers. Identification division. Program- id. PerfUntil. Environment division.

START STATEMENT: The START statement places the files to the initial logical record whose record key satisfies the condition specified by the KEY phrase. The access mode shoul

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

CLOSE STATEMENT: When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is

Size: The number of characters or digits needed to store the data item in the memory in termed as the Size of the data item. All the 4 general characteristics explained can

INPUT AND OUTPUT PROCEDURE IN SORT STATEMENT: The common format of the SORT statement can write as shown below: The format of the RELEASE statement is as shown be

FILE DESCRIPTION- FIXED-LENGTH RECORDS: The normal characteristics of a file are explained in the file description (FD) entry of the DATA DIVISION.

RULES FOR OCCURS CLAUSE: The rules apply for the OCCURS clause and the subscripts are as shown below. (1) The integer in the OCCURS clause should be a positive integer.