Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to Convert alpha-numeric to num with using NUMVAL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to Convert alpha-numeric to num with using NUMVAL
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    Post subject: Re: Is thr any othr way to cnvt alpha-num to num wt using nu
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    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 current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us