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
 

 

Problem with PIC attribute when assigned as PIC'16(9)'

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Thu Jul 04, 2013 2:35 pm    Post subject: Problem with PIC attribute when assigned as PIC'16(9)'
Reply with quote

Dear Team,

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.

Code:
WK_IBASCALC = 00000000031080                   
WK_IVACALC  = 00000000003730                   
IMPORTEC =  00000000000000                     
IBASEIMC =  00000000031080                     
IVASOPC  =  00000000003730                     
CVA= 00000315677160                             
CIM= 00000231438621                             
CBA= 00002725554580                             
IMP= 192176915587569                           
[b]BAS= 999920174054281  [/b]                         
CIV= 232596375504000                           
CIM= 00000231438621                             
CBA= 00002725695290                             
CVA= 00000315694045                             
WK_IMPOCALC = 00000000000000                   
WK_IBASCALC = 00000000140710                   
WK_IVACALC  = 00000000016885                   
IMPORTEC =  00000000000000                     
IBASEIMC =  00000000140710                     
IVASOPC  =  00000000016885                     
CVA= 00000315694045                             
CIM= 00000231438621                             
CBA= 00002725695290                             
IMP= 192176915587569                           
PROGRAM UNIVASEL ABENDED ABNORMALLY             
PROC NAME        :         


So, I have tried increasing the PIC value to PIC'(16)9'. But, now I am getting the compiler error, which says, the precision is too big.

So, I suppose, PIC limit is 15.

I would like to know if there is any other way/method to handle this error?

Kindly let me know in case you need more information.
Back to top
View user's profile Send private message

prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Thu Jul 04, 2013 4:13 pm    Post subject:
Reply with quote

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...
Back to top
View user's profile Send private message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Thu Jul 04, 2013 4:25 pm    Post subject:
Reply with quote

Dear Prino,


Thanks a lot buddy. I have added the line and it worked icon_smile.gif
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Thu Jul 04, 2013 4:31 pm    Post subject:
Reply with quote

I suggest that you talk to the people who control the compile procedures and ask them to change this to be the default.
Back to top
View user's profile Send private message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Thu Jul 04, 2013 7:10 pm    Post subject:
Reply with quote

Dear Prino,

Yes, I would surely do that. I have already sent a note to the librarians to fix this issue.

Thanks a lot for your time and support. icon_smile.gif
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Thu Jul 04, 2013 8:42 pm    Post subject:
Reply with quote

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.

If you post it, please use
Code:
[code][/code]
tags!
Back to top
View user's profile Send private message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Fri Jul 05, 2013 4:27 pm    Post subject:
Reply with quote

Hi Prino,


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)   
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Fri Jul 05, 2013 4:43 pm    Post subject:
Reply with quote

That's not everything!

Also, I'm very surprised that you don't use "OPT(3)"...

I would expect (for EPLI V4R3) something along the lines of

Code:
   aggregate(dec)
   arch(8)
   attributes(s)
   backreg(5)
   bifprec(31)
   blank('05'x)
   blkoff
   caserules(keyword(lower))
   ceestart(last)
   check(noconformance)
   cmpat(v2)
   codepage(1140)
 nocommon
   compile
   copyright('(C) Copyright ThisCo')
   csect
   csectcut(4)
   currency('$')
 nodbcs
   dd(sysprint,sysin,syslib,syspunch,*,*,*,*)
   dd(*,*,*,*,syslin,sysadata,sysxmlsd,sysdebug)
   ddsql('')
   decimal(foflonasgn nofoflonmult noforcedsign)
   default(ibm)
   default(aligned)
   default(assignable)
   default(byaddr)
   default(connected)
   default(desclocator)
   default(descriptor)
   default(dummy(unaligned))
   default(e(hexadec))
   default(ebcdic)
   default(hexadec)
   default(linkage(optlink))
   default(native)
   default(nativeaddr)
   default(nobin1arg)
   default(noevendec)
   default(noinitfill)
   default(noinline)
   default(nonrecursive)
   default(nooverlap)
   default(noretcode)
   default(nullstraddr)
   default(nullstrptr(sysnull))
   default(null370)
   default(ordinal(max))
   default(reorder)
   default(returns(byaddr))
   default(short(hexadec))
   default(pseudodummy)
   deprecate(builtin() entry() include() variable() stmt())
   deprecatenext(builtin() entry() include() variable() stmt())
   display(wto)
 nodllinit
 noexit
   extrn(full)
   flag(i)
   float(afp(novolatile) nodfp)
   floatinmath(asis)
   gonumber
 nographic
   hgpr(nopreserve)
   ignore(put, display, assert)
 noignore
   incafter(process(''))
 noinitauto
 noinitbased
 noinitctl
 noinitstatic
 nis
 nointerrupt
   langlvl(os)
   limits(extname(7) fixeddec(15,31) fixedbin(31,63) name(31))
   lc(32767)
 nolist
   listview(afterall)
 nomacro
 nomap
   margini(' ')
   mar(2,72,1)
   maxgen(1024)
   maxmem(1048576)
   maxmsg(e 32767)
   maxnest(block(8) do(8) if(8))
   maxstmt(2048)
   maxtemp(4096)
 nomdeck
   msgsummary(xref)
   names('#@$','#@$')
   natlang(enu)
   nest
   not('^')
   number
   obj
 nooffset
 noonsnap
   opt(3)
   options(all)
   or('|')
   pp(macro('case(asis)'))
   pplist(erase)
   prectype(ans)
 noproceed(s)
   process(delete)
   quote('"')
   reduce
 norent
   resexp
   rtcheck(nonullptr)
   rules(ibm)
   rules(  byname)
   rules(  controlled)
   rules(nodecsize)
   rules(  elseif)
   rules(noevendec)
   rules(  globaldo)
   rules(nogoto(strict))
   rules(nolaxbif)
   rules(nolaxctl)
   rules(nolaxdcl)
   rules(nolaxdef)
   rules(nolaxentry(strict))
   rules(nolaxif)
   rules(nolaxinout)
   rules(nolaxlink)
   rules(nolaxmargins(xnumeric))
   rules(  laxnested)
   rules(nolaxpunc)
   rules(  laxqual)
   rules(nolaxreturn)
   rules(  laxscale)
   rules(nolaxsemi)
   rules(nolaxstg)
   rules(nolaxstrz)
   rules(nomulticlose)
   rules(nopadding)
   rules(noprocendonly)
   rules(  recursive)
   rules(noselfassign)
   rules(  stop)
   rules(nounref)
   semantic
   service('What service?')
   source
   spill(512)
   static(full)
   stmt
 nostorage
   syntax
   sysparm('')
   system(mvs)
   test(all,sym,separate,sepname)
 notest
   unroll(auto)
   usage(hex(currentsize))
   usage(round(ibm))
   usage(substr(strict))
   usage(unspec(ibm))
   widechar(bigendian)
   window(1950)
   writable
   xref(s)


Possibly with some changes to cater fro CICS, DB2, IMS etc.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Problem with GETMAIN command amitc23 CICS 6 Thu Sep 01, 2016 1:01 pm
No new posts TXT2PDF problem - printing @ in PDF vipul65 All Other Mainframe Topics 9 Thu Aug 25, 2016 12:48 am


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