Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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: 86
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: 2285
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 Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us