View previous topic :: View next topic |
Author |
Message |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Wed Oct 11, 2006 8:07 am Post subject: Reg Sum() Aggregate in CuRsor. |
|
|
Hi,
I am using a Sum() aggregate in a cursor.But i am facing some precompilation errors.
Code: |
SELECT COVERAGE_CD,
COVERAGE_SEQ_NBR,
UNIT_NBR,
COVERAGE_LVL_CD,
SUM(PLP_TRS_PRM_AMT)
|
While doing a fetch i am getting the sum aggregate in a variable which is
9(07)v9(02).
The PLP_TRS_PRM_AMT is DEC(9,2).
I am getting a precompilation error.
UNDEFINED OR UNUSABLE HOST VARIABLE
I tried changing the picture to 9(13)V9(02).But still got the same error.
I am not sure the Picture declaration for the aggregate.
Can you pls help me out? |
|
Back to top |
|
|
dz Beginner
Joined: 02 Apr 2006 Posts: 26 Topics: 0
|
Posted: Wed Oct 11, 2006 8:16 am Post subject: |
|
|
Use a signed field, and either COMP-3 or COMP,
for example: PIC S9(13)V9(2) COMP-3. |
|
Back to top |
|
|
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Wed Oct 11, 2006 8:29 am Post subject: |
|
|
THNX |
|
Back to top |
|
|
|
|