Literals - cobol program, COBOL Programming

Literals:

The actual values can too appear in a program. These values are termed as literals. For illustration, the statement MOVE 0 TO TOTAL indicates that the value zero will be moved to the variable TOTAL. This constant 0 that is used in the body of the statement is a literal.

A data name may have various values at various points of time while a literal means the specific value that remains unchanged throughout the execution of the program. For this reason the literal is frequently termed as a constant. Furthermore the literal is not given a name; it presents itself and does not need to be defined in the Data Division.

There are 3 kinds of literals:

a) Numeric

b) Nonnumeric.

c) Figurative constants

 

 

 

Posted Date: 10/16/2012 3:31:12 AM | Location : United States







Related Discussions:- Literals - cobol program, Assignment Help, Ask Question on Literals - cobol program, Get Answer, Expert's Help, Literals - cobol program Discussions

Write discussion on Literals - cobol program
Your posts are moderated
Related Questions
File volatility: File volatility associates to the number of times the updating of records are needed during some time period. File interrogation: Some files hold re

Transaction file : A transaction file is a file which contains new records those changes to old records which are used to update the master file. The problem of file updatio

OPEN STATEMENT: Whenever a READ or a WRITE operation is executed on a file, then it should be open. The opening of a file may be completed with the help of the OPEN verb. With

Column and Field in COBOL program: In COBOL there are 2 types of entries termed as margin A and margin B entries. The Margin A entries start from the column 8, 9, 10 or 11 and

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

SIGN CONDITION:   The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif

IF STATEMENT: The easiest form of the IF statement is  IF condition-1 statement-1 where the condition-1 may be any one from the shown below. When the condition-1

PROGRAM FOR IF -ELSE: We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE. Identification division. Program- id. IfElse.

There are some restrictions when these procedures are used. (i) The Procedure should not contain any SORT/MERGE statement. (ii) An explicit transfer of the control outside

FILE-CONTROL ENTRIES FOR THE SEQUENTIAL FILES: The characteristics of each and every files handled in a program are specified in the ENVIRONMENT DIVISION and DATA DIVISION.