RAMESH KRISHNA REDDY mainframe discussion forum - cobol, db2,cics,jcl,file-aid,changeman,interview questions
Online Tutorials   | PREV | TOP | NEXT



DRONA SERIES
COBOL STUDY MATERIAL


COBOL VERBS - ADD



   
 COBOL VERBS - ADD




MOVE ADD ADD verb. Syntax 1 - ADD { literal-1 / data-item-1 } .. TO target-data-item-1 .. Syntax 2 - ADD { literal-1 / data-item-1 } .. GIVING target-data-item-1 .. ADD verb adds one or more numeric values and store the value into a target data item. Let us see some examples. ADD 10 TO WS-A. Before execution WS-A value is 5, after excution of above statement WS-A value will be 15. ADD WS-A WS-B GIVING WS-C. Before execution - WS-A value 100 WS-B value 150 WS-C value 786 After execution of above ADD statement, value in data items are shown below. WS-A value 100 WS-B value 150 WS-C value 250 <- sum of WS-A, WS-B moved to WS-C ADD WS-A WS-B GIVING WS-C WS-D WS-E values in WS-A WS-B will be summed up and the result will be stored in WS-C, WS-D & WS-E.
    

NEXT CHAPTER TOPIC : COBOL


                                   



Previous chapter in COBOL tutorialStarting of COBOL tutorialNext chapter in COBOL tutorial


Visit COBOL books section in this site for good books




Home | Donations | Online Tutorials | Books | Entertainment | Contactme | privacy |  sql tutorial | jcl interview questions | JCL Tutorial | JCL Tutorial - chapter1 | JCL Tutorial - chapter2 | JCL Tutorial - chapter3 | JCL Tutorial - chapter4 | JCL Tutorial - chapter5 | JCL Tutorial - chapter6 | JCL Tutorial - chapter7 | JCL Tutorial - chapter8 | JCL Tutorial - chapter9 | JCL Tutorial - chapter10 | JCL Tutorial - chapter11