Command line processor plus (CLPPlus)

Command line processor plus (CLPPlus) provides a command-line user interface that you can use to connect to databases and to define, edit, and run statements, scripts, and commands.

CLPPlus complements the functions that the command line processor (CLP) provides. CLPPlus includes the following features:
  • Support for establishing connections to databases when you provide a database user ID and password.
  • A buffer that you can use to store scripts, script fragments, SQL statements, SQL PL statements, or PL/SQL statements for editing and then execution. You can list, print, or edit the text in the buffer or run the text in the buffer as a batch script.
  • A comprehensive set of processor commands that you can use to define variables and strings that you can store in the buffer.
  • A set of commands that retrieve information about a database and database objects.
  • The ability to store buffers or buffer output in a file.
  • Multiple options for formatting the output of scripts and queries.
  • Support for executing system-defined routines.
  • Support for executing operating system commands.
  • An option for recording the output of executed commands, statements, or scripts.
  • Support for clientApplcompat and currentPackageSet properties as defined in the db2dsdriver.cfg configuration file. The db2dsdriver.cfg configuration file is an XML file that contains a list of DSN aliases and their properties. The clientApplcompat and currentPackageSet are configurable in the db2dsdriver.cfg file.

The syntax for configuring the clientApplcompat and currentPackageSet properties in the db2dsdriver.cfg can be seen below in an example of the file contents.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<configuration>
        <dsncollection>
                <dsn alias="S" name=" RS22DB1A" host="169.44.129.45" port=" 4005 ">
                </dsn>
        </dsncollection>
        <databases>
                <database name=" RS22DB1A" host="169.44.129.45" port=" 4005 ">
                <parameter name="clientApplcompat" value="V12R1"/>
                <parameter name=" currentPackageSet" value="NULLID"/>
                </database>
        </databases>
</configuration>
clientApplcompat
For connections to Db2 12 for z/OS data servers at a function level of V12R1M501 or later, set the capabilities of a particular instance of the IBM Data Server Driver for JDBC and SQLJ to a function level that is less than or equal to the function level of the data server.
currentPackageSet
The currentPackageSet identifies the collection ID to search for necessary packages when executing test cases using clpplus.

The following example shows a connection being established with the contents of the IBM data server driver configuration file, which includes the clientApplcompat and currentPackageSet parameter values. The user starts a CLPPlus session and attempts a connection to the DSN alias "S".

CLPPlus: Version 1.6
Copyright (c) 2009, 2011, IBM CORPORATION. All right reserved. 

SQL> connect TS5965@S
DB250001I: CLPPlus has successfully read the configuration file named
  'C:\Users\apandey\db2dsdriver.cfg'.

Enter password: ********

Database Connection Information :
---------------------------------
Hostname = rs22.rocketsoftware.com
Database server = DB2  DSN12015
SQL authorization ID = TS5965
Local database alias = S
Port = 3750

SQL> 

CLPPlus supports SERVER, SERVER_ENCRYPT, KERBEROS, and GSSPLUGIN authentication only.