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

Comma - edit characters for numeric data, , (Comma) : A comma, wheneve...

, (Comma) : A comma, whenever used in a picture, is considered as an insertion character and inserted wherever it become visible. There can be more than one comma in the pictu

Multiply verb, MULTIPLY VERB:   The Multiply Verb causes one or more ...

MULTIPLY VERB:   The Multiply Verb causes one or more multiplicands to be multiplied by the multiplier and to store the products. The form of the MULTIPLY verb is as shown be

Statements for sequential files , STATEMENTS FOR SEQUENTIAL FILES: A b...

STATEMENTS FOR SEQUENTIAL FILES: A basic operation on a file includes the reading and writing of its records. Whenever the file is sequential, there are three verbs for the

Numeric literals - cobol program, Numeric -   Literals : The numeri...

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

.QUADRATIC EQN ROOTS, TO WRITE A QUADRATIC EQN ROOTS ARE COMPLEX IN COBOL P...

TO WRITE A QUADRATIC EQN ROOTS ARE COMPLEX IN COBOL PROGRAM

Move verb - cobol programming, Introduction to MOVE Verb: The aim of th...

Introduction to MOVE Verb: The aim of this section is to introduce the learner how to move data from one place to the other place in the memory. This is completed with the help

Perform with until option, PERFORM WITH UNTIL OPTION: The format is as...

PERFORM WITH UNTIL OPTION: The format is as shown below: Illustration:  A) Perform p-3 until i > 5. Here p-3 will be executed whenever i B)  Perform p-2 thru

Record description for the variable-length records, Record Description for ...

Record Description for the Variable-length Records: When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 f

Floating insertion - , Floating Insertion   The currency symbol ($) c...

Floating Insertion   The currency symbol ($) can emerge in multiples on the left-hand side of the picture. In this situation the character will be treated in similar way as t

Minus sign - edit characters for numeric data , Minus sign - edit character...

Minus sign - edit characters for numeric data: The minus sign can appear either at the leftmost or rightmost location of the picture. If an item is negative, a minus sign will

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