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

Converting decimal to numeric using ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Balaryan
Warnings : 2

New User


Joined: 20 Nov 2009
Posts: 27
Location: chennai

PostPosted: Thu Feb 02, 2017 11:27 pm
Reply with quote

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

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Feb 03, 2017 12:11 am
Reply with quote

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
View user's profile Send private message
Balaryan
Warnings : 2

New User


Joined: 20 Nov 2009
Posts: 27
Location: chennai

PostPosted: Fri Feb 03, 2017 1:20 am
Reply with quote

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

New User


Joined: 25 Mar 2013
Posts: 88
Location: India

PostPosted: Fri Feb 03, 2017 11:42 am
Reply with quote

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

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Feb 03, 2017 7:29 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How can we simulate JOINKEYS in ICETOOL DFSORT/ICETOOL 8
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts HOW TO OVERLAY A Packed decimal VALUE... DFSORT/ICETOOL 5
No new posts ICETOOL job to pull ML1 datasts DFSORT/ICETOOL 7
No new posts Hexadecimal Group compare and write t... DFSORT/ICETOOL 5
Search our Forums:

Back to Top