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

Figurative Constants: The Figurative constants have several fixed names and the compiler recognizes these names and it sets up the equivalent values in the object program.

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

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

INDEXED SEQUENTIAL FILES: In the indexed sequential files which are also known as indexed files, the records are stored in the sequence order generally in ascending order. In

we have input file ,record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input file

SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various

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 i

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION (RANDOM MODE): We have to write a program to create an Indexed Sequential File in random mode for Student particulars. Suppose jus

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