*---------*---------------*-----------------*----------------*---------------* | CODE | FACTOR 1 | FACTOR 2 | RESULT | INDICATORS | | | | | FIELD | | *---------*---------------*-----------------*----------------*---------------* | MOVEL | | Source field | Target field | + - ZB | | (P) | | | | | *---------*---------------*-----------------*----------------*---------------*
The MOVEL operation transfers characters from factor 2 to the result field. Moving begins with the leftmost character in factor 2. You cannot specify resulting indicators if the result field is an array. You can specify them if the result field is an array element, or a nonarray field.
When data is moved to a numeric field, the sign (+ or -) of the result field is retained except when factor 2 is as long as or longer than the result field. In this case, the sign of factor 2 is used as the sign of the result field.
If factor 2 is longer than the result field, the excess rightmost characters of factor 2 are not moved. If the result field is longer than factor 2, the excess rightmost characters in the result field are unchanged, unless padding is specified.
The MOVEL operation is summarized in Figure "MOVEL Operation".
A summary of the rules for MOVEL operation for four conditions based on field lengths:
For further information on the MOVEL operation, see Move Operations.
Factor 2 and Result Field Same Length Factor 2 Result Field - + 7 8V4 2 5 Before MOVEL 5 6 7V8 4 a. Numeric *-*-*-*-*-* *-*-*-*-*-* to - - Numeric 7 8V4 2 5 After MOVEL 7 8 4V2 5 *-*-*-*-*-* *-*-*-*-*-* 7 8V4 2 5 Before MOVEL A K T 4 D b. Numeric *-*-*-*-*-* *-*-*-*-*-* to - Character 7 8V4 2 5 After MOVEL 7 8 4 2 N *-*-*-*-*-* *-*-*-*-*-* + P H 4 S N Before MOVEL 5 6 7 8 4 c. Character *-*-*-*-*-* *-*-*-*-*-* to - Numeric P H 4 S N After MOVEL 7 8 4 2 5 *-*-*-*-*-* *-*-*-*-*-* P H 4 S N Before MOVEL A K T 4 D d. Character *-*-*-*-*-* *-*-*-*-*-* to Character P H 4 S N After MOVEL P H 4 S N *-*-*-*-*-* *-*-*-*-*-* Factor 2 Longer Than Result Field Factor 2 Result Field - + 0 0 0 2 5 8 4 2 5 Before MOVEL 5V6 7 8 4 a. Numeric *-*-*-*-*-*-*-*-*-* *-*-*-*-*-* to - Numeric 0 0 0 2 5 8 4 2 5 After MOVEL 0V0 0 2 5 *-*-*-*-*-*-*-*-*-* *-*-*-*-*-* - 9 0 3 1 7 8 4 2 5 Before MOVEL A K T 4 D b. Numeric *-*-*-*-*-*-*-*-*-* *-*-*-*-*-* to - Character 9 0 3 1 7 8 4 2 5 After MOVEL 9 0 3 1 7 *-*-*-*-*-*-*-*-*-* *-*-*-*-*-* + B R W C X H 4 S N Before MOVEL 5 6 7 8V4 c. Character *-*-*-*-*-*-*-*-*-* *-*-*-*-*-* to - Numeric B R W C X H 4 S N After MOVEL 2 9 6 3V7 *-*-*-*-*-*-*-*-*-* *-*-*-*-*-* B R W C X H 4 S N Before MOVEL A K T 4 D d. Character *-*-*-*-*-*-*-*-*-* *-*-*-*-*-* to Character B R W C X H 4 S N After MOVEL B R W C X *-*-*-*-*-*-*-*-*-* *-*-*-*-*-*
Factor 2 Shorter Than Result Field Factor 2 Result Field - + *- 7 8 4 2 5 Before MOVEL 1V3 0 9 4 3 2 1 0 |Numeric *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | to - + |Numeric 7 8 4 2 5 After MOVEL 7V8 4 2 5 3 2 1 0 a.|* *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | + | C P T 5 N Before MOVEL 1 3 0 9 4 3 2 1 0 |Character *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* *- to + Numeric C P T 5 N After MOVEL 3 7 3 5 5 3 2 1 0 *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* - *- 7 8 4 2 5 Before MOVEL B R W C X H 4 S A |Numeric *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | to - |Character 7 8 4 2 5 After MOVEL 7 8 4 2 N H 4 S A b.|* *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | | C P T 5 N Before MOVEL B R W C X H 4 S A |Character *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* *- to Character C P T 5 N After MOVEL C P T 5 N H 4 S A *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* + - Note: 4 = letter D, and 5 = letter N; arrow V is decimal point.
Factor 2 Shorter Than Result Field With P in Operation Extender Field Factor 2 Result Field - + *- 7 8 4 2 5 Before MOVEL 1V3 0 9 4 3 2 1 0 |Numeric *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | to - + |Numeric 7 8 4 2 5 After MOVEL 7V8 4 2 5 0 0 0 0 a.|* *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | + | C P T 5 N Before MOVEL 1 3 0 9 4 3 2 1 0 |Character *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* *- to + Numeric C P T 5 N After MOVEL 3 7 3 5 5 0 0 0 0 *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* - *- 7 8 4 2 5 Before MOVEL B R W C X H 4 S A |Numeric *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | to - |Character 7 8 4 2 5 After MOVEL 7 8 4 2 N b.|* *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* | | C P T 5 N Before MOVEL B R W C X H 4 S A |Character *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* *- to Character C P T 5 N After MOVEL C P T 5 N *-*-*-*-*-* *-*-*-*-*-*-*-*-*-* + - Note: 4 = letter D, and 5 = letter N; arrow V is decimal point.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.