Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP:Conversion error under the IBM Rational Developer for system z complier

34 views
Skip to first unread message

kelvin

unread,
Jan 14, 2010, 9:23:54 PM1/14/10
to
Hi guys,

I'd appreciated if you could help me solve the following problem:

PROGRAM:
-----------------------------------------------------------------------
TEST2:PROCEDURE OPTIONS(MAIN);
DCL CNT DECIMAL FIXED;
DISPLAY('THIS IS TEST2');
GET LIST(CNT);
DISPLAY('INPUT='||CNT);
END TEST2;
-----------------------------------------------------------------------
after run it and then input any numbers, such as 3 in the console.
the error message show up:
---------------DOS screen------------------------------------------
THIS IS TEST2
3
IBM0032I ONCODE=0612 The CONVERSION condition was raised
because a conversion error occurred when converting from
character
to arithmetic.
At offset +000000CE in procedure with entry TEST2
---------------DOS screen------------------------------------------

any help will be appreciated!

Thanks in advanced!

Best regards,
kelvin

James J. Weinkam

unread,
Jan 14, 2010, 11:16:55 PM1/14/10
to
Looks good to me. Tried your program in Personal PL/I for OS/2:

Compiler Messages

Message Line.File Message Description

IBM1047I I 2.1 ORDER option may inhibit optimization.
IBM1043I I 5.1 SYSIN is contextually declared as FILE.
IBM1058I I 6.1 Conversion from FIXED DEC to CHARACTER will be done by
library call.

File Reference Table

File Included From Name

1 E:\PLI\test247.pli

Component Return Code Messages (Total/Suppressed) Time

Compiler 0 3 / 0 0 secs

End of compilation of TEST2

IBM(R) Linker for OS/2(R), Version 01.02.03
(C) Copyright IBM Corporation 1988, 1995.
(C) Copyright Microsoft Corp. 1988, 1989.
- Licensed Material - Program-Property of IBM - All Rights Reserved.

ILink : warning LNK4071: application type not specified; assuming WINDOWCOMPAT
THIS IS TEST2
6
INPUT= 6

kelvin

unread,
Jan 15, 2010, 1:16:56 AM1/15/10
to

Hi James,

Thanks for your quickly response!

I thought it should be OK, but...

thanks anyway!

Best regards,
kelvin

Peter Flass

unread,
Jan 15, 2010, 6:56:19 AM1/15/10
to
What is the program doing in the instructions around 'CE'x?

John W Kennedy

unread,
Jan 15, 2010, 3:49:34 PM1/15/10
to
Try this and see what you get:

TEST2:PROCEDURE OPTIONS(MAIN);
ON CONVERSION BEGIN;
DISPLAY('ERROR CONVERTING ''' || ONSOURCE() || '''');
STOP;
END;


DCL CNT DECIMAL FIXED;
DISPLAY('THIS IS TEST2');
GET LIST(CNT);
DISPLAY('INPUT='||CNT);
END TEST2;

--
John W. Kennedy
A proud member of the reality-based community.

robin

unread,
Jan 15, 2010, 7:57:23 PM1/15/10
to
"kelvin" <shaoj...@gmail.com> wrote in message
news:32edaf76-1706-49e3...@k19g2000yqc.googlegroups.com...

You didn't say what compiler and version you were using.
Try running this agau\in, by typing 3 followed by a space,
then pressing ENTER.|


robin

unread,
Jan 15, 2010, 8:01:38 PM1/15/10
to
"kelvin" <shaoj...@gmail.com> wrote in message
news:32edaf76-1706-49e3...@k19g2000yqc.googlegroups.com...
You did say version after all. It didn't show up in the short version
displayed in the summaries of posts,
and I didn't look at it again when I opened the post.

That was a known bug in early version with 64-bit integers.

Solve it as I said, by putting a space after the data and before
pressing ENTER.

Suggest you get an update for your compiler.


kelvin

unread,
Jan 25, 2010, 3:21:18 AM1/25/10
to

Hi Peter,

Sorry,I do not understand what your mean.
Thanks anyway!

Best regards,
kelvin

kelvin

unread,
Jan 25, 2010, 3:22:24 AM1/25/10
to

Hi John,

Thanks for your help!
the display as follow:
-----------------------------------------
THIS IS TEST2
1
ERROR CONVERTING '1
'
-----------------------------------------

Best regards,
kelvin

kelvin

unread,
Jan 25, 2010, 3:23:35 AM1/25/10
to
On 1月16日, 午前10:01, "robin" <robi...@bigpond.com> wrote:
> "kelvin" <shaojun1...@gmail.com> wrote in message

Hi Robin,

Thank you so much!
It works! according to your instruction.

Thanks!
Best regards,
kelvin

0 new messages