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

LOADing hard coded value possible in a DB2 Table


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

New User


Joined: 17 Nov 2006
Posts: 6

PostPosted: Mon May 21, 2007 2:49 pm
Reply with quote

Hi,

I have to load a DB2 table, where in a particular has to be loaded with a vale KLS, so can I hard coded in the LOAD utility.

If yes how?

If no what's the procedure. I don't want to chabge the file which is being loaded. I just want to overwrite those values present in the load file.

thanks.
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Mon May 21, 2007 10:46 pm
Reply with quote

Hi,

Code:

where in a particular has to be loaded with a vale KLS


after running load utility you can update the column by
Quote:

UPDATE <TABLE>
SET FIELD = 'KLS'
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 22, 2007 5:46 am
Reply with quote

Hello,

You could change the data in the file before you do the load..
Back to top
View user's profile Send private message
peeterparker

New User


Joined: 17 Nov 2006
Posts: 6

PostPosted: Tue May 22, 2007 9:06 am
Reply with quote

Kiran and Scherrer,

Ya I am aware of those methods, the thing is that I don't want to do it when the load is done nor do I want to change the data in the file.

I want to carry it out during the load takes place, i.e., when we are loading some clomun say SQL_CODE POSITION(33:35) ________ , is their any possibility I could fill up the above blank so that I can load a value forcefully overwritting those in the file.

Peter.
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Wed May 23, 2007 3:23 am
Reply with quote

Check out LOAD option DEFAULTIF

Code:

TRANSTAB  POSITION( 31) CHAR(256) DEFAULTIF(TRANSTYPE='GG'


Above statement loads Default value of TRANSTAB column when TRANSTYPE is 'GG'. You can change default value of column to be what you want and depending on condition load default.
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top