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
 

 

Set the CURRENT TIMESTAMP while LOADing the tables from File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Set the CURRENT TIMESTAMP while LOADing the tables from File
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    Post subject: Re: Set the CURRENT TIMESTAMP while LOADing the tables from
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    Post subject:
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    Post subject:
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    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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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