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:

  1. Replace the last node of the LOADLIB with .SSD
  2. Add .SSD to the end of the LOADLIB name.
Example

LOADLIB name: USER.TEST.PAYROLL.LOADLIB
SSD name: USER.TEST.PAYROLL.SSD -or- USER.TEST.PAYROLL.LOADLIB.SSD


Important

When you use naming conventions, you must consider the following: 

  • For BMC AMI DevX Code Debug for CICS, you must enable this by specifying ENABLE_DYNAMIC_FILE_DEF_FOR_SLS_FILES=YES in your parmlib member.
  • The naming convention does not find the source listing in a composite load with a statically linked module in which the listing library does not match the load library.
  • These features are in the base version of any currently supported BMC AMI release.

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.


Important

By default, BMC distributes the CSS zIIP service with ECC as disabled. ECC configuration is necessary to enable it.

The following JCL is an example JCL stream that you could use to enable zIIP usage at IPL time:

Example

//GO EXEC PGM=CXZPINIT
//STEPLIB DD DSN=CPWR.CX.SLCXAUTH,DISP=SHR < == ECC load library, SLCXAUTH
//SYSPRINT DD SYSOUT=*

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

Important

The JCL shown in the example omits a STEPLIB. When installed correctly, z/OS finds the CSS utility in your LINKLST.  If it is not, you must add a STEPLIB pointing to your BMC AMI Enterprise Common Components (ECC) SLCXLOAD. For example:

//STEPLIB  DISP=SHR,DSN=COMPWARE.CY.RNNN.MLCXNNN.SLCXLOAD

Step 1: Create a BMC source listing repository

Important

If you use ESS exclusively, you can skip this step. You do not need to create a 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.

Important

To obtain this information, use File-AID/MVS option 3.1 (batch).

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

//STEP1A EXEC PGM=CWDDALLU
//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
/*

Important

  • This JCL is based on the CSS sample library, SLCXCNTL, member CXALLDLP.
  • DUPMAX=1 ensures that CSS keeps only one version of each listing. You should not specify DUPMAX for repositories at the development level.
  • CWDDALLU supports SMS parameters, which are optional unless your installation requires them. For more information, see Command-Parameters-for-all-DDIO-files.
  • 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.
  • The DIRENTS parameter has a limit of 999999.

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:

//STEP1B EXEC PGM=CWDDALLU
//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:

//STEP1B EXEC PGM=CWDDALLU
//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
/*

Important

  • JCL is based on the CSS sample library, SLCXCNTL, member CXALLVLP.
  • CWDDALLU supports SMS parameters, which are optional unless your installation requires them. For more information, see Command-Parameters-for-all-DDIO-files.
  • GROUPCOUNT=3 controls the maximum size of the member. If your listings are too large, you might need to reallocate with 6, 9, or 12.
  • For REPTCOUNT, specify the number of members you expect to hold in this repository.
  • For CYLINDERS, estimate the amount of space required to hold those members, as described in this section.

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

//STEP1D EXEC PGM=CWDDALLU
//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
/*

Important

  • CWDDALLU supports SMS parameters, which are optional unless your installation requires them. For more information, see Command-Parameters-for-all-DDIO-files.
  • GROUPCOUNT=3 controls the maximum size of the member. If your initial database listings are too large, you might need to use 6, 9, or 12.

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:

  1. Change the program to CWP%MAIN.

    Important

    This is not a replacement for the compiler; it is simply a "shell" around it.

  2. Replace CWP%MAIN with CWPCMAIN for COBOL, CWPAMAIN for assembler, CWPPMAIN for PL/I, and CWPZMAIN for C.
  3. Add the CWPDDIO and CWPPRMO DD statements.

    Important

    For composite modules you can store multiple versions of the same program in the same SSD, by specifying the SSD member name. Use the following command in your compile/assembly step:

    PRO(name)

    In this command, name is the SSD member name. For more information, see Compile and Assembly JCL Examples.

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:

//CHECKDSN EXEC PGM=BPXWDYN,
// 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 LOADL=TEST.LOADLIB
// 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

//STEP3 EXEC PGM=CWDDALLU,REGION=1024K
//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

//STEP3 EXEC PGM=CWDDALLU,REGION=1024K
//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

//CXFLAG EXEC PGM=CWDDALLU
//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.

Important

We do not reference the source code here. It affects the DDIO member only.

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

//* See Code Coverage Mainframe User/Reference
//* 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.

Important

Because CSS retains the listing with the latest compile date, you must delete the member from the higher-level source listing repository before copying in the older member.

JCL to delete members

//DELETE EXEC PGM=CWDDALLU,REGION=1024K
//ABNLREPT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABNLFROM DD DISP=SHR,DSN=COMPWARE.PROD.SSD
//ABNLPARM DD *
DELETE OBJECT=ENTRY,DIRDD=ABNLFROM,
PROGRAM=PAYROLL

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*