Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us