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
 

 

regarding alphanumeric to numeric

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

New User


Joined: 19 Oct 2007
Posts: 37
Location: chennai

PostPosted: Mon Jan 28, 2008 9:55 am    Post subject: regarding alphanumeric to numeric
Reply with quote

Hi,


I have one query is it possible to move from x(4) to 9(4).


Regards
Karthik
Back to top
View user's profile Send private message

rajaherein

New User


Joined: 11 Jan 2007
Posts: 23
Location: chennai

PostPosted: Mon Jan 28, 2008 12:45 pm    Post subject: Reply to: regarding alphanumeric to numeric
Reply with quote

Karthik,

Its been discussed lot of times, please search the forum for the answers.
Back to top
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Mon Jan 28, 2008 5:41 pm    Post subject:
Reply with quote

Hi Karthik,

You would be getting a S0C7 abend if you try to move a X(4) variable into a 9(4) varaible. However for the other way round, you won't get any error.

Please do check the forums in a proper way before you post a similar question.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Jan 28, 2008 6:27 pm    Post subject:
Reply with quote

swapnadeep.ganguly:

What if the x(4) = 1234 and you try to move that to the 9(4)? SOC7?
Back to top
View user's profile Send private message
rag swain

New User


Joined: 17 Dec 2007
Posts: 33
Location: pune,INDIA

PostPosted: Mon Jan 28, 2008 6:45 pm    Post subject: Reply to: regarding alphanumeric to numeric
Reply with quote

Its always better to go for numeric test before such move(if it is numeric go for the move otherwise do other processing to prevent any abort). The other way round is to use NUMVAL or NUMVALC fucntion.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jan 28, 2008 10:18 pm    Post subject:
Reply with quote

Hello,

Quote:
You would be getting a S0C7 abend if you try to move a X(4) variable into a 9(4) varaible.
As mentioned by Steve - not necessarily

I'd also suggest you pay attention to what "rag swain" posted.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Tue Jan 29, 2008 11:07 am    Post subject:
Reply with quote

hello,

you can always use the functions like NUMVAL, IS NUMERIC etc.
however, if you want to move the data without any check, you wont get any error while moving. if you try to perform some operation on those data then you may result into a S0C7 abend in case of invalid data.
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
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am


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