MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DB2 - Update Error (-180)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
20cents
Beginner


Joined: 26 Oct 2005
Posts: 25
Topics: 7
Location: Between Heaven and Hell

PostPosted: Thu Jan 12, 2006 4:53 am    Post subject: DB2 - Update Error (-180) Reply with quote

What's wrong with this code?
Code:

    EXEC SQL                                                 
       UPDATE TBC_CHGOF                                     
          SET DATE_CHGOF_RVRSL    = :KCO-DATE-CHGOF-RVRSL   
                                  :KCO-DATE-CHGOF-RVRSL-IND,
              INDC_CHGOF_RESET    = :KCO-INDC-CHGOF-RESET,   
              TIME_LAST_UPD       = CURRENT TIMESTAMP,       
              RFRN_REP_LAST_UPD   = :KCO-RFRN-REP-LAST-UPD   
        WHERE NBR_CARDH_ACCT = :KCO-NBR-CARDH-ACCT           
          AND TIME_ADD = :KCO-TIME-ADD                       
       END-EXEC                                             

I ended with:

DSNT408I SQLCODE = -180, ERROR: THE DATE, TIME, OR TIMESTAMP VALUE *N IS
INVALID
DSNT418I SQLSTATE = 22007 SQLSTATE RETURN CODE
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Thu Jan 12, 2006 5:10 am    Post subject: Reply with quote

20cents,

There is a comma missing after KCO-DATE-CHGOF-RVRSL. is DATE_CHGOF_RVRSL defined to contain nulls and KCO-DATE-CHGOF-RVRSL-IND is the null indicator? Basically -180 is a caused due to an Invalid date.

Check this link for a detailed explanation of sqlcode of -180

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNMCH11/2.1.6.61?SHELF=&DT=20010718150520&CASE=

Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
20cents
Beginner


Joined: 26 Oct 2005
Posts: 25
Topics: 7
Location: Between Heaven and Hell

PostPosted: Thu Jan 12, 2006 6:00 am    Post subject: Reply with quote

Thanks kolusu for the prompt reply.

I saw the error... KCO-DATE-CHGOF-RVRSL contained 0833102005 which is an invalida date format. What puzzles me... the re-formatting done in the Working Storage didn't seem to work.

01 WS-CURR-DATE.
05 WS-CURR-MONTH PIC X(2) VALUE SPACES.
05 FILLER PIC X VALUE '/'.
05 WS-CURR-DAY PIC X(2) VALUE SPACES.
05 FILLER PIC X VALUE '/'.
05 WS-CURR-YEAR PIC X(4) VALUE SPACES.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group