Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to convert numeric to alphabatic

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: how to convert numeric to alphabatic
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    Post subject: Reply to: how to convert numeric to alphabatic
Reply with quote

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Apr 12, 2013 1:42 pm    Post subject: Reply to: how to convert numeric to alphabatic
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    Post subject:
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    Post subject:
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    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 tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us