Value clause - cobol programming, COBOL Programming

VALUE CLAUSE:

The value clause defines the preliminary value of the data item.

Normally initialization will be completed just before the first statement in the procedure division is executed.

The syntax is:

VALUE is literal

The literal can be any of the numeric value, a nonnumeric string of characters involved within the quote (") or any figurative constant. 

Examples:

1)  01 a  pic value is 100

2)  01 compname pic x(15) value is "ABC Company"

3)  01 n pic 9(2) value is ZERO

4)  01 ans pic x value is space

5)  01 result pic x(4) value spaces. 

6)  For Group Data value specification

       01 test-entry  value is "123456".

       02  t1      pic 9(2).

       02  t2      pic 9(2).

       02  t3      pic 9(2).

                 Here t1=12, t2=34 & t3=56. 

 

Posted Date: 10/16/2012 4:24:31 AM | Location : United States







Related Discussions:- Value clause - cobol programming, Assignment Help, Ask Question on Value clause - cobol programming, Get Answer, Expert's Help, Value clause - cobol programming Discussions

Write discussion on Value clause - cobol programming
Your posts are moderated
Related Questions
What is the difference between subscript and index

Introduction to MOVE Verb: The aim of this section is to introduce the learner how to move data from one place to the other place in the memory. This is completed with the help

Point Location: The position of the decimal point is the other characteristic which can be specified in the case of the numeric data items. If the position is not specified, t

STATEMENTS FOR SEQUENTIAL FILES: A basic operation on a file includes the reading and writing of its records. Whenever the file is sequential, there are three verbs for the

GIVING    file-name-5. The input files to be merged through the MERGE statements which are specified in the USING phrase. These files should be sequential files and should be

FILE-CONTROL: The FILE-CONTROL paragraph names each and every file and identifies the first medium through file control entries. The basic format of a file control entry is gi

SUBTRACT VERB: The SUBTRACT verb is used to subtract one, or the sum of two or more numbers from one or more numbers and to store the result. The form of the SUBTRACT verb

Write a COBOL IF sentence to use the values of numeric variables EXAM and COURSEWORK , both assumed to be with format PIC 999 and in the range 0 to 100 and to move the value:

Rules for Simple sort verb: The work file is to be defined by a sort elaboration entry (SD entry).The format of SD entry is as shown below. The rules below should be taken

PROCEDURE DIVISION statements for the relative files: The statements OPEN, CLOSE, READ, WRITE and REWRITE that are available for sequential files are also available for the re