Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Converting decimal to numeric using ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Balaryan
Warnings : 2

New User


Joined: 20 Nov 2009
Posts: 18
Location: chennai

PostPosted: Thu Feb 02, 2017 11:27 pm    Post subject: Converting decimal to numeric using ICETOOL
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: 2239
Location: @my desk

PostPosted: Fri Feb 03, 2017 12:11 am    Post subject:
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: 18
Location: chennai

PostPosted: Fri Feb 03, 2017 1:20 am    Post subject:
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: 78
Location: India

PostPosted: Fri Feb 03, 2017 11:42 am    Post subject:
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: 2239
Location: @my desk

PostPosted: Fri Feb 03, 2017 7:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us