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
 
Load value as current timestamp

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

Moderator


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

PostPosted: Mon Nov 30, 2009 4:35 pm    Post subject: Load value as current timestamp
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: 1013
Location: India

PostPosted: Mon Nov 30, 2009 6:25 pm    Post subject:
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    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 Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm

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