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 editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm


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