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
 
how to put a timestamp in a DB2 table using DB2UTIL (update)

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

New User


Joined: 19 Dec 2006
Posts: 2
Location: brussels

PostPosted: Tue Dec 19, 2006 7:56 pm    Post subject: how to put a timestamp in a DB2 table using DB2UTIL (update)
Reply with quote

Hi,

i try to update a DB2 table with a SAS file in input using PROC DB2UTIL. (OS/390)
But I would like to put a timestamp for each update, how can i do ?

PROC DB2UTIL data=sas-file table=db2 table function=u;
MAPTO sas-name=DB2-name;
SQL SQL-statement;
UPDATE;
WHERE SQL-WHERE-clause;
ERRLIMIT=1
RUN;

I think that i have to put a sql statement but don't know what to write !

Thanks

H. Leclipteur
Back to top
View user's profile Send private message

MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Dec 19, 2006 10:16 pm    Post subject: Re: how to put a timestamp in a DB2 table using DB2UTIL (upd
Reply with quote

Quote:

But I would like to put a timestamp for each update, how can i do ?


If you have a timestamp field in table you can set that to 'CURRENT TIMESTAMP', if you want current timestamp.

Code:

UPDATE <TABLE>                                   
   SET FILD_1 = :HOST-1,   
       MNTN_TS       = CURRENT TIMESTAMP         
 WHERE  ......

Back to top
View user's profile Send private message
huks

New User


Joined: 19 Dec 2006
Posts: 2
Location: brussels

PostPosted: Wed Dec 20, 2006 2:14 pm    Post subject: Re: how to put a timestamp in a DB2 table using DB2UTIL (upd
Reply with quote

sorry but no !
the UPDATE Statement in the DB2UTIL PROC is not similar to an UPDATE command,
it causes the table to be updates by using the mapping specification only.

This statement is not mandatory.
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

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