IBM Books

Command Reference

db2profc - DB2 SQLJ Profile Customizer

Processes an SQLJ profile containing embedded SQL statements. By default, a DB2 package is created in the database; this utility augments the profile with DB2-specific information for use at run time. This utility should be run after the SQLJ application has been translated, but before the application is run.

Authorization

One of the following:

The user also needs all privileges required to compile any static SQL statements in the application. Privileges granted to groups are not used for authorization checking of static statements. If the user has sysadm authority, but not explicit privileges to complete the bind, the database manager grants explicit dbadm authority automatically.

Required Connection

This command establishes a database connection.

Command Syntax

>>-db2profc----+-----------------------------------------+------>
               '--user=--username---password=--password--'
 
>-----+--------------------------------------+------------------>
      '--prepoptions=--"precompile-options"--'
 
>-----url=--JDBC-url---profilename-----------------------------><
 

Command Parameters

-user= username
Specifies the name used when connecting to a database to perform profile customization.

-password= password
Specifies the password for the user name.

-prepoptions= "precompile-options"
Specifies a list of precompile options to be used by the DB2 precompiler. For a list of supported precompile options, see the Application Development Guide.

The precompile option "PACKAGE USING package-name" specifies the name of the package that is to be generated by the precompiler. If a name is not entered, the name of the profile (minus extension and folded to uppercase) is used. Maximum length is 8 characters.

The precompile option "BINDFILE USING bind-file" specifies the name of the bind file that is to be generated by the precompiler. The file name must have an extension of .bnd. If a file name is not entered, the precompiler uses the name of the profile, and adds the .bnd extension. If a path is not provided, the bind file is created in the current directory.

-url= JDBC-url
Specifies a JDBC URL for establishing the database connection.

profilename
Specifies the name of a profile in which SQL statements are stored. When an SQLJ file is translated into a Java file, information about the SQL operations it contains is stored in SQLJ-generated resource files called profiles. Profiles are identified by the suffix _SJProfileN (where N is an integer) following the name of the original input file. They have a .ser extension. Profile names can be specified with or without the .ser extension.

Examples

   db2profc -user=username -password=password -url=JDBC-url
      -prepoptions="bindfile using pgmname1.bnd package using pgmname1"
      pgmname_SJProfile1.ser                                          

Usage Notes

For more information about SQLJ, see the Application Development Guide.

See Also

db2profp - DB2 SQLJ Profile Printer.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]