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
Display control verbs in Cobol

Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi

MERGE VERB WITH OUTPUT PROCEDURE: Like the sort verb, the merge verb can also have an output procedure. The syntax of the MERGE verb is as shown below:   The r

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

Example of Sign condition: The illustration below describes the use of the sign condition. Illustration:     77  BALANCE  PIC  S9 (6) V99.       .       .     I

PROGRAM USING OCCURS CLAUSE: We have to write a simple program to demonstrate Occurs Clause. Get the employee details for 3 persons and compute the total salary. identifica

READ STATEMENT: The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the

PROGRAM FOR MASTER FILE MAINTENANCE: We have to write a program to keep the stu-file for which a record has just 2 fields,viz., rno(Roll Number) and name(Student Name). Give t

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:

Buffers: The Modern computers are able of handling I-O operations independent of the CPU by means of the hardware termed as data channel. For illustration, if two buffers a