Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 7312

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 Convert string to packed format ajaydwivedi4u COBOL Programming 6 Sat Sep 21, 2019 5:01 pm
No new posts Convert from 1/1/2019 to 01/01/2019 sudhakarraju DFSORT/ICETOOL 3 Fri Sep 20, 2019 1:16 am
No new posts Convert Numeric to Packed decimal and... anand1204 DFSORT/ICETOOL 5 Thu Aug 08, 2019 3:53 am
No new posts Training on numeric fields data formats sergeyken SYNCSORT 12 Thu Aug 01, 2019 8:15 pm
No new posts Comparison of numeric edited variables Nileshkul COBOL Programming 4 Sat Mar 16, 2019 1:18 am

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