Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Conversion from higher value to lower

Former Member
0 Likes
521

Hi,

I have a variable of dec type length 17 which i need to copy in variable of type dec with length 16. Please let me know the shotest solution for the same.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 12, 2008 10:48 AM

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
483

straight move should be fine..

else use offset

dec_16 = dec_17+(16).

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
484

straight move should be fine..

else use offset

dec_16 = dec_17+(16).

Read only

Former Member
0 Likes
483

I don't think you can use offsets with packed fields.

I would just check to make sure the amount in the source field is not too large for the destination and then if it's not, just do a MOVE.

Rob