Below is sample JCL that you can use to execute CADB2SY2:
//jobname JOB acct.info,’DB2 SYNCH’,CLASS=A,MSGCLASS=1 //CADB2SY2 EXEC PGM=CADB2SY2,REGION=2M //STEPLIB DD DISP=SHR,DSN=CAI.CAILIB CA ACF2 DB2 load library // DD DISP=SHR,DSN=DB2.DSNLOAD DB2 load library /GRANTS DD DISP=OLD,DSN=CAI.CADB2SY2.GRANT generated grants //REVOKES DD DISP=OLD,DSN=CAI.CADB2SY2.REVOKE generated revokes //CAD2SNAP DD DISP=OLD,DSN=CAI.CADB2SY2.SNAP diagnostic file //SYSOUT DD SYSOUT=* //SYSMDUMP DD DISP=OLD,DSN=CAI.CADB2SY2.DUMP diagnostic dump //SYSIN DD DISP=SHR,DSN=CAI.CADB2SY2.SYSIN synchronization control statements //PUBLIC DD DISP=SHR,DSN=CAI.CADB2SY2.PUBLIC input grant to public statements
CADB2SY2 uses the files described below:
(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.
(Required) Specifies the output data set for the SQL GRANT statements generated by processing the input parameters (ddname of SYSIN) against CA ACF2 Option for DB2 information. The data set characteristics must be LRECL=255 and RECFM=VB. The block size of the REVOKES file must be equal to or greater than the block size of the GRANTS file because REVOKES are concatenated before GRANTS when the CADB2SY3 job is run.
(Required) Specifies the output data set for the SQL REVOKE statements generated by processing the synchronization parameters (ddname of SYSIN) against CA ACF2 Option for DB2 information. The data set characteristics must be LRECL=255 and RECFM=VB.
(Required) Specifies a file to which reporting information, error messages, statistics, and so on, are written. The data set characteristics are LRECL= 121 and RECFM=FA or FBA.
(Optional) Specifies an optional file that is used to debug DB2 errors. The data set characteristics are LRECL=125 and RECFM=VA or VBA.
(Optional) Specifies a data set to which a dump is written if this job abends.
(Required) Specifies the synchronization control statement file for CADB2SY2. This file contains the INCLUDE and EXCLUDE statements, and the required SYNC control statement. The data set characteristics are LRECL=80, RECFM=F or FB.
(Required) Specifies the GRANT TO PUBLIC control statements for CADB2SY2. This file contains the resource privileges that are to be granted to public when the corresponding resources are included for synchronization. Once you use this file, you should include it for all subsequent synchronizations to avoid generating revokes from PUBLIC. Specify DD DUMMY when you do not specify any GRANT TO PUBLIC statements. The data set characteristics are LRECL=80, RECFM=F or FB.
To run CADB2SY2 you must have the unscoped audit or the unscoped security privilege. In addition, you must the CA ACF2 Option for DB2 EXECUTE privilege for these application plans:
CADB2SY2 generates the following return codes:
|
Return Codes |
Description |
|---|---|
|
00 |
Processing completed successfully. DB2 GRANT and REVOKE statements were successfully created. |
|
04 |
Processing completed with warning messages. Review messages before continuing normally. |
|
08 |
Errors occurred during processing. No GRANT or REVOKE statements were created. |
|
12 |
Errors occurred during processing. Some GRANT or REVOKE statements might have been generated. 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. |
|
Copyright © 2011 CA Technologies.
All rights reserved.
|
|