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 Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts Need Guidance regarding UPDATE query Poha Eater DB2 3 Mon Feb 12, 2018 11:35 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am

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