MOVE Command
The MOVE command is used to move a variable data field value, a numeric, nonnumeric, multi-bit binary, or figurative constant, or the result of an arithmetic expression into a variable data field.
Comparison of CA ADS and COBOL Rules for Move Operations
COBOL and CA ADS differ slightly when moving the results of an arithmetic or assignment command into the target field of the command. The table below compares the COBOL and CA ADS rules.
The application developer determines the set of rules to be used on a dialog-by-dialog basis. The default set of rules is specified in the ADSO statement issued during system generation. The default specification can be overridden for a dialog on the Options and Directives screen of the CA ADS dialog compiler.
|
Operation |
CA ADS rules |
COBOL rules |
|---|---|---|
|
Move a numeric result to an EBCDIC target field |
1. Drop the decimal portion 2. Place a negative sign (if any) to the left of the result 3. Right justify the result in the target field |
1. Retain the decimal portion without the decimal point 2. Drop any negative sign 3. Left justify the result in the target field |
|
Round or truncate the value1 |
Round the value (By default the value is truncated for a DIVIDE command with the REMAINDER parameter) |
Truncate the value |
1 Arithmetic and assignment commands allow the application developer to override the default rounding or truncating rule by means of the ROUNDED/TRUNCATED specification.
|
Copyright © 2014 CA.
All rights reserved.
|
|