View previous topic :: View next topic |
Author |
Message |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 10:24 am Post subject: sqlcode -310 |
|
|
Hi Team,
Please let me know about sqlcode -310
I am moving variable of S9(14)V COMP -3 to variable of S9(13)V COMP -3 and updating the table and I got this error while updating.
In table both the fields are declared as Decimal(14,0) and Decimal(13,0) respectively. I even tried with moving that variable to some temp variable and then tried to move it.
I have checked for numeric and then moving the variables.
I am getting the same error
Please let me know as soon as possible as it needs to be done urgently.
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Mon Sep 22, 2003 10:28 am Post subject: |
|
|
Just a quick check, do you check for negative values or is it possible for the host to get a negative value ? this can also some time cause problems as the Decimal field takes only positive values. |
|
Back to top |
|
 |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 10:43 am Post subject: |
|
|
Please let me know for checking the negative values. What actually shall I check. Please provide me the code. _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 10:46 am Post subject: |
|
|
I have checked for IF FIELD IS POSITIVE
Is that you want to say.
Please let me know _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 10:58 am Post subject: |
|
|
I checked
IF Field is NUMERIC
IF Field is POSITIVE
MOVE A TO B
END-IF
END-IF
and now it is giving data exception at the line of
perform update para after moving all the variables for updating the table.
Please let me know. _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Mon Sep 22, 2003 11:07 am Post subject: |
|
|
Can the variable contain 'negative' value (its a logical decision) ? secondly S9(14)V COMP -3 can hold a vlue much larger than (decimal 14). Have a display to see what is in the Host. |
|
Back to top |
|
 |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 11:27 am Post subject: |
|
|
variable contains 'negative' value in our case.
values are like
0000000000000
-2317
etc.
Please let me know _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Mon Sep 22, 2003 11:40 am Post subject: |
|
|
How do you intend to load a negative value into a decimal field ? If negatives need to accomadated why decimal, why not Integer ? may be look at the design to verify what the requirements are. Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Sep 22, 2003 10:13 pm Post subject: |
|
|
Jai,
I guess you are selecting from one table and updating another table with that value. Is there a chance that you are selecting a null value??
kolusu |
|
Back to top |
|
 |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 10:21 pm Post subject: |
|
|
Hi Suresh,
I have pasted the data which I have seen through File-AID. It contains negative value and I need to work on that. So won't be able to check the positive condition as you have suggested. Integer eguivalent in cobol is less digits and our requirement is of more digits, and it might be the reason for this design. And Decimal can accommodate negative values as it is currently doing.
Please let me know some other suggestions for this.
EDC_REVN_IMPACT_AM CPC_REVN_IMPACT_AM
DEC(14,0) DEC(14,0)
------------------ ------------------
**************** TOP OF DATA **********
-4. -35.
-4. -35.
Please let me know some other suggestions for this as soon as possible.
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 11:02 pm Post subject: |
|
|
Hi Kolusu,
You are correct. I am selecting from one table and updating other table. But all the Fields in the table are declared as NOT NULL. So I think there is no chance of coming NULL here.
So I am moving from first host variable of first table to second host variable if second table which I told is declared as S9(14V comp-3 and S9(13)V comp-3.
I tried to move it to numeric edited field declared as S9(13)V and then tried to move that to final host variable. But got with S0C7 Error
The Statement 2252 which it is showing is starting of the update para. So after moving the variables I am perfoming U3000-UPDATE-TBL and when it is called it is showing this error.
002248 050639*************************************************
002249 050640* U3000-UPDATE-TBL
002250 050641* << I N S E R T T A B L E >>
002251 050642*************************************************
002252 050643 U3000-UPDATE-TBL.
002253 050644
Error Description
------------------
CEE3207S The system detected a data exception (System Completion Code=0C7).
From compile unit MC87TB at entry point MC87TB at statement 2252 at compile unit offset +00003FE8 at address
3EA6CAC0.
<> LEAID ENTERED (LEVEL 09/02/1999 AT 08.41)
<> LEAID ABENDAID DD ALLOCATED BY CWBMAKDD DYNALLOC RC =00000
I even displayed the Variables:
1)CPC-REVN-IMPACT-AM00000000000000
2)W-CPC-REVN-IMPT-AM
3)F-CPC-REVN-IMPT-AM0000000000000
Here 2)W-CPC-REVN-IMPT-AM is the intermediate working storage variable declared as S9(13)V.(also tried with -------------9)
So values displayed are as follows:
1) 00000000000000
2)
3) 0000000000000
Please try to reslove my problem as soon as possible as its urgent and all are waiting for me to complete this process.
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
Jai Beginner
Joined: 06 Jun 2003 Posts: 57 Topics: 20
|
Posted: Mon Sep 22, 2003 11:19 pm Post subject: |
|
|
Sorry Kolusu, I pasted the prev error.
I am facing -310 SQLCODE after checking for the Numeric and not S0C7
IF NUMERIC I am moving the variables and getting the -310 error as I mentioned earlier.
Please let me know. _________________ Have a Great Day.
Thanks & Regards,
Jai |
|
Back to top |
|
 |
|
|