Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us