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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top