View previous topic :: View next topic
|
Author |
Message |
Satheeshkumar
New User
Joined: 20 Feb 2009 Posts: 51 Location: Chennai
|
|
|
|
Hi,
My requirement is that My input file contains the COMP-2 field. Is it possible to convert the COMP-2 to ZONED decimal? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Maybe. If the value in the COMP-2 field is over 10 to the 30th power, then 31 digits is not enough to hold the value and therefore the move cannot be done. But as long as the COMP-2 field value is appropriate for the zoned decimal value, a simple MOVE should do the trick. |
|
Back to top |
|
|
Satheeshkumar
New User
Joined: 20 Feb 2009 Posts: 51 Location: Chennai
|
|
|
|
Can any one provide the sample code using SORT |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
COMP-2 is an 8-byte FL value. You can convert it to a ZD integer (but the decimal part will be lost) using:
Code: |
INREC BUILD=(...,p,8,FL,TO=ZD,...)
|
where p is the starting position of the COMP-2 field. |
|
Back to top |
|
|
|