Size - picture clause, COBOL Programming


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.


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:


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
Major difference between file and array how does record read from array and file why we are not preparing array for real time

OPEN statement: We know that the processing of a file should start with the execution of an OPEN statement. The file can be opened in any one of the 4 open modes - INPUT, OUTP

Example of compound condition: In common, a compound condition has the form which is as shown below: Where condition-1 & condition-2 can be any one of the below:

Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing.   Z    *  $  -    +    CR    DB    .    ,    B    O    /

WRITE STATEMENT: The records are written to be logical place as determined from the value of the record key. The INVALID KEY condition occurs in the cases shown below: (i)

Plus Sign - edit characters for numeric data: + (Plus Sign) : A plus sign is alike to minus sign except that when the item is positive, +sign will be inserted rather th

DISPLAY STATEMENT:   The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's co

Common form of the READ statements: Format 1 is the common form of the READ statements. Format 2 is used when the access mode is either random or dynamic. For illustration,

Occurs Clause: Let us establish tables with the help of an illustration. Assume that there are ten different types of income-tax rates that are read from some input medium and

I need help with a COBOL programming assingment. I have started the program but I need help completing the program. I have 5 errors. Here is the question. 10. Suppose your company