Passing parameter to sqlloader [message #69774] |
Mon, 04 March 2002 14:52 |
Mike
Messages: 417 Registered: September 1998
|
Senior Member |
|
|
Hi,
Is there a way to pass a constant value to sqlloader?. What I mean is if I have some vendor's data in a file, I want to create a batch file which accepts vendor's id and calls sqlloader to insert into a table. So I need to pass vendor id to sqlloader. How can I do this?
Thanks
Mike
|
|
|
Re: Passing parameter to sqlloader [message #69775 is a reply to message #69774] |
Mon, 04 March 2002 18:39 |
Jim Willis
Messages: 11 Registered: October 2001
|
Junior Member |
|
|
If this is in a UNIX environment you can do the following:
1) create a unix shell script to execute sql loader.
2) create a "skeleton" ctl card with "variables" to replace with your constant values using the sed command.
3) just before executing the sql loader command you would use sed to replace the variables with constants and redirect the output to a "real ctl card" that would be used with execution of sql loader.
I now do the same thing for our loads.
Hope this helps.
Jim Willis
|
|
|
|