Program for move corresponding, COBOL Programming

PROGRAM FOR MOVE CORRESPONDING:

We have to write a simple program to demonstrate Move Corresponding.

identification division.

  program- id.

  environment division.

  data division.

  working-storage section.

  01  rec-1.

    02   sno   pic  9(2) value 11.

    02   name  pic  x(4) value "Ravi".

  01  rec-2.

    05   sno   pic  z(2).

    05   f    pic  x(10) value spaces.

              05   name   pic  x(4).

    05   f    pic  x(10) value spaces.

  procedure division.

  p-1.

    display(1 1) erase.  

    move corr rec-1 to rec-2.

    display rec-2.

    stop run.

Posted Date: 10/18/2012 2:04:01 AM | Location : United States







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

Write discussion on Program for move corresponding
Your posts are moderated
Related Questions
PROGRAM FOR CONDITION NAMES: We have to write a simple program to demonstrate Condition names usage.  identification division.   program- id.   environment division.

FILE CHARACTERISTICS: The task of file handling is the responsibility of the system software termed as IOCS (Input-Output control system). Record Size: We know that th

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

PERFORM WITH TIMES OPTION: The format of a PERFORM TIMES statement is as shown below: Illustration:   A)  Perform the para-2 5 times. In this situation the specifie

PROGRAM FOR SCREEN SECTION:  identification division.   program- id.   environment division.   data division.   working-storage section.   01  a pic 9(2) value

Label Records / Disk Directory: The most important information stored in the header label is what is termed as the file title. In the situation of magnetic-disk files the labe

Example of Perform statement: PERFORM BEGIN-CALCULATION THRU END-CALCULATION. Assume, BEGIN-CALCULATION and END-CALCULTION is paragraph names. The execution of the PERFORM

PERFORM WITH VARYING OPTION: The format is as shown below:

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

Example of If- else statement Illustration:   IF   QUANTITY IS NUMERIC AND QUANTITY IS POSITIVE          MOVE ZERO TO ERROR-CODE. COMPUTE SALES VALUE=QUANTITY*RATE