MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to convert numeric number to roman number?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mummanen
Beginner


Joined: 02 Feb 2004
Posts: 4
Topics: 1
Location: Sacramento/USA

PostPosted: Mon Feb 02, 2004 2:55 pm    Post subject: How to convert numeric number to roman number? Reply with quote

How to convert numeric number to roman number in MF COBOL?

Do we have any function for this?

EX: 1 = I, 2 = II, 3 = III ... 10 = X etc...
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Feb 02, 2004 3:45 pm    Post subject: Reply with quote

mummanen,

The conversion of numeric number to roman number in MF COBOL can be done via DBCS Support.

Check this link for Double-Byte Character Set Support

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mummanen
Beginner


Joined: 02 Feb 2004
Posts: 4
Topics: 1
Location: Sacramento/USA

PostPosted: Mon Feb 02, 2004 4:29 pm    Post subject: Reply with quote

Did anybody have some example code for converting numeric number to roman number?

I did through the SQL query embedded into my cobol program

select to_char(11,'RN') from dual;
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Feb 03, 2004 12:32 pm    Post subject: Reply with quote

Hi

I found this REXX function in the web.

O.
________
herbalaire


Last edited by ofer71 on Sat Feb 05, 2011 11:12 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Glenn
Beginner


Joined: 23 Mar 2003
Posts: 56
Topics: 3

PostPosted: Thu Mar 04, 2004 12:20 am    Post subject: Reply with quote

1 = I
4 = IV
5 = V
9 = IX
10 = X
(and so forth)

and so forth....you take your number, substitute and build the value using your STRING verb and then go from there...I suggest you store this as a table and go down the list in descending order (M = 1000 CM = 900 ... on down to 1's.)

Going to be a lot of loops...just a hint...I did this in another language - hopefully I can find it and post it if you still need a hint.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group