Why and when to perform this task
Note:
Following are the steps required to develop applications with SQLJ that run on WebSphere Application Server for z/OS v5.x using the DB2 for z/OS Legacy driver.
Steps for this task
sqlj -compile=false SQLJ_FILE_NAME
Use the data source you created in Step 1 to resolve your resource references.
db2profc -pgmname=PROGRAM_NAME PROFILE_NAME
The following fields are an example:
Space units=TRACK Primary quantity=15 Secondary quantity=5 Directory blocks=10 Record format=FB Record length=80 Block size=27920 Data set name type=PDS
The output of the DB2 profile customizer and the input file have the same name. Move the output file ahead of the original serialized profile in the classpath. Alternatively, you can move the customized profile into the EJB jar file, replacing the original. We recommend that you replace the original file.
IMPORTANT: If you run the db2profc command from the directory where the serialized profile exists, the profile customizer overwrites the serialized profile. Because you need only the customized version after the profile customizer has run, this is not a problem.
Note: You must create your database tables before binding your DBRMs. If you do not, the bind job will fail.
The db2profc customization command creates a series of DBRMs that must be bound into packages. For each customized profile, four DBRMs are created.
These DBRMs:
For example, if you log in as IBMUSER, and you specify -pgmname=TESTBMP, then run the db2profc command, the four datasets, TESTBMP1, TESTBMP2, TESTBMP3, AND TESTBMP4 are created and placed in the PDS IBMUSER.DBRMLIB.DATA.
These datasets must be bound into packages with isolation of UR, CS, RS, and RR, respectively. You must run a bind for each serialized profile that you customize.
IMPORTANT: You must also include the JDBC packages in the package list (PKLIST) of your new plan. The default names for the JDBC packages to include are DSNJDBC.DSNJDBC1, ..., DSNJDBC.DSNJDBC4. If your installation did not use the default names for the JDBC packages, contact your DB2 administrator to determine the names of the JDBC packages that you need to include.
Following is a sample job used to bind a new plan.
//BBOOLS JOB (516B,1025),'IBMUSER',MSGCLASS=H,CLASS=A,PRTY=14, // NOTIFY=&SYSUID,TIME=1440,USER=IBMUSER,PASSWORD=IBMUSER, // MSGLEVEL=(1,1) //******************************************************************** //BINDOLS EXEC PGM=IKJEFT01,DYNAMNBR=20 //DBRMLIB DD DSN=IBMUSER.DBRMLIB.DATA,DISP=SHR //* DD DSN=MVSDSOM.DB2710.SDSNDBRM,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(DB2) BIND - PACKAGE(TESTBMP) - QUALIFIER(IBMUSER) - MEMBER(TESTBMP1) - VALIDATE(BIND) - ISOLATION(UR) - SQLERROR(NOPACKAGE) - BIND - PACKAGE(TESTBMP) - QUALIFIER(IBMUSER) - MEMBER(TESTBMP2) - VALIDATE(BIND) - ISOLATION(CS) - SQLERROR(NOPACKAGE) - BIND - PACKAGE(TESTBMP) - QUALIFIER(IBMUSER) - MEMBER(TESTBMP3) - VALIDATE(BIND) - ISOLATION(RS) - SQLERROR(NOPACKAGE) - BIND - PACKAGE(TESTBMP) - QUALIFIER(IBMUSER) - MEMBER(TESTBMP4) - VALIDATE(BIND) - ISOLATION(RR) - SQLERROR(NOPACKAGE) - BIND PLAN(SQLJPLAN) - QUALIFIER(IBMUSER) - PKLIST(TESTBMP.* - DSNJDBC.* ) - ACTION(REPLACE) RETAIN - VALIDATE(BIND) END /*
GRANT EXECUTE ON PLAN PLANNAME TO APPSERVERIDWhere: