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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another DB2 Question

Status
Not open for further replies.

Mags1972

IS-IT--Management
Feb 28, 2005
24
GB
In addition to my earlier problem I am finding it difficult in telling the map which DB2 system to work on.

In the input it is quite straight forward whereas I pass the DB2 details as paramters and have defined those in my query on the MDQ file.. ie select * from #db2system#.table_name

The problem I have is on the insert from the output card. As far as I can see the insert statement (-update off..etc) needs to go on the "command" line in the output card and it appear variables are not allowed there.

any ideas??

thanks
 
You can't use variables on the output command line. It depends on how many values you need to be able to handle. If it's only one you could specify a different mdq or for many values use dblookup in an output card and pass the database name as a parameter to the map.
 
Janhes. Thanks for your reply. It is only the one variable that i need for the output and that is the DB2 plan name. This value has already been passed into the map (for the input) but my question is how do I use it for the output??

Can I define an insert statement in an MDQ file and if so how?? I always thought there should be at least something in the command line.

thanks
 
You can either use 2 .mdq files or define the database twice in one .mdq using different names. You can then use these in your command line.
 
Janhes.

The input command/SQL works fine and the variables are passed and used successfully.

It is only on the outbound that I have this trouble. How do I define an "(insert) -UPDATE OFF" command in my output without typing it all on the command line in the card???

If an .MDQ can be used then I would not need 2 but just one because the #SUBSYSTEM# name will always be the same for the out as the in.

If anyone knows of a way then please send me an example, as this is now the only issue (except my new thread)that is holding me up.

Many thanks


 
For the output card select adapter as database and in command enter the commands you want to use such as

-mdq database.mdq -dbname MATSDM -table fmt_batch_progress -t+ -update

If you don't want to type it into the command entry in the output card which is the normal way you could pass the parameters from the calling map

-OD1 '-MDQ database.mdq -DBNAME " + DBNAME Fields:In2 + " -TABLE tablename -TE+

DBNAME Fields:In2 is the value of the database name read from an input card in this example.


If you don't want to use a .mdq, refer to the adapter manual for the commands you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top