Size - picture clause, COBOL Programming

Assignment Help:

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. 


Related Discussions:- Size - picture clause

Occurs clause - program, OCCURS CLAUSE - PROGRAM: We have to write a p...

OCCURS CLAUSE - PROGRAM: We have to write a program to demonstrate the occurs clause. Get names of the students and show them on the screen.  identification division.

Compound condition, COMPOUND CONDITION: The two simple conditions can ...

COMPOUND CONDITION: The two simple conditions can be connected by the logical operators AND or OR to form a compound condition (also termed as combined condition). When two co

Program for indexed sequential file creation , PROGRAM FOR INDEXED SEQUENTI...

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION: We have to write a program to create an Indexed Sequential File in a dynamic mode for Student particulars. Suppose just 3 fields:

Occurs, what does it used

what does it used

Giving file-name - simple merge verb, GIVING    file-name-5. The input...

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 status clause, FILE STATUS clause: This clause has been involved ...

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.

Restrictions - procedure in statement, There are some restrictions when the...

There are some restrictions when these procedures are used. (i) The Procedure should not contain any SORT/MERGE statement. (ii) An explicit transfer of the control outside

Label records or disk directory - file characteristics, Label Records / Dis...

Label Records / Disk Directory: The most important information stored in the header label is what is termed as the file title. In the situation of magnetic-disk files the labe

Data division, Data Division: The Data Division is a part of the COBOL...

Data Division: The Data Division is a part of the COBOL program where every data item processed by the program is described. It is very important to note that unless a data

Divide verb, DIVIDE VERB: The aim of the DIVIDE verb is to divide one ...

DIVIDE VERB: The aim of the DIVIDE verb is to divide one number by the other and to store the result.  There are few forms of this verb. One of its forms is as shown below:

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd