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

IGZ0063S An invalid sign was detected in a numeric edited


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

New User


Joined: 20 Dec 2006
Posts: 5
Location: mumbai

PostPosted: Sat Jun 13, 2009 2:43 am
Reply with quote

Hi,
I have run down in a problem with the Edited Field being moved to a numeric value.

01 INPUT-REC.
05 P-AMOUNT PIC -9999.99 VALUE IS ZEROES.
05 R-RATE PIC ZZ.99 VALUE IS ZEROES.
05 N-YEAR PIC ZZ VALUE IS ZEROES.

01 INPUT-DEC.
05 P-AMOUNT2 PIC S9999V99 VALUE IS ZEROES.
05 R-RATE2 PIC 99V99 VALUE IS ZEROES.
05 N-YEAR2 PIC 99 VALUE IS ZEROES.

Procedure division.
...
2000-GET-INPUTS.
ACCEPT P-AMOUNT
ACCEPT R-RATE
ACCEPT N-YEAR.
MOVE P-AMOUNT TO P-AMOUNT2. ** This statement gives the error**
MOVE R-RATE TO R-RATE2.
MOVE N-YEAR TO N-YEAR2.
2000-ENDS.
EXIT.

When I run the code I get the run time error of IGZ0063S ...
I tried with the following things :
1. 05 P-AMOUNT PIC -ZZZZ.99 VALUE IS ZEROES.
2. 05 P-AMOUNT PIC -ZZZ9.99 VALUE IS ZEROES.
I tried all the following inputs :
1. //SYSIN DD *
+1000.00
10
4
/*
2. //SYSIN DD *
1000
10
4
/*

In Xpeditor , I checked and it shows: (for option 1 of SYSIN DD)
P-AMOUNT +1000.00
P-AMOUNT2 +0000.00
Just before the execution of this step .... but fails with the error IGZ0063S on the above indicated step.
Nothing seems to be working and I'm running into the same error again and again .... I appreciate you suggestions ?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Jun 13, 2009 6:14 am
Reply with quote

Hello,

At the top of the page is a link to "IBM Manuals".

In the COBOL Language Reference for your release of COBOL, look up NUMVAL and NUMVAL-C.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jun 13, 2009 7:04 pm
Reply with quote

If you DO have a "+" sign as the 1st char in your sending fld, that is the "invalid" char causing your problem.

Youu can correct it using Dick's suggestion or you can use this:
Code:
IF P-AMOUNT(1:1) NOT = '-'
   MOVE ' ' TO P-AMOUNT(1:1)
END-IF


Either will work, but this is probably more efficient.
Back to top
View user's profile Send private message
shoaib

New User


Joined: 20 Dec 2006
Posts: 5
Location: mumbai

PostPosted: Mon Jun 15, 2009 9:38 pm
Reply with quote

Thanks for the help
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 Convert HEX to Numeric DB2 3
No new posts Find a record count/numeric is multip... COBOL Programming 1
No new posts Handling the numeric data in unstring... COBOL Programming 18
No new posts Invalid URL in Sticky topic TSO/ISPF 1
Search our Forums:

Back to Top