Step 3 – Running the Jopaz SQLJ Customizer CUSTOM
Run the Java class com.softwareag.jopaz.sqlj.Main through the IBM JZOS Batch Launcher to customize the serialized profile generated in the previous step and, optionally, execute the Db2 bind. Jopaz provides the Java class com.softwareag.jopaz.sqlj.Main with the following options:

Option | Argument | Mandatory | Description
-url | Db2 connection URL in the format jdbc:db2://server:port/database | No | Specifies the URL connection to a Db2 server instance. If tyou do not specify this option, the connection parameters available in the configuration file db2.properties are used instead. If you specify this option, you must also specify the options-user and -password.
-user | Db2 connection user ID | No | Specifies the connection user ID to authenticate a Db2 server instance. If you do not specify this option, the user specified in the configuration file db2.properties is used instead. If you specify this option, you must also specify the options -url and -password.
-password | Db2 connection password | No | Specifies the connection user password to authenticate a Db2 server instance. If you do not specify this option, the encrypted password or the password specified in the configuration file db2.properties is used instead. If you specify this option, you must also specify the options -url and -user.
-automaticbind | YES or NO | No | Specifies whether the bind is executed after the customization or not. If you set this option to NO, you must use the options -genDBRM and -DBRMDir to execute the bind using the generated DBRM file. The default value is YES.
-genDBRM | None | No | Specifies whether the class generates a DBRM file after execution. When you specify this option, you must also specify -DBRMDir.
-DBRMDir | DBRM files directory | No | Specifies the Unix System Services directory where the DBRM file generated from the serialized profile is stored. This is applicable only when you have the option -genDBRM specified. The generated DBRM file name is the value specified in the parameter -profile. You must specify this option with the option -genDBRM.
-bindoptions | Db2 bind options | Yes | Specifies the bind options used to bind the serialized profile to Db2. You must always specify the isolation level (ISOLATION CS/RS/RR/UR/NC). If you specified -automaticbind YES, you can also specify additional bind options.
-profile | Serialized profile name | Yes | Specifies a name prefix for the generated serialized profile. This file is created in the directory specified under the property jopaz.staticPath in the jpz.properties file. The generated profile file name has the format of the serialized profile name_SJProfile0.ser. It is recommended to use the same name as the .class file.
-collection | Db2 collection name | No | Specifies the collection where the packages from the bind process are added.
-staticpositioned | YES or NO | No | Specifies whether positioned update statements execute statically or dynamically. It is recommended to set this option to YES.
-onlinecheck | YES or NO | No | Specifies whether online checking of data types is performed against the Db2 instance from the file db2.properties or from the-url option. It is recommended to set this option to YES. When -onlinecheck YES, the user must have authorization to execute the statements, which are customized.
-pkgversion | AUTO or version-id | No | Specifies which package version is used when packages are bound to the server for the customization of the serialized profile. If this parameter is not specified, no version is used.
-qualifier | Qualifier name | No | If -onlinecheck YES is set, specifies the qualifier used for unqualified objects in the SQLJ program during online checking.

JCL Example
// SET CLASS='HELLO'
// SET DBRMPATH='/opt/softwareag/jpz/jpz-compiler/dbrm'
// SET COLL=TSTJPZ
// SET ISO=CS
//*-------------------------------------------------------------------
//CUSTOM EXEC PROC=&JVM64,REGSIZE=1024M,
// JAVACLS='com.softwareag.jopaz.sqlj.Main',
// COND=(0,NE,GENPROF.JAVAJVM)
//MAINARGS DD *,SYMBOLS=JCLONLY,LRECL=150
-profile &CLASS -bindoptions ISOLATION &ISO
-onlinecheck YES -staticpositioned YES
-collection &COLL -automaticbind NO
-genDBRM -DBRMDir &DBRMPATH
//STDENV DD DISP=SHR,DSN=&CONFIG
//STDERR DD SYSOUT=*
//STDOUT DD SYSOUT=*
If -automaticbind NO and -genDBRM and -DBRMDir options are specified, the class doesn't execute the binding of the serialized profile to Db2. The class creates a DBRM file in the directory specified by -DBRMDir option.
You can copy the DBRM file to a dataset and bind it to Db2 by executing the Db2 BIND PACKAGE command. For more information about the Db2 BIND PACKAGE command, see the IBM Db2 for z/OS SQL Reference.
If -onlinecheck YES, the user specified in the db2.properties file or the user specified in the -user parameter must have access to execute the statements when customizing the the SQLJ program.