View previous topic :: View next topic
|
Author |
Message |
VIGNRSH Warnings : 1 New User
Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
|
|
|
|
Can u Explain with an Example how to override the Compiler options,
to work numeric items of length greater than 18?
I tried to put
CBL arith(extend) before Identifcation section.
but it gives compiler error of maxxcc=8 , saying the statement is found but discrded.. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
You can give ARITH (EXTEND) in your compiler JCL. Compiler options are passed to IGYCRCTL (Compiler program) just like we pass parameters to any program through JCL.
Ex:
Code: |
EXEC PGM=IGYCRCTL,PARM='ARITH(EXTEND)' |
|
|
Back to top |
|
|
VIGNRSH Warnings : 1 New User
Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
|
|
|
|
Hi
For Compiler option
//COBOL EXEC PGM=IGYCRCTL,PARM='ARITH(EXTEND)'
is not working for arithmatic operation.
I am getting
'IGYOS4003-E Invalid option "ARITH(EXTEND)" was found and discarded. '
Can you please suggest how i need to Pass ARITH to compiler. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
TRY THIS-
Code: |
//STEPS1 EXEC PGM=IGYCRCTL,
// PARM=(ARITH(EXTEND)) |
or
Code: |
//STEPS1 EXEC PGM=IGYCRCTL,
// PARM='ARITH(EXTEND)' |
or
Code: |
EXEC PGM=IGYCRCTL,PARM='ARITH(EXTEND)' |
All should work correctly. Can't even guess where you are making mistake in such a simple thing.
Please post the whole compile step so that we can offer suggestions. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
What COBOL are you using?
Post the compile listing page header, that should have the version information.... |
|
Back to top |
|
|
VIGNRSH Warnings : 1 New User
Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
|
|
|
|
THis is the test Jcl iam using...
Pls pot ur Jcl (entire jcl) if this is wrong, so that i can use that...
//xxxxxxx JOB NOTIFY=&SYSUID
//MYPROC PROC LNGPRFX='IGY.V2R1M0',SYSLBLK=3200,
// LIBPRFX='CEE',
// PGMLIB='&&GOSET',GOPGM=GO
//COBOL EXEC PGM=IGYCRCTL,PARM='ARITH(EXTEND)',REGION=2048K
//STEPLIB DD DSNAME=&LNGPRFX..SIGYCOMP,
//STEPLIB DD DSNAME=&LNGPRFX..SIGYCOMP,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,UNIT=SYSDA,
// DISP=(MOD,PASS),SPACE=(TRK,(3,3)),
// DCB=(BLKSIZE=&SYSLBLK)
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//LKED EXEC PGM=HEWL,COND=(8,LT,COBOL),REGION=1024K
//SYSLIB DD DSNAME=&LIBPRFX..SCEELKED,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN
// DD DDNAME=SYSIN
//SYSLMOD DD DSNAME=&PGMLIB(&GOPGM),
// SPACE=(TRK,(10,10,1)),
// UNIT=SYSDA,DISP=(MOD,PASS)
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//MYPROC PEND
//STEP1 EXEC MYPROC
//COBOL.SYSIN DD DSN=xxxx.xxx.xxx(xxxx),DISP=SHR
//LKED.SYSLMOD DD DSN=xxx.xxx.xxx(xxx),DISP=SHR |
|
Back to top |
|
|
VIGNRSH Warnings : 1 New User
Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
|
|
|
|
This is the version of cobol iam using, which i get in compile listing
PP 5648-A25 IBM COBOL for OS/390 & VM 2.1.1 |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
That explains that, 18 is the max number of digits allowed, no ARITH(EXTEND) allowed.....
You are going to have to deal with the problem some other way..... |
|
Back to top |
|
|
VIGNRSH Warnings : 1 New User
Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
|
|
|
|
Have anyone encountered a similar problem??
What do you suggest me to do , to solve this problem... |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Vignrsh,
Use group variable. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
What exactally is the problem?
What sort of operation do you need to apply to this number? |
|
Back to top |
|
|
VIGNRSH Warnings : 1 New User
Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
|
|
|
|
I have a Amount which is 20 numerals in length...
I am multiplying this with another Amount Field and Storing in the same field.
Thats Y i need to perform this operation. If I use group variable and then multiply/add , i am not sure the resultant value would be correct......
Does Anyone have a Suggestion apart from this??? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What created this 20-numeral value?
If your compiler doesn't support it, was it built on some other system?
Is it possible that the value will never be that large/long?
What kind of value is stored in the number? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
When you multiply a 20 byte number by anything larger then 1 you could end up with a number larger then 20 bytes. |
|
Back to top |
|
|
VIGNRSH Warnings : 1 New User
Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
|
|
|
|
Yes , Thats y iam looking out for a way to store up to 31 digits , with Artih(extend)...
I have a Amount which is 20 numerals in length.
It does sometimes , get filled because , it is Total of Revenue /Expenses
Of an Company! ! So there is every need to accomodate that field with length greater than 18, that is usually supported... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
With the level of COBOL you are working with, it is not possible.....
"it is Total of Revenue /Expenses Of an Company".... How many thousands of trillions of whatever unit of currency? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
It does sometimes , get filled because , it is Total of Revenue /Expenses Of an Company! ! So there is every need to accomodate that field with length greater than 18, that is usually supported... |
Please clarify how this can be true. The combined revenues of WalMart and Exxon-Mobil (the 2 largest companies in the world) is $698,393,000,000 (the sum of $351,139,000,000 and $347,254,000,000). This takes only 12 positions before the decimal. What kind of $ are you processing that takes more than that?
On your system, how is that "usually supported"? Doesn't sound like it could have been. . .
There is something you have not posted or that we are missing. . . |
|
Back to top |
|
|
|