IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error-Getting year out of timestamp


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Mar 22, 2013 1:16 am
Reply with quote

Code:
EXEC  SQL                       
  SELECT YEAR(CURRENT TIMESTAMP)
       INTO :WS-TIMESTAMP-YEAR 
  FROM SYSIBM.SYSDUMMY1         
END-EXEC                               


WS-TIMESTAMP-YEAR is definied as x(4).

Is it valid to use it in the application programming?

This works fine with SPUFI and other tools.

but in the application programming I am getting below error,

Code:
====== NEW PAGE ========                                                       
 ERROR ON SETTING TIMESTAMP                                                     
 IGZ0020S A logic error occurred.  Neither FILE STATUS nor a declarative was spe
          AAABD002 at relative location X'8DEA'.  The status code was 42.       
 CEE3250C The system or user abend U1020 R=00000000 was issued.                 
          From compile unit CEEWUCHA at entry point CEEWUCHA at compile unit off
           at address 209779F4.     


Resolution:

Code:
Programmer Response:  Check operation request for the file.   
                                                               
System Action:  The application was terminated.               


Can anyone please suggest.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Mar 22, 2013 1:29 am
Reply with quote

The value returned for the YEAR function is a large integer!
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Mar 22, 2013 2:04 am
Reply with quote

Thanks Craq.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top