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

How to Convert alpha-numeric to num with using NUMVAL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Jayalakshmi

New User


Joined: 02 Sep 2005
Posts: 26
Location: Hyderabad

PostPosted: Mon Nov 28, 2005 12:10 pm
Reply with quote

Is there any other way to convert alpha-numeric to num with using NUMVAL

Regards,
Jaya
Back to top
View user's profile Send private message
Doubts_ask

New User


Joined: 04 Oct 2005
Posts: 9

PostPosted: Mon Nov 28, 2005 2:08 pm
Reply with quote

Use a REDEFINES clause.

Eg: If Var-1 is declared as PIC X(10), then declare Var-2 as below.

01 VAR-1 PIC X(5) VALUE '12345'

01 VAR-2 REDEFINES VAR-1 PIC 9(5).

Now VAR-2 will also have 12345 which is been declared as Numeric datatype.

Pls correct me If I am wrong.

Thanks.
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
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
Search our Forums:

Back to Top