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

Set the CURRENT TIMESTAMP while LOADing the tables from File


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

New User


Joined: 14 Feb 2007
Posts: 6
Location: Bangalore, INDIA

PostPosted: Fri Mar 02, 2007 1:02 pm
Reply with quote

Hi All,

I am trying to load the DB2 table using DSNUPROC. One column type in the table is TIMESTAMP and part of the primary key. How can I specify to insert the TIMESTAMP.


Your help is highly appreciated.
Back to top
View user's profile Send private message
ulfnsc

New User


Joined: 15 Jan 2004
Posts: 19
Location: Stockholm, SWEDEN

PostPosted: Fri Mar 02, 2007 8:37 pm
Reply with quote

If you exclude the TIMESTMP column from your DML and from your load-file, the column will get the timestmp from the time when you run
the DSNUPROC.

Uffe
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Fri Mar 02, 2007 10:52 pm
Reply with quote

I suppose, provided the column was defined as a "WITH DEFAULT".
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Tue Mar 06, 2007 4:36 pm
Reply with quote

Quote:
I am trying to load the DB2 table using DSNUPROC. One column type in the table is TIMESTAMP and part of the primary key. How can I specify to insert the TIMESTAMP.


You have to give the vaule while during the load. Make sure the dates are in the right format otherwise it would through -181 or -180 series error code.If it is defined as NOT NULL WITH DEFAULT and if it is not required for you to put the value then you may ignore that fields in the load control card. DB2 puts the current timestamp for you.
If you want to laod some value then define that in load control card. ex

TMS1 POSITION( 368 )
TIMESTAMP EXTERNAL( 26) ,
TMS2 POSITION( 394 )
TIMESTAMP EXTERNAL( 26) ,

If you are using the unlaoded data from other table then you have to use EXTERNAL keyword to get rid of conversions. Hope this helps you. Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts To get the count of rows for every 1 ... DB2 3
Search our Forums:

Back to Top