Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Easytrieve - Move alphanumeric field to numeric

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Easytrieve - Move alphanumeric field to numeric
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    Post subject: Re: Easytrieve - Move alphanumeric field to numeric
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

Site Director


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

PostPosted: Fri Mar 11, 2011 10:39 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us