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

how to convert numeric to alphabatic


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Apr 12, 2013 1:29 pm
Reply with quote

hi ,

can you please tell me how to convert numeric to alphabatic.

example
1 to A
2 to B
4 to D
26 to Z

thanks.
Back to top
View user's profile Send private message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Apr 12, 2013 1:30 pm
Reply with quote

adding to querry,
using COBOL any way
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 12, 2013 1:42 pm
Reply with quote

Code:
01  something-nicely-named PIC X(26) VALUE "AB....XYZ".
01  FILLER REDEFINES something-nicely-named.
    05  FILLER OCCURS 26 TIMES.
        10  a-name-for-the-letter PIC X.


And use the value of your number as a subscript to the table.
Back to top
View user's profile Send private message
sivanagaraju.k

New User


Joined: 12 Jan 2010
Posts: 1
Location: US

PostPosted: Fri Apr 12, 2013 7:59 pm
Reply with quote

I agree with Bill's answer. It is pretty simple and straight forward method.
Back to top
View user's profile Send private message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Apr 12, 2013 10:06 pm
Reply with quote

hi bill, thank you so much ..it worked...
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 Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top