COBOL VALUE clause

COBOL Picture Clause COBOL Numeric Data Type

Advertisements


Value clause defines a value to a data item or conditional name from a literal or from other data item.

Value clause has so many formats to assign the value during the declaration.

Values provided using VALUE clause initialized during the compilation-time.

Values provided in VALUE clause should not be exceeded the length of PICTURE clause.

Value clause initializes the data item to the value of literal.

VALUE clause can’t be used in data descriptive entries like REDEFINES.

VALUE clause can’t be used with the group/elementary items had the JUSTIFIED, SYNCHRONIZED and USAGE (other than USAGE IS DISPLAY).


Syntax:


	1.	VALUE literal
	2.	VALUE literal THRU/THROUGH literal
	3.	VALUE REFERENCE data-name.

Practicle Example:


If any questions on the above, post your queries on Cobol Discussion forum


COBOL Picture Clause COBOL Numeric Data Type

Advertisements