View previous topic :: View next topic |
Author |
Message |
mummanen Beginner
Joined: 02 Feb 2004 Posts: 4 Topics: 1 Location: Sacramento/USA
|
Posted: Mon Feb 02, 2004 2:55 pm Post subject: How to convert numeric number to roman number? |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
mummanen Beginner
Joined: 02 Feb 2004 Posts: 4 Topics: 1 Location: Sacramento/USA
|
Posted: Mon Feb 02, 2004 4:29 pm Post subject: |
|
|
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 |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Tue Feb 03, 2004 12:32 pm Post subject: |
|
|
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 |
|
|
Glenn Beginner
Joined: 23 Mar 2003 Posts: 56 Topics: 3
|
Posted: Thu Mar 04, 2004 12:20 am Post subject: |
|
|
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 |
|
|
|
|