Compute verb, COBOL Programming

Assignment Help:

COMPUTE VERB:

The COMPUTE verb is very powerful. All the evaluations performed by the other 4 verbs can also be completed easily by using the COMPUTE verb. Its normal format is:

          COMPUTE        identifier-1    ROUNDED   ,   identifier-2  ROUNDED     ... 

         =   arithmetic-expression       ;   ON SIZE ERROR imperative-statement

The COMPUTE Verb statement has the following meaning. During the execution of the arithmetic expression on the right side of the equal sign is computed and the value is then moved to the identifiers(s) on the left-hand side.  If any identifier on the left side of the equal sign is a numeric-edited item, then the editing takes place when the value of the expression is moved to the said identifier. The identifiers on the left side of the equal sign (=) should be numeric or numeric-edited elementary items. The right-hand side should be an arithmetic expression. They can also be an identifier (only numeric elementary items), a numeric literal or can specify a computation including two or more such identifiers and/or literals. The arithmetic expression has always a numeric value.  

 


Related Discussions:- Compute verb

File-control paragraph for the relative files, FILE-CONTROL paragraph for t...

FILE-CONTROL paragraph for the relative files: The normal format for the SELECT clause for a relative file is as shown below. SELECT  file-name  ASSIGN  TO  implementor-nam

Open statement - sequential files, OPEN statement: We know that the pr...

OPEN statement: We know that the processing of a file should start with the execution of an OPEN statement. The file can be opened in any one of the 4 open modes - INPUT, OUTP

File updation, FILE UPDATION: The method of modifying an old file with...

FILE UPDATION: The method of modifying an old file with present information is termed as file updating. Master file: A master file is a file which is used as an author

Occurs, what does it used

what does it used

Example of perform statement, Example of Perform statement: PERFORM BE...

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

Example of write statement, Example of Write statement: Illustration:...

Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi

Rules for search verb, RULES FOR SEARCH VERB: The rules apply for the ...

RULES FOR SEARCH VERB: The rules apply for the SEARCH verb is as shown below: (1) The SEARCH verb can be applied only to a table that has the OCCURS clause and INDEXED phra

Example of special-names - configuration section, Example of Special-names:...

Example of Special-names: Consider the illustration: Let the SPECIAL-NAMES paragraph be as shown: SPECIAL-NAMES. CHANNEL 1 IS PAGE-TOP. The Channel is related with the t

Buffers - file characteristics, Buffers: The Modern computers are able...

Buffers: The Modern computers are able of handling I-O operations independent of the CPU by means of the hardware termed as data channel. For illustration, if two buffers a

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