Size - picture clause, COBOL Programming

Size:

The number of characters or digits needed to store the data item in the memory in termed as the Size of the data item.

All the 4 general characteristics explained can be specified through a PICTURE clause. The clause PICTURE is to be followed by a picture character string as shown below.

663_Size.png

The character string can contain 1 to 30 code characters which define the above mentioned attributes of the elementary item. The code characters and meaning are shown below:

701_Size1.png

There is no exceptional code to indicate the size.

The total number of occurrence of 9, X or A in the picture string specifies the size.

The occurrence of V, P & S are not counted in determining the size of an item.

The permissible combinations are governed by the rules as shown below:

(i)  In the case of an alphabetic item the picture may hold only the symbol A.

(ii)  In the case of a numeric item the picture may hold only the symbols 9, V, P & S.

These are known as operational characters. It should hold at least one 9. 

The symbols V and S can appear only once and S, if it is involved, should be the leftmost character of the picture string. The symbol P can be repetitive on the right or on left as many times as is needed to indicate the position of the assumed decimal point.

(iii) In the case of an alphanumeric item, the picture may hold all Xs or the combination of 9, A and X (except all 9 or all A). In the afterward case the item is considered as if the string holds of all Xs.

The picture clause is only to be specified for the elementary items; it cannot be used for a group item. 

The size of a group item is equivalent to the total of the sizes of all the subordinate elementary items. The group item class is alphanumeric. 

Posted Date: 10/16/2012 3:51:01 AM | Location : United States







Related Discussions:- Size - picture clause, Assignment Help, Ask Question on Size - picture clause, Get Answer, Expert's Help, Size - picture clause Discussions

Write discussion on Size - picture clause
Your posts are moderated
Related Questions
REWRITE STATEMENT: The REWRITE statement has the format for a relative file as shown below, REWRITE record-name  [ FORM identifier ]

Illustration of perform statement: PERFORM    CALCUALTE-TAX. In this illustration, the CALCULATE-TAX is either a section name or paragraph name. Assume that it is a section

WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us

Numeric -   Literals : The numeric literal can be created with the help of digits only. It can have a sign (+ or -) and can also have a decimal point. If no sign is specifi

SEQUENTIAL FILES:   The purpose of the proposed section is to introduce the concepts such as File characteristics, File Description for Fixed-Length Records, File-Control

PROGRAM FOR MULTIPLY VERB: We have to write a simple program to elaborate MULTIPLY verb. You can also use the edit characters in the program. Identification division. Pr

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


RESERVE clause: This clause indicates the number of buffers to be used for the file. Integer-1 specifies this number. ORGANIZATION/ACCESS clause: These two clause

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