INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How to pass IN param value also to db2 load utility

How to pass IN param value also to db2 load utility

How to pass IN param value also to db2 load utility

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close