Steps for using FTP client SQL support

Complete these steps so that you can use the FTP client to submit queries to the DB2® subsystem.

Procedure

Perform the following steps:

  1. Start the DB2 subsystem.
  2. BIND the DBRM called EZAFTPMQ. This must be done whenever the part EZAFTPMQ.CSQLMVS has been recompiled.

    The DBRM must be bound into the plan named EZAFTPMQ, unless the keyword DB2PLAN was used in your FTP.DATA file to specify a different plan name.

  3. Grant execute privilege to the public for the plan created in the previous step.

Results

To use the FTP client to submit a query to DB2 and send the output to the FTP server, issue the following commands as necessary:
  • LOCSITE FILETYPE=SQL
  • LOCSITE DB2=db2name where db2name is the name of a DB2 subsystem at the local host
  • PUT fname1 fname2 where fname1 is a local file that contains a SQL SELECT statement