Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
d_sarlie

New User

Joined: 22 Apr 2008
Posts: 42
Location: coimbatore

 Posted: Mon Oct 15, 2012 4:43 pm    Post subject: conversion of Million and Billion HI, I want to convert a value to either Million or Billion. for eg The value 4M has to get converted to 4000000 The value 7B has to get converted to 7000000000 Is there are any cobol inbuilt functions which converts this. Can you please let me know the Possible ways to get this done. Thanks Jeba.

Bill Woodger

DFSORT Moderator

Joined: 09 Mar 2011
Posts: 7314

 Posted: Mon Oct 15, 2012 4:49 pm    Post subject: Reply to: conversion of Million and Billion There is a list of functions in the manual. When you don't find it there, have a think why that might be. What are the maximum and minimum values you might receive? Give further examples, which cover all situations, including no M or B if that is possible.
d_sarlie

New User

Joined: 22 Apr 2008
Posts: 42
Location: coimbatore

Posted: Mon Oct 15, 2012 5:04 pm    Post subject: Re: Reply to: conversion of Million and Billion

 Bill Woodger wrote: What are the maximum and minimum values you might receive? Give further examples, which cover all situations, including no M or B if that is possible.

At Font end clients are feeding values like a number and then M or a number then the B.For this I need a conversion logic to display the Zeroes.
enrico-sorichetti

Global Moderator

Joined: 14 Mar 2007
Posts: 10350
Location: italy

Posted: Mon Oct 15, 2012 5:18 pm    Post subject: Reply to: conversion of Million and Billion

 Quote: this I need a conversion logic to display the Zeroes.

no builtin function will provide that,
given moreover that a standard does not exist the multiplier suffixes

use reference count to separate the digits from the suffix and apply the proper multiplier
don.leahy

Active Member

Joined: 06 Jul 2010
Posts: 658
Location: Whitby, ON, Canada

Posted: Mon Oct 15, 2012 5:39 pm    Post subject: Re: Reply to: conversion of Million and Billion

 enrico-sorichetti wrote: no builtin function will provide that, given moreover that a standard does not exist the multiplier suffixes use reference count to separate the digits from the suffix and apply the proper multiplier
Indeed. I have worked in places where 4M means 4 thousand (because M is the Roman numeral 1,000) and 4MM means 4 million.
Bill Woodger

DFSORT Moderator

Joined: 09 Mar 2011
Posts: 7314

Posted: Mon Oct 15, 2012 5:55 pm    Post subject: Reply to: conversion of Million and Billion

 Code: 999,910 1,391M 1.391B 2,476B 3,000B 3Y

Got any like those?

What type of output do you want? A "string" number or a "usual" one (packed/zoned)?

How good is the "front end" verification?
Akatsukami

Global Moderator

Joined: 03 Oct 2009
Posts: 1781
Location: Bloomington, IL

Posted: Mon Oct 15, 2012 8:09 pm    Post subject: Re: Reply to: conversion of Million and Billion

don.leahy wrote:
 enrico-sorichetti wrote: no builtin function will provide that, given moreover that a standard does not exist the multiplier suffixes use reference count to separate the digits from the suffix and apply the proper multiplier
Indeed. I have worked in places where 4M means 4 thousand (because M is the Roman numeral 1,000) and 4MM means 4 million.

Note also that to an American "four billion" means 4x10^9, whereas to a European "four billion" means 4x10^12.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Mainframe Blocks to Tracks conversion upendrasri JCL & VSAM 1 Sat Nov 18, 2017 10:52 am File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us