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 move alphanumeric to numeric

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

New User


Joined: 12 Aug 2008
Posts: 11
Location: chennai

PostPosted: Fri May 29, 2009 3:57 pm    Post subject: How to move alphanumeric to numeric
Reply with quote

Hi ,

i have an requirement . I need to move alphanumreic to numeric
05 A PIC X(7)
05 B PIC 9(7).
.
.

MOVE A to B



The value of A is 1234567.The same value has to be displayed in b.
Also

IF the value of A is 12345

Then VALUE of B should be 0012345

Pls suggest.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri May 29, 2009 4:48 pm    Post subject:
Reply with quote

FUNCTION NUMVAL as long as you're running on a recent COBOL.
Back to top
View user's profile Send private message
aimprabhu

New User


Joined: 12 Aug 2008
Posts: 11
Location: chennai

PostPosted: Fri May 29, 2009 5:41 pm    Post subject: Reply to: How to move alphanumeric to numeric
Reply with quote

Hi ,

Thanks for the reply.We solved it by using SET function
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri May 29, 2009 5:47 pm    Post subject: Re: Reply to: How to move alphanumeric to numeric
Reply with quote

aimprabhu wrote:
Hi ,

Thanks for the reply.We solved it by using SET function


Please explain!
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri May 29, 2009 6:11 pm    Post subject: Reply to: How to move alphanumeric to numeric
Reply with quote

Yes, enquiring minds want to know? icon_confused.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri May 29, 2009 6:35 pm    Post subject:
Reply with quote

yes, you can start by explaining why you think SET is a function.

after that, show us the code that you used, please.

your solution is a breakthrough!
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat May 30, 2009 1:05 am    Post subject:
Reply with quote

I am really interested in the SET function and how you used it to solve this!
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat May 30, 2009 9:12 am    Post subject:
Reply with quote

Code:
SET B TO CORRECT VALUE

No problem. icon_smile.gif
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 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
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

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