Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Error-Getting year out of timestamp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2165
Location: NY,USA

PostPosted: Fri Mar 22, 2013 1:16 am    Post subject: Error-Getting year out of timestamp
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    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2165
Location: NY,USA

PostPosted: Fri Mar 22, 2013 2:04 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts data conversion error maxsubrat PL/I & Assembler 4 Thu May 09, 2019 10:57 pm
No new posts how to add date & timestamp to th... dharmaraok DFSORT/ICETOOL 5 Thu Apr 18, 2019 2:45 pm
This topic is locked: you cannot edit posts or make replies. PARAMETER 'F1' IS UNIDENTIFIED error ... Poha Eater DFSORT/ICETOOL 14 Fri Feb 01, 2019 2:39 pm
No new posts SORT INNER JOIN [F1] OUT OF SEQ ERROR balaji81_k DFSORT/ICETOOL 8 Wed Jan 30, 2019 3:21 am
No new posts DB2 Timestamp field weird behaviour. rizwanaccy DB2 7 Wed Dec 26, 2018 4:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us