Why and when to perform this task
Following are the steps required to develop applications with SQLJ that run on WebSphere Application Server for z/OS v5.0 using the DB2 Universal JDBC Driver.
Steps for this task
For example, if you develop a bean called Test that uses BMP, code TestBean.sqlj (instead of TestBean.java).
sqlj -compile=false SQLJ_FILE_NAME
See the DB2 documentation for a full list of available syntax options.
Note: You must highlight the name of the EJB jar project, not the name of one of the Enterprise Beans listed beneath it.
When you generate your deployment code, serialized profiles (files with a .ser extension) that are specific to your application are created. These profiles exist in the same directory as your SQLJ files, and must be customized in a z/OS environment before they can be used.
Note: You must create your tables in DB2 before you customize the serialized profiles.
db2sqljcustomize -url JDBC_URL -user USER_NAME -password PASSWORD [-rootpkgname PACKAGE_NAME] SERIALIZED_PROFILE1 SERIALIZED_PROFILE2 ...
If you run the db2sqljcustomize command from the directory that contains the uncustomized serialized profiles, the customized versions overwrite the uncustomized versions because they both have the same names.
The customized files must be placed in a location that is part of the application classpath, and they must exist ahead of the uncustomized serialized profiles in your EJB jar file. We recommend using the Java jar command to replace the serialized profiles in your EJB jar file with the customized profiles.
Note: If you decide to replace the serialized profiles in your EJB jar file, make sure that you maintain the directory structure in which the profiles exist.