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
 
Data Exception error while moving numeric data into COMP-3

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

New User


Joined: 26 May 2008
Posts: 1
Location: pune

PostPosted: Mon May 18, 2009 5:01 pm    Post subject: Data Exception error while moving numeric data into COMP-3
Reply with quote

Hi,

Im trying to move numeric data of a variable which is of length S9(7)V99 to different variable with length S9(7)V99 COMP-3. Its giving me Data Exception Error.
Im just accepting the data from the user and moving it to COMP-3 variable inorder to store it in a file.

Please help me regarding this..

Thanks in Advance..!!
Ramya
Back to top
View user's profile Send private message

Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Mon May 18, 2009 5:20 pm    Post subject: Reply to: Data Exception error while moving numeric data int
Reply with quote

Moving a 'S9(7)V99 ' variable to 'S9(7)V99 COMP-3' will not give data exception error i think.

Please check the input variable. It may have non-numeric values.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon May 18, 2009 5:26 pm    Post subject:
Reply with quote

it has been stated many times and many ways that display numeric data
PIC 9.
will accept anything.

you need to prove that the data contained in the display numeric variable is numeric.

search the cobol forum; there have been many threads.
read the documentation - cobol programmers guide and cobol reference.
button at top of page - IBM Manuals - 2nd from left, will guide you to reference material for your vsn of cobol.
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: Mon May 18, 2009 5:42 pm    Post subject: Reply to: Data Exception error while moving numeric data int
Reply with quote

After the signed display-numeric field is packed (internally by the compiler) and then moved (via an MVC) into the receiving packed-field, the compiler issues a ZAP of the packed-field into itself and this is where you can get a S0C7. You won't get a S0C7 on a PACK instruction.
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm

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