Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass IN param value also to db2 load utility

Status
Not open for further replies.

vikramrao

Programmer
Feb 29, 2012
1
US
Hi All,

How to pass IN param value also to db2 load utility or import
I need some info on DB2 load utility tool, as of now I'm able to load the delimited flat file content to target table, working good.
What I need in addition to that, while executing load command at the same time I want to pass some IN param value for col4, how can we do that? Please.
soppose IN param value is 123 then the final table looks like as below. abc,xyz,pqr are from delimited flat file.
table1:

col1 col2 col3 col4
abc xyz pqr 123

I want insert fileid and processId IN param vlaues at the same while populating flat file to table
CREATE OR REPLACE PROCEDURE sp_populate_rawdata_tbl_from_file (
IN flat_file_path_in VARCHAR(500),
IN fileid BIGINT,
IN processId BIGINT,
)
DYNAMIC RESULT SETS 1
P1: BEGIN
CALL sysproc.admin_cmd('import from ' concat flat_file_path_in concat ' of del modified by IDENTITYIGNORE USEDEFAULTS
insert into abc.my_rawdata_tbl' );
END P1

I appreciate your help, First time I'm working on db2 database.

Thank you,
Vikram.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top