Steps for using FTP server SQL support

Complete these steps so that you can use the FTP server 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.

    If you are running multiple instances of the z/OS UNIX FTP server at different maintenance levels, you must use DB2PLAN in FTP.DATA for each server and specify unique plan names.

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

Results

To submit a query to DB2 through the FTP server, issue the following commands as necessary:
  • SITE FILETYPE=SQL
  • SITE DB2=db2name, where db2name is the name of a DB2 subsystem at the host
  • RETR fname1fname2, where fname1 is a file at the host that contains a SQL SELECT statement