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
 
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

Active User


Joined: 06 Jun 2009
Posts: 101
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: 6968
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

Active User


Joined: 06 Jun 2009
Posts: 101
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: 6968
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

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