How do i represent any number or digit into it's word format

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
swapnil205
Member
Posts: 2
Joined: Tue Mar 09, 2010 6:49 pm

How do i represent any number or digit into it's word format

Post by swapnil205 » Tue Mar 09, 2010 7:00 pm

How do i represent any number or digit into it's word format???
Eg: 150 can be represented as 'one hundred and fifty'.
plz Help me it's urgent

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Mar 29, 2010 3:10 pm

well, for one, 150 is 'One Hundred fifty'
the conjunction AND is used to represent the decimal point.

also, urgent means nothing to me since my (and everyone elses) responses are FREE to you and are generated on MY TIME.


for check writing programs, I have used multiple cobol internal tables, where the value of the number is used as the index and the table item consists of two fields, one being the actual verbiage and the second being the length of the verbiage. Depending on if there is a decimal position, the AND would be preceded by the currency verbiage
DOLLARS AND NO CENTS - where there is no decimal
and
DOLLARS AND nn CENTS - nn being the decimal portion
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others