I have coded a PLI program which has calculated amounts in it.
For calculating amounts, I have used PIC'15(9)' as declaration. When I run the program, the program is getting abended with ONCODE=310, fixed overflow condition. And, in PLIDUMP, the following error message is displayed.
Code:
IBM0281S A prior condition was promoted to the ERROR condition.
Original Condition:
CEE3210S The system detected a decimal-overflow exception (System Completion Code ERROR =0CA)
I have checked in SYSPRINT for the value and I could find the below value where it is getting abended. It is getting abended at BAS value which reached 999920174054281.
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
Add, as the first line of your source, and starting in column one:
Code:
*process limits(fixeddec(15,31) fixedbin(31,63));
And you can use, fixed decimal with 31 digits and fixed bin up to "fixed bin (63)" - although you should not be using anything other than "fixed bin (15/31/63)"
Of course if you had read the manuals, you would have know this years ago...
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
FWIW, maybe you can post the options you are currently using (from the top of a compiler listing) and the version of Enterprise PL/I you're using. There may be more options that could do with some updating, I've got pretty comprehensive lists of options that ensure that many questionable constructions are detected at compile time.
Please find the list of compiler options that are used in my application.
Code:
A
AG
ATTRIBUTES(SHORT)
C
NOCOMMON
CP(1140)
CHECK(STG)
DEFAULT(LINKAGE(SYSTEM) REORDER)
FLAG(I)
GN
PROCESS LIMITS(FIXEDDEC(15,31) FIXEDBIN(31,63))
M
MAP
MAXMEM(2097152)
NEST
OF
OP
OPT(2)
OFFSET
OPTIONS
RULES(NOLAXDCL NOLAXPUNC)
SOURCE
SYSTEM(IMS)
XREF(SHORT)