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

Query regarding numeric data variable


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sharad_shanu

New User


Joined: 03 Oct 2006
Posts: 40

PostPosted: Fri May 28, 2010 11:16 am
Reply with quote

Hi,

I am receiving an 40 digit numeric data item in input file in cobol. We know that cobol can handle only upto 18 bit in case of numeric data. Therefore there is a challenge for me to handle this.

Please suggest.

Regard,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri May 28, 2010 11:28 am
Reply with quote

it certainly will be...
even with the most modern cobol option ARITH(EXTEND) You will be able to manage at most 31 digits!

some of the powers of Your organization should review the requirements
or plan to acquire/write in house <something> for very large number processing

speleotrove.com/decimal/#decNumber
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 28, 2010 4:25 pm
Reply with quote

sharad_shanu wrote:
I am receiving an 40 digit numeric data item in input file in cobol.
Just out of curiosity, what this data would signify?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri May 28, 2010 4:29 pm
Reply with quote

Quote:
just out of curiosity, what this data would signify?


puzzling, but more puzzling is a similar thread where the TS need 14 decimal digits after the comma
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 28, 2010 4:31 pm
Reply with quote

Anuj Dhawan wrote:
Just out of curiosity, what this data would signify?

A contractors daily rate icon_lol.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri May 28, 2010 5:38 pm
Reply with quote

Nahh it's the HMPPM rate
waiting for somebody to ask what HMPPM means icon_biggrin.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri May 28, 2010 5:41 pm
Reply with quote

okay, enrico, what does HMPPM mean? icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri May 28, 2010 5:42 pm
Reply with quote

Horse Manure Produced Per Minute icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri May 28, 2010 5:46 pm
Reply with quote

here is a pointer to an HM generator
ibmmainframes.com/viewtopic.php?t=35440&highlight=foggy
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 28, 2010 5:57 pm
Reply with quote

expat wrote:
Anuj Dhawan wrote:
Just out of curiocity, what this data would signify?

A contractors daily rate icon_lol.gif
Then file does not belong to Indian Contractors, for sure! icon_biggrin.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri May 28, 2010 6:35 pm
Reply with quote

sharad_shanu wrote:
Hi,

I am receiving an 40 digit numeric data item in input file in cobol. We know that cobol can handle only upto 18 bit in case of numeric data. Therefore there is a challenge for me to handle this.


OK, you receive a 40-Digit Numeric Data Item. Do you have to touch it arithmetically for any reason?

You can store it in a PIC X(40) field (DISPLAY-NUMERIC) or a PIC X(21) field (PACKED-DECIMAL).

It's only data....

Bill
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 28, 2010 7:52 pm
Reply with quote

Bill O'Boyle wrote:
Do you have to touch it arithmetically for any reason?
Yep, that was the intention to ask about the significance of data - but no answer so far!
Back to top
View user's profile Send private message
icemanroh

New User


Joined: 23 Aug 2008
Posts: 25
Location: Mumbai

PostPosted: Tue Jun 01, 2010 11:25 am
Reply with quote

enrico-sorichetti wrote:
Horse Manure Produced Per Minute icon_biggrin.gif


icon_lol.gif
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top