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
 

 

LOADing hard coded value possible in a DB2 Table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: LOADing hard coded value possible in a DB2 Table
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    Post subject:
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

Site Director


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

PostPosted: Tue May 22, 2007 5:46 am    Post subject:
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    Post subject:
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    Post subject:
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    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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm


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