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

Load value as current timestamp


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

Moderator


Joined: 14 Oct 2005
Posts: 1209
Location: Bangalore,India

PostPosted: Mon Nov 30, 2009 4:35 pm
Reply with quote

Hi All,

I need to load a table which contain a timestamp field which defind as

VERSION_NUMBER char(5)
CREATION_TS timestamp not null

Now problem is my data file contain some other dats while loading i wanted to load the data with current timestamp

So if file contain data as
Code:
0     2008-06-06-16.21.19.304259
0     2008-11-07-05.45.02.988170
1     2008-08-04-10.16.33.941944


I want to insert it with current timestamp value. I tried to change the data using DFsort . But with DFSort i am not able to get nanosecond ( USing
Code:
OUTREC FIELDS=(1,5,6:DATE4,C'.000000'))


Please advise the way to change load card to load value of createion_ts as current timestamp
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Nov 30, 2009 6:25 pm
Reply with quote

Guptae,

Its possible using FASTLOAD utility without ALTERing you table.

But with LOAD utility, you have to ALTER the table for that column to NOT NULL WITH DEFAULT. Then you can ignore the column in the LOAD card, automatically CURRENT TIMESTAMP will be taken.

Thank You,
Sushanth
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Rexx to read current Panvalet editor/... CLIST & REXX 0
No new posts Dynamically build unload and load sta... DB2 14
No new posts Help with SORT - I need to validate d... DFSORT/ICETOOL 11
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts Load new table with Old unload - DB2 DB2 6
Search our Forums:


Back to Top