Illustration of subtract verb, COBOL Programming

Assignment Help:

Illustration of Subtract verb:

(a) SUBTRACT A FROM B.

This illustration means that the value of A will be subtracted from the value of B and the subtracted result will be stored in B. The decimal point alignment will be completed automatically.

(b) SUBTRACT A, B FROM C.

This one represents that the value of B and A will be added and the resultant sum will be subtracted from the value of C.  After subtraction, the concluding result will be stored in C.  The older value of C will be lost.

(c) SUBTRACT A, B FROM C GIVING D.

This represents that the summation of the value of A & B will be subtracted from the value of C and the last result will be stored in D.  The older value of D will be lost while in this situation C retains the older value.

(d)  SUBTRACT 15 FROM A B.

At this point the number 15 will be subtracted from the values of A & B. The A & B will obtain these new values. As in the situation of the ADD statement, here also the last-named operand should not be a literal as the last result will be stored there. If the GIVING option is used, then identifier-3, identifier-4 etc. can also be the numeric literals.  For illustration, SUBTRACT A B FROM 50 GIVING C.

 


Related Discussions:- Illustration of subtract verb

Write statement - sequential files, WRITE statement: The WRITE stateme...

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

Program for subtract verb, PROGRAM FOR SUBTRACT VERB: We have to write...

PROGRAM FOR SUBTRACT VERB: We have to write a simple program to elaborate the SUBTRACT verb. You can also use edit characters in the program. Identification division. Pr

Group item as operand in the relational condition, Group Item as Operand in...

Group Item as Operand in the Relational Condition: Whenever an operand of a relational condition is the group item, the item is then considered to be an alphanumeric field. Th

Program to demonstrate merge verb, PROGRAM TO DEMONSTRATE MERGE VERB: ...

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

Rules of renames clause, RULES OF RENAMES CLAUSE:   The rules below s...

RULES OF RENAMES CLAUSE:   The rules below should be observed while using the RENAMES clause: (i) All RENAMES entries should be written only after the last record descript

Data division, Data Division: The Data Division is a part of the COBOL...

Data Division: The Data Division is a part of the COBOL program where every data item processed by the program is described. It is very important to note that unless a data

Illustration of subtract verb, Illustration of Subtract verb: (a) SUBT...

Illustration of Subtract verb: (a) SUBTRACT A FROM B. This illustration means that the value of A will be subtracted from the value of B and the subtracted result will be s

Kirat da satikar, bal majduri ik kanuni apradh hai is de bavjud bache ,ghra...

bal majduri ik kanuni apradh hai is de bavjud bache ,ghra,hotla,road, kam karn lai majbur han bacheya te mapeya nu parhai val prerit karn lai ik bashan teyar kro

Numeric literals - cobol program, Numeric -   Literals : The numeri...

Numeric -   Literals : The numeric literal can be created with the help of digits only. It can have a sign (+ or -) and can also have a decimal point. If no sign is specifi

Slash insertion - edit characters for numeric data, / (Slash Insertion): ...

/ (Slash Insertion): The edit character slash (/) also termed as virgule or stroke, may appear anyplace in the picture. When used, it will be inserted. More than one slash can

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd