Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
The easiest way is to define the variable as a group field:
Instead of:
Code: |
03 MY-VAR PIC X(4). |
Define:
Code: |
03 MY-VAR.
05 MY-VAR-9 PIC 9(4). |
Like this, MY-VAR stays the same (alpha field, length 4), and you can use MY-VAR-9 to move it to any comp or comp-3 field.
Don't forget to ask IF MY-VAR IS NUMERIC before! |
|