Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Base62 to Decimal Conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Wed Jul 23, 2014 8:09 pm    Post subject: Base62 to Decimal Conversion
Reply with quote

Hi,

Not sure whether this is right forum to start this thread.
Can you please help me with any pointers for Base62 to Decimal conversion.

Thanks
Sikkandhar
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jul 23, 2014 8:34 pm    Post subject: Reply to: Base62 to Decimal Conversion
Reply with quote

Base62? Do you mean Base64?

Can you give an example of your input and the output you expect?
Back to top
View user's profile Send private message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Wed Jul 23, 2014 8:44 pm    Post subject:
Reply with quote

Hi Bill,

Please check this site
http://convertxy.com/index.php/numberbases/

When a decimal is given, it displays the equivalent Base 62 format.

For example the Base62 for the decimal 58155547711 is 11Tikb1

Am looking for a decoding logic to trace the decimal value from Base62
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 460
Location: The Universe

PostPosted: Wed Jul 23, 2014 8:54 pm    Post subject:
Reply with quote

Base62?

Never heard of it!

In the usual definition, base x means there are x unique values in each place. Base 8, (or octal) has 8, usually 0, 1, 2, 3, 4, 5, 6, 7. Base 16 (hexadecimal) has 16, usually 0, 1, ..., 9, A, ..., F. Base 2 (binary) has 2, usually 0, 1. Base 10 (decimal) has 10, usually 0, 1, ..., 9. So what is this base 62?
Back to top
View user's profile Send private message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Wed Jul 23, 2014 8:58 pm    Post subject:
Reply with quote

Base62 uses Alphabets in Upper case (A thru Z) - 26, Alphabets in Lower case (a thru z) - 26 and Intgers (0 thru 9) - 10.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jul 23, 2014 9:21 pm    Post subject: Reply to: Base62 to Decimal Conversion
Reply with quote

Paper and pencil.

Turn the right-most digit into a number. Set your total to that. Set factor to 62. That is your starting point.

Until there are no more digits, take the next to the left. Turn it into a number. Multiply it by factor. Add it to total. Multiply factor by 62.

At the end of that, you should have your decimal value.

If you have lots to do, you can write a program. Calculate the powers of 62 and store them in a table. There's ALPHABETIC-LOWER, ALPHABETIC and NUMERIC. FUNCTION ORD. Shouldn't be too tricky.
Back to top
View user's profile Send private message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Wed Jul 23, 2014 9:35 pm    Post subject:
Reply with quote

Thanks Bill.
Apologizes to admin/moderators if i have posted in wrong forum
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Thu Jul 24, 2014 4:34 pm    Post subject:
Reply with quote

Base62 is new to me too!.
Maybe you can take these base64 programs and adapt them.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us