Previous Topic: CADB2SY2 JCLNext Topic: Specifying Control Statements for CADB2SY2


CADB2SY3 JCL

Below is sample JCL that you can use to execute CADB2SY3:

//jobname  JOB acct.info,’DB2 SYNCH’,CLASS=A,MSGCLASS=1
//CADB2SY3 EXEC PGM=CADB2SY3,REGION=2M
//STEPLIB  DD DISP=SHR,DSN=CAI.CAILIB          CA ACF2 DB2 load library
//         DD DISP=SHR,DSN=DB2.DSNLOAD         DB2 load library
//CAD2SNAP DD DISP=OLD,DSN=CAI.CADB2SY3.SNAP   diagnostic file
//SYSMDUMP DD DISP=OLD,DSN=CAI.CADB2SY3.DUMP   diagnostic dump
//SYSOUT   DD SYSOUT=*
//SYSIN    DD DISP=SHR,DSN=CAI.CADB2SY2.REVOKE synchronization REVOKE statements
//         DD DISP=SHR,DSN=CAI.CADB2SY2.GRANT  synchronization GRANT statements

Files

CADB2SY3 uses the files described below:

STEPLIB

(Optional) Specifies libraries containing the IBM DB2 load modules, represented by the DB2.DSNLOAD library, and CA ACF2 Option for DB2 load modules, represented by the CAI.CAILIB library. These statements are not required if these libraries are in the link list concatenation.

SYSOUT

(Required) Specifies a file to which reporting information, error messages, statistics, and so on, is written. The data set characteristics are LRECL=121 and RECFM = FA or FBA.

CAD2SNAP

(Optional) Specifies an optional file that is used to debug DB2 errors. The data set characteristics are LRECL=125 and RECFM=VA or VBA.

SYSMDUMP

(Optional) Specifies a data set to which a dump is written for diagnostic purposes.

SYSIN

(Required) Contains the SQL GRANT and REVOKE statements. The CADB2SY2 job generates these statements and writes them to the CADB2SY2 GRANTS and REVOKES files, which you should use as input here. The first statement in each of these files is a special, fixed format, control statement that identifies the DB2 subsystem being synchronized. Do not modify this statement.

The remaining statements in the file are standard GRANT and REVOKE statements. You can modify or delete these statements. See the DB2 documentation for the syntax of GRANT and REVOKE statements.

You must concatenate the REVOKES file before the GRANTS file. This ensures that CADB2SY3 executes the REVOKE statements before the GRANT statements. The data set characteristics must be LRECL=255 and RECFM=VB.

Required Privileges

To run CADB2SY3 you must have both of these privileges:

We also recommend that you have the SYSADM privilege in CA ACF2 Option for DB2 so that a REVOKE SYSADM statement is not generated for your ID when the REVOKEALL option is specified in the CADB2SY2 component.

DB2 rejects any grants or revokes for the user ID used to run CADB2SY3. This is because DB2 does not allow users to grant or revoke privileges for themselves. We therefore suggest that you create a special ID used only for running the synchronization utility and add an EXCLUDE USER control statement in CADB2SY2 for that user ID.

Return Codes

CADB2SY3 generates the following return codes:

Return Code

Description

00

Processing completed successfully. DB2 GRANT/REVOKE statements were processed successfully.

04

Processing completed with warning messages. Review messages.

08

Errors occurred during processing. One or more error messages are issued with this error. Review the messages and correct the errors as appropriate. Then rerun this job.

12

Errors occurred during processing. One or more error messages are issued with this error. Review the messages and correct the errors as appropriate. Then rerun this job.

16

Initialization error or error in synchronization parameters. Review error messages that were issued with the error. Correct errors as appropriate. Then rerun this job.