Implementing Source Support Best Practices
Source Shared Directory file naming convention
When you use a naming convention to coordinate your source shared directories with their corresponding LOADLIBs, BMC AMI products automatically locate the corresponding Source Shared Directory (SSD) file without requiring further user configuration. BMC AMI products recognize the following naming conventions:
- Replace the last node of the LOADLIB with .SSD
- Add .SSD to the end of the LOADLIB name.
CSS zIIP service
We recommend that you enable the CSS zIIP service. The ECC configuration time is same as the time taken to implement the CSS zIIP service.
You can eliminate significant CPU and system resource use with zIIP, especially when processing many large programs. The benefits can be extensive in terms of 4-hour rolling average costs.
The CSS COBOL, PL/I, and Assembler language processors are particularly well suited for zIIP processing. Running the language processors with zIIP processing enabled can reduce CPU time used by 35 to 65 percent depending on the size and nature of the compiler listing being processed.
The following JCL is an example JCL stream that you could use to enable zIIP usage at IPL time:
DDIO member compression
You can use CSS to compress DDIO members for COBOL, Assembler, and PL/I programs. It saves a considerable amount of DASD space. When combined with zIIP processing, the DASD space savings comes at a meager CPU cost. For information about specifying COMPRESS, see Compile and Assembly JCL examples.
Implementing this strategy from scratch
Step 1: Create a BMC source listing repository
Create a repository corresponding to each LOADLIB controlled by your Source Control Management system.
There are two options for implementing this step:
- Modify your compile JCL to create each repository as needed dynamically.
- Create each repository ahead of time
If you prefer the first option, review this before continuing with Step 2: Set up your compile JCL.
Requirements for each repository
A. Determine the maximum number of members to retain in your repository
Determine the number of members you will retain in your repository. Each repository mirrors one of the LOADLIBs controlled by your SCM. If there is a one-to-one relationship between source code members and LOADLIB members, then the number of members in the LOADLIB, plus an expansion factor, will suffice. However, if your LOADLIB contains composite members, you must determine the number of members based on the source members that are contained in the LOADLIB members.
B. Create the shared directory
Because a shared directory is a collection of member and database information, it does not need to be as large as the databases containing the actual source listing information. The DIRENTS parameter determines the appropriate number of blocks to allocate during file creation. For DIRENTS, take the number of expected members and add approximately 30 percent.
JCL to create a shared directory
//ABNLREPT DD SYSOUT=*
//ABNLPARM DD *
CREATE OBJECT=SRCEDIR, <--- ALLOCATE/FORMAT A SRCEDIR
DIRDSN=COMPWARE.TEST.LOAD.SSD, <--- SRCEDIR VSAM CLUSTER NAME
DIRVOL=VOLSER, <--- VSAM SRCEDIR VOLSER
TYPE=SOURCE, <--- DATABASE TYPE
AM=VSAM, <--- REQUIRED FOR SRCEDIR
REALLOCATE=NO, <--- DO NOT DELETE EXISTING CAT
DIRENTS=3900, <--- MAX MEMBERS ACROSS ALL DBS
DUPMAX=1, <--- KEEP ONLY ONE OF EACH LISTING
CISIZE=18432 <--- VSAM CLUSTER CISIZE
/*
C. Create the initial database
This part aims to create a database large enough to hold the number of members you expect in this repository, as determined previously. Assign that number to the REPTCOUNT parameter. Before executing this JCL, you must determine how many cylinders of DASD space you will need. You should make a reasonable estimate for this, but the MODEL database created in the next part will handle it if you are short.
There are several approaches you can take to estimate the size, depending on what you have available. As a rule of thumb, the number of cylinders required is about half the number of members you expect to hold, assuming you use the Language Processor COMPRESS parameter in your compile JCL. If you have an existing source listing database or DDIO file, you can base the size of your new database on it using DDIOCALC. If you already have listings stored in a PDS or some other form of source repository (for example, VPAM, PROTSYM, SIDEFILES, and so on), you can expect the size to be about the same. The most precise way to estimate would be to do the following:
- Allocate a test database with about 100 cylinders.
- Load about 100 members into it.
- Determine the size by using DDIOCALC.
- Reallocate the database.
Use the following JCL for repositories at the development level:
//ABNLREPT DD SYSOUT=*
//ABNLPARM DD *
CREATE OBJECT=DATABASE, <--- ALLOCATE/FORMAT A DATABASE
DSN=COMPWARE.TEST.SDB.S0000001, <--- DATABASE VSAM CLUSTER NAME
DIRDSN=COMPWARE.TEST.SSD, <--- SHARED DIRECTORY DSN NAME
TYPE=SOURCE, <--- DATABASE PRODUCT TYPE
REPTCOUNT=***, <--- MAXIMUM NUMBER OF MEMBERS
GROUPCOUNT=3, <--- DATABASE MEMBER ALLOC SIZE
EXTENTS=460, <--- MAX NUMBER OF MEMBER ALLOCS
AUTODELETE=STAGED, <--- KEEP THE MOST RECENT LISTING
VOL=VOLSER, <--- VSAM DATABASE VOLSER
AM=VSAM, <--- SPECIFIES VSAM DATABASE
REALLOCATE=NO, <--- DO NOT DELETE EXISTING
CYLINDERS=***, <--- PRIMARY SIZE ALLOCATION
CISIZE=18432 <--- VSAM CLUSTER CISIZE
/*
Use the following JCL for repositories above the development level:
//ABNLREPT DD SYSOUT=*
//ABNLPARM DD *
CREATE OBJECT=DATABASE, <--- ALLOCATE/FORMAT A DATABASE
DSN=COMPWARE.TEST.SDB.S0000001, <--- DATABASE VSAM CLUSTER NAME
DIRDSN=COMPWARE.TEST.SSD, <--- SHARED DIRECTORY DSN NAME
TYPE=SOURCE, <--- DATABASE PRODUCT TYPE
REPTCOUNT=***, <--- MAXIMUM NUMBER OF MEMBERS
GROUPCOUNT=3, <--- DATABASE MEMBER ALLOC SIZE
EXTENTS=460, <--- MAX NUMBER OF MEMBER ALLOCS
AUTODELETE=DUPS, <--- KEEP THE MOST RECENT LISTING
VOL=VOLSER, <--- VSAM DATABASE VOLSER
AM=VSAM, <--- SPECIFIES VSAM DATABASE
REALLOCATE=NO, <--- DO NOT DELETE EXISTING
CYLINDERS=***, <--- PRIMARY SIZE ALLOCATION
CISIZE=18432 <--- VSAM CLUSTER CISIZE
/*
D. Create the DBMODEL
This part is only for repositories corresponding to levels above the development level. For the development level, skip this part. CSS stores the DBMODEL in the shared directory. It is a template for automatically allocating additional databases as needed. For details, see Batch File Utility Usage Considerations under Using-CSS.
The DBMODEL is an overflow if the initial database proves too small, and we do not recommend using it to allocate as many databases as needed. Therefore, if you find that you are allocating dozens of model databases, you may want to consider reallocating your primary database. Also, after your repository contains approximately the maximum number of listings you expect, you may consider reallocating.
JCL to create a DBMODEL
//ABNLREPT DD SYSOUT=*
//ABNLPARM DD *
CREATE OBJECT=DBMODEL, <--- CREATE DBMODEL ENTRY
DSN=COMPWARE.SRCDB.&SEQ, <--- DATABASE VSAM CLUSTER NAME
DIRDSN=COMPWARE.TEST.LOAD.SSD, <--- SHARED DIRECTORY DSN NAME
TYPE=SOURCE, <--- DATABASE PRODUCT TYPE
REPTCOUNT=400, <--- MAXIMUM NUMBER OF MEMBERS
GROUPCOUNT=3, <--- DATABASE MEMBER ALLOC SIZE
EXTENTS=460, <--- MAX NUMBER OF MEMBER ALLOCS
AUTODELETE=DUPS, <--- SELF MAINTAINING DATABASE
VOL=VOLSER, <--- VSAM DATABASE VOLSER
AM=VSAM, <--- SPECIFIES VSAM DATABASE
CYLINDERS=200, <--- PRIMARY SIZE ALLOCATION
DYNCREATE=YES, <--- INVOKE DYNAMIC DB CREATION
CISIZE=18432 <--- VSAM CLUSTER CISIZE
/*
Step 2: Set up your compile JCL
To configure your compile JCL, perform the following:
A. Minimum Required Compile Changes
To use the BMC AMI Language Processor, you must change your compile process.
For information about using the Language Processor, COBOL, Assembler, PL/I, and C, see Using-the-Language-Processors. We recommend using the preprocessor because it automatically enforces the necessary compiler options and handles suppressed code (COPY SUPPRESS or PRINT NOGEN). There is no risk in using it because it does not alter the executable object code and supports the integrated compiler for CICS and Db2.
We also recommend using the Language Processor COMPRESS parameter. Our laboratory testing shows that it can save nearly 40 percent of the DASD required and have a minimal impact on response time.
Modifying your compile or assembly step to use the preprocessor is simple—you can do it in two or three steps:
Change the program to CWP%MAIN.
- Replace CWP%MAIN with CWPCMAIN for COBOL, CWPAMAIN for assembler, CWPPMAIN for PL/I, and CWPZMAIN for C.
Add the CWPDDIO and CWPPRMO DD statements.
B. Conditionally allocating Source Repository
You can update your compile/link JCL to create a source listing repository conditionally by adding a few simple steps.
Add the following step to your JCL to check to see if the repository already exists:
// PARM='ALLOC DSN(&LOADLIB..SSD) SHR'
//*
// IF (CHECKDSN.RC GT 0) THEN
//* .
.
.
// ENDIF
Following the CHECKDSN step, insert steps to create your source directory, initial database, and DBMODEL, by following the instructions described in Step 1: Create a BMC source listing repository corresponding to each LOADLIB controlled by your Source Control Management system.
C. Flagging source code changes
The BMC AMI Language Processor can update the test compiler listing to flag changes to the source code for use by BMC AMI tools.
The following JCL is an example of running the BMC AMI Language Processor flag utility to compare the current compile listing against the production listing:
// SET PRODL=PROD.LOADLIB
// SET MEM=CWXTCOB//*//CHECKDSN EXEC PGM=BPXWDYN,
// PARM='ALLOC DSN(&LOADLIB..SSD) SHR'
//*
// IF (CHECKDSN.RC GT 0) THEN
//*//FLAGSTEP EXEC PGM=CWDDSUTL
//* BELOW SYSEXEC IS THE NEW LIBRARY
//SYSEXEC DD DISP=SHR,DSN=CW.TECH.MFM19240.SYSEXEC
//*
//SYSPRINT DD SYSOUT=*
//ABNLREPT DD SYSOUT=*
//CWPERRM DD SYSOUT=*
//NEW DD DSN=&LOADL..SSD,DISP=SHR
//OLD DD DSN=&PRODL..SSD,DISP=SHR
//ABNLPARM DD *,SYMBOLS=JCLONLY
FLAG ID=(C,80),CDDIO=NEW,
PROGRAM=&MEM,
BDDIO=OLD,
EXEC=RUN,CONTINUE=YES
/*
// ENDIF
Step 3: Set up your JCL for moving/copying members from one library to another
Move members from one library to another.
JCL to move a member
//ABNLFROM DD DISP=SHR,DSN=COMPWARE.TEST.SSD
//ABNLTO DD DISP=SHR,DSN=COMPWARE.QA.SSD
//ABNLREPT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABNLPARM DD *
MOVE TODD=ABNLTO,FROMDD=ABNLFROM,
PROGRAM=CWAACOB1
This JCL is based on the CSS sample library, SLCXCNTL, member CXLPMOVE.
JCL to copy a member
//ABNLFROM DD DISP=SHR,DSN=COMPWARE.TEST.SSD
//ABNLTO DD DISP=SHR,DSN=COMPWARE.QA.SSD
//ABNLREPT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABNLPARM DD *
COPY TODD=ABNLTO,FROMDD=ABNLFROM,
PROGRAM=CWAACOB1
This JCL is based on the CSS sample library, SLCXCNTL, member CXLPMOVE.
Whenever you add a listing to any of your non-production source repositories, run the CSS FLAG command against the version of that program in the production source repository. Running this command flags lines of source code that have been changed since production.
JCL to mark changes compared to production
//SYSEXEC DD DISP=SHR,DSN=SYS2.CW.CY.R320.MLCX900.SLCXEXEC
//PROD DD DISP=SHR,DSN=COMPWARE.PROD.SSD
//CURRENT DD DISP=SHR,DSN=COMPWARE.TEST.SSD
//ABNLPARM DD *
FLAG ID=(C,80), <== PLACE 'C' IN COLUMN 80
BASEDDIO=PROD
We based this example on the CSS sample library member CXFLAG. It compares all changed members in the test level (state) against production and flags all changes with a C in column 80 of the compile listing in the DDIO referenced on the CURRENT DD.
If you are running BMC AMI DevX Code Coverage, add the CICS Populater to your job stream for your CICS programs. CICS Populater updates the Program Inventory file.
CICS Populater JCL
//* Guide for details
//STEP1 EXEC PGM=XVTCPOP,REGION=0M
//STEPLIB DD DISP=SHR,DSN=COMPWARE.cMXDnnn.SMXDOccL
//XVTPGINV DD DISP=SHR,DSN=CODE DEBUG.CICS.PGMINV
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//EXCLUDES DD DISP=SHR,
// DSN=COMPWARE.cMXDnnn.SMXDSAMP(POPEXCL)
//* LOAD LIBRARIES TO BE SEARCHED
//DFHRPL DD DISP=SHR,DSN=CTS410.CICS.H01AC013.LOADLIB.PDSE
//*
//SLSF001 DD DISP=SHR,DSN=COMPWARE.TEST.SSD
//CONTROL DD *
REPLACE ALL
COLLECT ON
DEFINE CCAADEMO CCAADEMO
We based this example on the Code Coverage sample library (SMXDSAMP) member JCLCPOP. That member contains detailed comments.
Step 4: Integrate these processes into your source management system
Configure your source management system as described in the Embedded-Source-Support-listing. If you use Micro Focus ChangeMan ZMF, you might consider making a source repository (SSD) one of the component types in your ChangeMan packages.
JCL to delete members
//ABNLREPT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABNLFROM DD DISP=SHR,DSN=COMPWARE.PROD.SSD
//ABNLPARM DD *
DELETE OBJECT=ENTRY,DIRDD=ABNLFROM,
PROGRAM=PAYROLL