View previous topic :: View next topic
|
Author |
Message |
Balaryan Warnings : 2 New User
Joined: 20 Nov 2009 Posts: 27 Location: chennai
|
|
|
|
Hi All,
I am facing an issue in reformatting the decimal field value say '11.400' to '11400' using ICETOOL. It worked fine for the value '3.230' to '03230'. I am using "UFF, M11" to reformat that field. It works only for '9.999' and not working for '99.999' to convert to '99999'.
Any information/suggestion will be appreciated. Thanks. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Is your field left justified? When you say, it "is not working", can you show what you have tried and what you are getting out of it. |
|
Back to top |
|
|
Balaryan Warnings : 2 New User
Joined: 20 Nov 2009 Posts: 27 Location: chennai
|
|
|
|
Hi Arun,
It works now. Actually, I tried with LEFT justified using JFY parameter. It didn't work out. Later, I achieved the result using OUTREC OVERLAY option.
Input file contains decimal fields like listed below.
format is 99.999
16.000
17.510
17.510
12.500
4.550
2.000
2.000
3.480
19.000
7.750
Output should be in the format 99999 (by suppressing decimal) like
16000
17510
17510
12500
04550
02000
02000
03480
19000
07750 |
|
Back to top |
|
|
Abid Hasan
New User
Joined: 25 Mar 2013 Posts: 88 Location: India
|
|
|
|
Hello,
Imo, this task can be tweaked further; it can be done with only an INREC BUILD, coupled with a '<position here>UFF,TO=ZD,LENGTH=5', and an OPTION COPY, for the presented data. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Balaryan wrote: |
I am using "UFF, M11" to reformat that field. It works only for '9.999' and not working for '99.999' |
Balaryan,
The solution you mentioned in your own first post above gives the expected results. I did n't really get what went wrong there for you.
Code: |
//SYSIN DD *
INREC OVERLAY=(15:1,6,UFF,M11,LENGTH=5)
SORT FIELDS=COPY |
Code: |
----+----1----+----
16.000 16000
17.510 17510
17.510 17510
12.500 12500
4.550 04550
2.000 02000
2.000 02000
3.480 03480
19.000 19000
7.750 07750 |
|
|
Back to top |
|
|
|