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
REWRITE statement: The REWRITE statement is used to update the existing record in a disk file. The normal format is as shown below: REWRIE  record-name  [  FROM      ide

Can u please let me know how can i use SSA''s in IMS while fetching segments. Thanks, Rajesh

FILE STATUS clause: This clause has been involved in the above syntax for completeness. The ORGANIZATION, REVERSE, ACCESS and STATUS clause can be specified in any order.

File Description for the Relative and Indexed Files: The FD entry for a relative or an indexed file is similar to that of a sequential file. Some compilers do not permit varia

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem

READ STATEMENT: The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the

NEGATED SIMPLE CONDITION: Any of the easy condition explained can be preceded by the logical operator NOT. The consequence of placing the operator NOT before an easy condition

Data types available in COBOL are given below Alpha-numeric (X), numeric (9), alphabetic (A)

RULES OF REDEFINES CLAUSE The rules shown below govern the use of the REDEFINES clause: (i) The level-number of data-name-1 and data-name-2 should be identical. (ii) Exce

Non numeric: The nonnumeric literal is used in normal to output messages or headings. The Characters which are enclosed between " " constitute nonnumeric literal. The maximum