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
 

 

NUMVAL and IGZ0152S error

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

New User


Joined: 06 Jun 2009
Posts: 99
Location: UK

PostPosted: Mon Aug 09, 2010 4:02 pm    Post subject: NUMVAL and IGZ0152S error
Reply with quote

Hi,

JIYZ0151-CDGCOMER PIC X(15).
PT-CPTRAMS-STORE PIC 9(12).

COMPUTE PT-CPTRAMS-STORE = FUNCTION NUMVAL(JIYZ0151-CDGCOMER)
END-COMPUTE


Input is
JIYZ0151-CDGCOMER
X(15) DISP '00000100802HOUS'

I am getting error:
IGZ0152S Invalid character O was found in column 13 in argument-1 for function NUMVAL in program JICZ669 at
displacement X'335C'.
From compile unit JICZ669 at entry point JICZ669 at statement 1380 at compile unit offset +0000335C at entry
offset +0000335C at address 16D04304.

I had expected that NUMVAL will move 00000100802 into PT-CPTRAMS-STORE. However, program is abending on 'O'. I wondering why not 'H' or 'S'.

Could you please explain why is it abending, why NUMVAL is not working? Why is it pointin to 'O'?

Many thanks,
Zurich Lad
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Aug 09, 2010 4:12 pm    Post subject:
Reply with quote

because H is a valid zoned decimal signed +8,
even though O s a valid zoned decimal signed -6,
NUMVAL does not accept more than 1 sign.

IF you would refer to the documentation about NUMVAL,
you will see that the function only accepts certain characters.
even for NUMVAL the text garbage has to be culled.

you could use an INSPECT CONVERTING before the NUMVAL
or determine exactly in your text where valid numeric data ends
and garbage begins
and use REFERENCE MODIFICATION on the NUMVAL.
Back to top
View user's profile Send private message
zh_lad

New User


Joined: 06 Jun 2009
Posts: 99
Location: UK

PostPosted: Mon Aug 09, 2010 4:21 pm    Post subject:
Reply with quote

Thanks very much Dick.

It was interesting surprise knowing NUMVAL does not accept more than one sign.

i will use INSPECT and REFERENCE MOD to fetch numeric part.

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

Global Moderator


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

PostPosted: Mon Aug 09, 2010 4:27 pm    Post subject:
Reply with quote

Quote:
It was interesting surprise knowing NUMVAL does not accept more than one sign.


well, to be honest, I did not find that in any manual.
I just figured,
what would NUMVAL do with two (2) signs?
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Tue Aug 10, 2010 12:05 pm    Post subject:
Reply with quote

Quote:
I just figured,
what would NUMVAL do with two (2) signs?

Like the OP just experienced: It rolls over and dies...
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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am


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