View previous topic :: View next topic
|
Author |
Message |
swatheeswaran
New User
Joined: 04 Nov 2008 Posts: 7 Location: Chennai
|
|
|
|
Hi,
I have a variable S9(24)V9(4) COMP-3 to be declared in Easytrieve.
Space occupied is 15 bytes.
Easytrieve declaration:
TEMP-AMT 1 15 P
Length is invalid,maximum digits allowed in easytrieve is 18.
By using ARITH(EXTEND), we can declare this S9(24)V9(4) COMP-3 in COBOL.
Do we have anything in easytrieve to declare S9(24)V9(4) COMP-3. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Not that i am aware of. . .
If you get nothing useful quickly, post a reply Wed afternoon your time or Thursday sometime. I should be where my latest Easytrieve documentation is then. . . |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why is this in the DB2 forum not in CA?
Not that I'm aware of. If there is an option it would be specified on the Easytrieve PARM statement, so you can check your documentation there.
I'd be fascinated to know what you have with 24 non-decimal digits and four decimal digits.
What do you want to do with the field in the Easytrieve program? If you are just shifting it on to an output file, you could use 15 A as your definition. |
|
Back to top |
|
|
swatheeswaran
New User
Joined: 04 Nov 2008 Posts: 7 Location: Chennai
|
|
|
|
Hi Bill,
Thanks for replying. I am not shifting it to o/p file, I would be doing few calculations on that amount field. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Makes things a bit trcky then.
If the digits beyond 18 are used, and it has to be in an Easytriieve, I'd say your best bet would be to call a Cobol module to do any manipulation you need with the field.
Otherwise you'd need to break it up and use math:
Code: |
Value = A + B
Value * X = (A + B) * X = (A * X) + (B * X) |
But you'd be making things complex taking apart and putting back together, problems displaying the value etc.
I'd go for the CALL to Cobol or not Easytrieve. |
|
Back to top |
|
|
|