Program for add corresponding, COBOL Programming

PROGRAM FOR ADD CORRESPONDING:

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

  identification division.

  program- id.

  environment division.

  data division.

  working-storage section.

  01  rec-1.

    02   sno   pic  9(2) value 11.

    02   mark1 pic 9(2) value 1.     

  01  rec-2.

    05   sno   pic  9(2)  value 10.

    05   mark2 pic 9(2) value 2.

  procedure division.

  p-1.

    display(1 1) erase.  

    display(3 5) mark1 of rec-1.

    add corr rec-1 to rec-2.

    display(5 5) mark2 of rec-2.

display (10 5) sno of rec-2.

stop run.

Posted Date: 10/18/2012 2:03:31 AM | Location : United States







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

Write discussion on Program for add corresponding
Your posts are moderated
Related Questions
GIVING    file-name-5. The input files to be merged through the MERGE statements which are specified in the USING phrase. These files should be sequential files and should be

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

Illustration of Renames clause: In the illustration, PAT-OTHER-THAN-BASIC will become a fresh group consisting of DEARNESS-ALLOWANCE, HOUSE-RENT & MTHLY-INCENTIVE. Keep in min

Example of add verb: (a) ADD A TO B. This illustration represents that the value of A will be added to the value of B and the result will be stored in B.  The alignment of

OCCURS CLAUSE - PROGRAM: We have to write a program to elaborate occurs clause. Get names and marks of the students and show them on the screen.   identification division.

OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0

REWRITE statement: The REWRITE statement is used to update the existing record in a disk file. The normal format is as shown below: REWRIE  record-name  [  FROM      ide

Evaluate is like a case statement & Evaluate  stamenet can be used to replace nested Ifs. The difference b/w EVALUATE and case is that there is no 'break' is required for EVALUATE

PROCEDURE DIVISION statements for the indexed files: All the statements which are available for a relative file are also available for an indexed file. READ STTATEMENT :

SPECIAL-NAMES: This paragraph is used to associate some hardware names to the user-specified mnemonic names. This paragraph is elective in all compilers. The format of this pa