View previous topic :: View next topic
|
Author |
Message |
nicedaisy
New User
Joined: 18 Jan 2010 Posts: 1 Location: Chennai
|
|
|
|
Hi,
I want to move alphanumeric field to numeric like shown below:
WS-A 10 A VALUE '00164.3530'
TO
WS-B 11 N 6
I tried to redefine the WS-A variable in different ways as shown below abd tried to move WS-A to WS-D and WS-D to WS-B but none of them worked(got soc7 error).
WS-C W 10 A
WS-D WS-C 10 N
WS-C W 10 A
WS-D WS-C 10 N 6
WS-C W 10 A
WS-D WS-C 9 P 6
It would be great if somebody can help me with this, please?
Thanks much! |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
nicedaisy wrote: |
Hi,
I want to move alphanumeric field to numeric like shown below:
WS-A 10 A VALUE '00164.3530'
TO
WS-B 11 N 6
|
With a WS-A value of '00164.3540', what it the value you hope to see in WS-B after the move? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
As far as i know, there is no "direct move" that will do this in Easytrieve. There may be such, but if there is, i'm not aware of it.
Will the data aleays be 99999.9999 format? If so redefine the 10-byte field as a 5-byte zoned-decimal, a filler, and a 4-byte zoned-decimal. Then (if the data is guaranteed to be valid) calculate the target field from the 2 pieces. If the data is questionable, validate both pieces before using them.
The data shows 4 decimal places but some of the "target fields) have 6. |
|
Back to top |
|
|
|