IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Easytrieve - Move alphanumeric field to numeric


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nicedaisy

New User


Joined: 18 Jan 2010
Posts: 1
Location: Chennai

PostPosted: Fri Mar 11, 2011 9:02 pm
Reply with quote

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
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Mar 11, 2011 10:28 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 11, 2011 10:39 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top