Rules of move verb, COBOL Programming

RULES OF MOVE VERB:

 The Data movement is managed by the rules which are as shown below:

(a) The contents of the identifier - 1 or the value of the literal - 1 is moved to the identifier - 2, identifier - 3, etc. Note that there may be more than one receiving field whereas there should be only one sending field, the contents of all the receiving fields will be substituted by the value of the sending field. The contents of identifier - 1 stay unchanged.

(b) Whenever the sending field is numeric and the receiving field is numeric or numeric edited (that is picture holds edit symbols) the data movement is termed as numeric data transfer.  In such situation the dominant factor in the movement is the alignment of the decimal points of the two fields.  For the aim of this alignment, the numeric fields for which the place of the decimal point is not explicitly indicated, the decimal point is supposed to be at the right of the rightmost digit.  If the receiving field is not large sufficient to hold the data received, the truncation can take place at either and depending on whether the fractional part, integral part or both can or cannot be accommodated. Though, if significant the integral positions are likely to be lost, a warning to which effect is issued by the compiler. On the other hand, when the receiving field is bigger than the sending field, zero- fill will acquire place in the unused positions to keep the numeric value unchanged.

(c) Whenever both the sending and receiving fields are alphanumeric, alphabetic or alphanumeric edited, the data movement is termed as the alphanumeric data transfer.  In such situation the receiving area is filled from left to right and space fill occurs to the right if the receiving area is bigger than the sending field. Whenever the receiving area is smaller, the truncation occurs from the right and the compiler gives a warning to that effect.

Preferably, both the sending and receiving fields must belong to similar category. Though, quite often it becomes essential to transfer a data to a field having various categories.  Identifier - 1, identifier - 2, identifier - 3, etc., can be group items.  In such situations, the move is very often used.  This is when we wish to initialize a record area by spaces. For illustration, the statements MOVE SPACES TO REC-AREA will space- fill the whole area represented by the group name REC-AREA.

Posted Date: 10/16/2012 5:15:16 AM | Location : United States







Related Discussions:- Rules of move verb, Assignment Help, Ask Question on Rules of move verb, Get Answer, Expert's Help, Rules of move verb Discussions

Write discussion on Rules of move verb
Your posts are moderated
Related Questions
ACCEPT STATEMENT: The ACCEPT statement is used to read the low-volume data from the operator's console, several other hardware device or from the operating system. The common

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

PROGRAM FOR IF -ELSE: We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE. Identification division. Program- id. IfElse.

Rules for apply for the condition name: The rules below apply for the condition name. (i) The Condition names should be explained at level 88. The level number starts in ma

Example of Open statement: Illustration: The OPEN INPUT TRANSACTION, OLD-MASTER OUTPUT NEW-MASTER. The illustration represents that there are two input files named the

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

FILE-CONTROL paragraph for the indexed files: The common format for the SELECT clause for a file is as shown below: SELECT  file-name  ASSIGN   TO  implementor -name

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:

Point Location: The position of the decimal point is the other characteristic which can be specified in the case of the numeric data items. If the position is not specified, t

Currency Sign - edit characters for numeric data: $ (Currency Sign): The single currency sign can appear at the leftmost place of a picture. In that situation the $ cha