SCLM Guide
SCLM Guide
SCLM Guide
Peter Eck Liam Doherty Jyotindra Mehta Kenichi Yoshimura Ben Horwood Jennifer Nelson
ibm.com/redbooks
International Technical Support Organization Getting Started with SCLM: A Practical Guide to SCLM and SCLM Advanced Edition September 2007
SG24-7392-00
Note: Before using this information and the product it supports, read the information in Notices on page xiii.
First Edition (September 2007) This edition applies to ISPF for Version 1 Release 8.0 of the licensed program z/OS (program number 5694-A01). Plus Version 2, Release 1 of SCLM Developer Toolkit (program number 5655-R37), Version 1, Release 1 of IBM Breeze for SCLM for z/OS (program number 5697-G58), Version 1, Release 1 of IBM Enhanced Access Control for SCLM for z/OS (program number 5697-H59) and Version 3, Release 1 of IBM SCLM Administrator Toolkit (program number 5697-N51)..
Copyright International Business Machines Corporation 2007. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv The team that wrote this Redbooks publication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Part 1. Basic setup and migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. SCLM project setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Roles addressed throughout the book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Overview of the SCLM project environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Overview of sample project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3.1 Steps to set up the sample project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.2 Understanding the sample project definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 Defining your hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.1 Rules governing SCLM project hierarchies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.2 Project hierarchy sample. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.3 Establishing authorization codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.5 Choosing your SCLM types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.5.1 Deferred Data Set Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.6 Data set naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.6.1 Flexible naming of project partitioned data sets . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.7 Choosing your SCLM languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.7.1 Modifying example language definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.8 Project controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.8.1 Data set naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.8.2 SCLM temporary data set allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.8.3 Member level locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.8.4 Miscellaneous control options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.8.5 Common project control macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.9 Setting up your accounting and project data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.9.1 Creating the accounting data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.9.2 Creating the export data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 1.9.3 Creating the project partitioned data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 1.9.4 PDS versus PDSE considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.9.5 Some recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.10 Setting up your audit and versioning capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.10.1 Audit and versioning capability: Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.10.2 Setting up the project definition for audit and versioning capability . . . . . . . . . . 29 1.10.3 Creating the audit control data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.10.4 Creating the versioning partitioned data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 1.10.5 PDS versus PDSE considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 1.11 Setting up the project for package backout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 1.11.1 Package Backout utility: Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 1.11.2 Package backout: Step-by-step instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 1.11.3 Package backout: Example project definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 1.12 Basic security considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Copyright IBM Corp. 2007. All rights reserved.
iii
1.12.1 PROJDEFS data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.12.2 Project partitioned data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.12.3 Control data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.13 Logon proc and FLMLIBS considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.13.1 SCLM batch considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.13.2 Preallocating ISPF temporary data sets to VIO . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Language definitions based upon samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Using ddnames and ddname substitution lists . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Enterprise COBOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Enterprise COBOL with integrated CICS translator . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Enterprise COBOL with separate CICS precompile . . . . . . . . . . . . . . . . . . . . . . . 2.2.5 Enterprise PL/I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.6 High Level Assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.7 z/OS binder/linkage editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.8 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Writing build/copy processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Types of translators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Developing new translators: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.3 Developing new translators: Example problem description . . . . . . . . . . . . . . . . . 2.3.4 Developing new translators: Example problem analysis. . . . . . . . . . . . . . . . . . . . 2.3.5 Developing new translators: Example technical approach . . . . . . . . . . . . . . . . . . 2.3.6 Developing new translators: Example source code . . . . . . . . . . . . . . . . . . . . . . .
35 35 35 36 36 36
39 40 40 41 43 51 55 65 72 80 86 86 86 87 87 88 88 89
Chapter 3. Writing DB2 translators and bind processing . . . . . . . . . . . . . . . . . . . . . . . 91 3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 3.1.1 Bind control object (DB2 CLIST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 3.1.2 Processing of DB2 SQL program in SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 3.2 Enabling DB2 support for your SCLM project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 3.2.1 Adding DB2-specific types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 3.2.2 Allocating project partitioned data sets for DB2 support . . . . . . . . . . . . . . . . . . . . 94 3.2.3 Additional language definitions for DB2 support . . . . . . . . . . . . . . . . . . . . . . . . . . 95 3.2.4 Tailoring languages for package bind and plan bind. . . . . . . . . . . . . . . . . . . . . . . 95 3.2.5 Tailoring project definition for DB2 support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 3.2.6 Creating an LEC architecture definition for program with SQL . . . . . . . . . . . . . . . 97 3.2.7 Creating an HL architecture definition to control link-edit and bind. . . . . . . . . . . . 97 3.2.8 Creating generic and HL architecture definitions . . . . . . . . . . . . . . . . . . . . . . . . . 98 3.2.9 Creating a bind control member (DB2CLIST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 3.2.10 Binding on different LPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 3.2.11 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 3.3 FLMCSPDB DB2 bind/free translator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 3.3.1 FLMCSPDB invocation parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 3.4 Sample language definitions for DB2 support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 3.4.1 DB2 bind/free language translator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 3.4.2 DB2 bind/free output language translator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 3.4.3 Enterprise COBOL with DB2 and CICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 3.4.4 Storing DB2 declarations in a different library from program includes . . . . . . . . 112 Chapter 4. Migrating to SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 4.1 Principles of migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 4.2 Creating a migration plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 iv
A Practical Guide to Setting Up and Using SCLM
4.3 Creating alternate MIGRATE project definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Production freeze versus delta migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Separating your source code into extract datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Determining source inventory and map to extract and SCLM datasets . . . . . . . 4.5.2 Removing and/or modifying proprietary library code. . . . . . . . . . . . . . . . . . . . . . 4.6 Copy exit versus JCL changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Running the SCLM Migration Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8 ARCHDEF generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.1 Creating member listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2 Creating ARCHDEFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 Cutover to SCLM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 5. SCLM architecture definition considerations . . . . . . . . . . . . . . . . . . . . . . 5.1 Types of ARCHDEF members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 High-level (HL) ARCHDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2 Link-edit control ARCHDEFs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.3 Compilation control architecture members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.4 Generic architecture members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Understanding the ARCHDEF language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Rules for coding ARCHDEFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Common ARCHDEF keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.3 ARCHDEFs naming convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.4 Creating model ARCHDEFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
122 123 123 124 125 125 126 127 127 128 132 135 136 136 137 142 144 144 144 145 146 146
Part 2. Using SCLM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Chapter 6. Using SCLM edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Going into SCLM for the first time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 SCLM edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 Creating a new member in SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.2 Editing an existing member in SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.3 Dependency processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.4 Additional options in SCLM edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.5 ISPF edit / compare command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.6 Making SCLM edit work the way you want it to. . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 7. Building members in SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Building an individual source member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Creating and building an application architecture definition . . . . . . . . . . . . . . . . . . . . 7.3 Creating and building high level (HL) architecture definitions . . . . . . . . . . . . . . . . . . . 7.4 Running out of space errors (B37 / E37). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Building and promoting by change code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.1 Summary of the building and promoting feature . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.2 Building and promoting by change code warnings . . . . . . . . . . . . . . . . . . . . . . . 153 154 155 155 159 160 161 161 162 167 168 171 175 177 179 179 180
Chapter 8. Promoting up the hierarchy with SCLM. . . . . . . . . . . . . . . . . . . . . . . . . . . 181 8.1 SCLM Promote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Chapter 9. SCLM utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1 SCLM unit of work processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1.1 Creating your own options with UOW processing. . . . . . . . . . . . . . . . . . . . . . . . 9.2 SCLM audit and version utility processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2.1 SCLM version selection panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2.2 SCLM audit and version record. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 186 188 196 198 200
Contents
SCLM version compare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SCLM external compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SCLM version retrieve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing a version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Audit reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Part 3. SCLM: Beyond the basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 Chapter 10. Member level locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1 Activating member level locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Adding new SCLM administrator ids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 Editing members when member level locking is activated . . . . . . . . . . . . . . . . . . . . 10.4 Transferring ownership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 214 215 216 218
Chapter 11. NOPROM function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 11.2 Setting a member as not being promotable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 11.2.1 Using the N line command in Library Utilities (Option 3.1) or Unit of Work (Option 3.11). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 11.2.2 NOPROM service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 11.3 Process of not promoting a member; causes REBUILD . . . . . . . . . . . . . . . . . . . . . . 228 11.4 The process of not promoting a member; NOREBUILD . . . . . . . . . . . . . . . . . . . . . . 232 11.4.1 SCLM project setup when not promoting with no rebuilding of build maps. . . . 233 11.4.2 Build containing a not-promotable member (NOREBUILD) . . . . . . . . . . . . . . . 234 11.4.3 Promote containing a not-promotable member (NOREBUILD) from the same level containing the NOPROM member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 11.4.4 Viewing the not-promoted backup member . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 11.4.5 Promote containing a not-promotable member (NOREBUILD) from a level not containing the NOPROM member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 11.4.6 Build containing a not-promotable member (NOREBUILD) at a level which does not contain the NOPROM member. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 11.4.7 Build after promotion of the not-promotable member (NOREBUILD) . . . . . . . . 238 11.4.8 Restricting the setting of not-promotable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Chapter 12. SCLM user exit processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.1 Examples of user exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2 SCLM exit call methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.3 Sample FLMCNTRL MACRO with calls to user exits . . . . . . . . . . . . . . . . . . . . . . . . 12.4 Components of an exit parameters and exit files . . . . . . . . . . . . . . . . . . . . . . . . . . 12.4.1 SCLM exit parameter passing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.4.2 Components of exits parameter parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.4.3 Components of exits exit file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.5 SCLM exits during an edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.5.1 SCLM exits during an edit verify change code exit . . . . . . . . . . . . . . . . . . . . 12.5.2 SCLM exits during an edit save change code exit . . . . . . . . . . . . . . . . . . . . . 12.5.3 SCLM exits during an edit change code verification exit . . . . . . . . . . . . . . . . 12.5.4 Edit exits warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.6 SCLM build exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.6.1 SCLM build exits build initial exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.6.2 SCLM build exits build notify exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.6.3 SCLM build exits build notify exit - example of the common REXX . . . . . . . . 12.6.4 SCLM build exits build notify exit - example of a copy exit . . . . . . . . . . . . . . 12.7 SCLM promote exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
A Practical Guide to Setting Up and Using SCLM
241 242 242 243 244 244 245 246 247 247 248 249 249 250 250 251 251 252 254
12.7.1 SCLM promote exits promote initial exit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.7.2 SCLM promote exits promote verify exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.7.3 SCLM promote exits promote verify exit - example of common REXX . . . . . 12.7.4 SCLM promote exits promote verify exit - example of a backup exit . . . . . . . 12.7.5 SCLM promote exits promote copy exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.7.6 SCLM promote exits promote purge exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.7.7 SCLM promote exits promote purge exit - example of common REXX . . . . . 12.7.8 SCLM promote exits promote purge exit - example of a deploy exit . . . . . . . 12.8 SCLM delete exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.8.1 SCLM delete exits delete initial exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.8.2 SCLM delete exits delete initial exit - example. . . . . . . . . . . . . . . . . . . . . . . . 12.8.3 SCLM delete exits delete verify exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.8.4 SCLM delete exits delete verify exit - example . . . . . . . . . . . . . . . . . . . . . . . 12.8.5 SCLM delete exits delete notify exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.8.6 SCLM delete exits delete notify exit example . . . . . . . . . . . . . . . . . . . . . . . 12.9 Audit and version delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.9.1 SCLM audit and delete verify exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.9.2 SCLM audit and delete notify exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.10 SCLM utility panel exit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.11 Additional SCLM user exit example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.11.1 Example 1: BZZXXCDT user exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.11.2 Example 2: bind external exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 13. Creating language definitions from JCL . . . . . . . . . . . . . . . . . . . . . . . . . 13.1 Preparing to convert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.2 Capabilities and restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.3 Converting JCL statements to SCLM macro statements . . . . . . . . . . . . . . . . . . . . . 13.3.1 Executing programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.3.2 Conditional execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.3.3 Sample JCL conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
254 255 255 256 259 259 259 260 267 267 268 270 270 272 272 275 275 276 276 277 277 280 289 290 290 291 291 292 293
Chapter 14. Debugging and fault analysis with SCLM . . . . . . . . . . . . . . . . . . . . . . . . 301 14.1 Debug Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 14.1.1 Setting up your language translators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 14.1.2 Option 1: Debug side file under SCLM - default temporary name . . . . . . . . . . 304 14.1.3 Option 2: Debug side file under SCLM - correct side file name at compile time 311 14.1.4 Option 3: Debug side file under SCLM - correct side file name at each group . 323 14.1.5 Option 4: Debug side file created outside of SCLM control . . . . . . . . . . . . . . . 326 14.1.6 Using compile listing file instead of side file . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 14.1.7 Invoking the debugger to run on your workstation using WebSphere debugger 331 14.2 Fault Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 14.2.1 Telling Fault Analyzer where to find the side file. . . . . . . . . . . . . . . . . . . . . . . . 338 14.2.2 Using an IDILANGX step in your SCLM translator . . . . . . . . . . . . . . . . . . . . . . 340 14.3 Using debug translators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 14.4 Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Part 4. SCLM: Advanced topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Chapter 15. Breeze for SCLM - installation, setup, and use . . . . . . . . . . . . . . . . . . . . 15.1 SCLM Advanced Edition overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.2 Breeze introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.3 Breeze components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.4 Breeze installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.4.1 Breeze installation tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents
15.5 Defining approver records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.5.1 Defining inventory locations - concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.5.2 Defining inventory junction records - JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.5.3 Defining approvers and approver groups - concepts . . . . . . . . . . . . . . . . . . . . 15.5.4 Defining approver groups - JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.5.5 Defining approvers - JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.5.6 Example of JCL to define all three types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.5.7 Defining watch records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.6 Breeze and the SCLM promote process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.6.1 Promotions without Breeze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.6.2 Promotions with Breeze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.6.3 Promotion with Breeze: Step-by-step procedure . . . . . . . . . . . . . . . . . . . . . . . 15.6.4 Requesting approval to promote the package . . . . . . . . . . . . . . . . . . . . . . . . . 15.6.5 Voting on the package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.6.6 Promoting the approved package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.7 Viewing and voting on packages using the Breeze Web interface . . . . . . . . . . . . . . 15.7.1 Selecting a package for viewing or voting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.7.2 Filtering packages from the list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.7.3 Voting on a package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.7.4 How voting results reaches approved or vetoed status . . . . . . . . . . . . . . . . . . 15.8 Viewing package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.8.1 Summary tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.8.2 Contents tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.8.3 Log tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.8.4 Collisions tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.8.5 Ballot Box tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.8.6 Notes tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.9 Breeze - other utility jobs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.9.1 Breeze sweep job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.9.2 EAC and Breeze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF . . . . . . . 16.1 What happens when EAC is not used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2 EAC definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2.1 Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2.2 Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2.3 Understanding the relationship between RACF and EAC. . . . . . . . . . . . . . . . . 16.3 Defining a sample access strategy for an SCLM project. . . . . . . . . . . . . . . . . . . . . . 16.3.1 Creating rules for development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.3.2 Creating rules for change control team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.3.3 Loading the new rules into memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.3.4 Checking access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4 Additional considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.1 Violation reason code 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.2 Breeze and EAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.3 Using multiple rule files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.4 Using the help from the violation panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
358 359 359 360 361 362 363 366 367 367 367 368 369 371 372 373 375 375 376 377 378 378 379 379 380 380 380 381 381 387 389 391 393 393 395 396 396 397 401 405 406 409 409 410 414 415
Part 5. SCLM Advanced Edition: Developing with the SCLM Developer Toolkit . . . . . . . . . . . . . . . . 419 Chapter 17. Merge Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1 Merge Tool usage out of the box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1.1 Using Merge Tool to generate work and merge files . . . . . . . . . . . . . . . . . . . . 17.1.2 Adding merge file back into SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
A Practical Guide to Setting Up and Using SCLM
17.2 Integrating the Merge Tool with SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 17.2.1 Integrated Merge Tool in action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 17.2.2 Explanation of the sample code to perform the function . . . . . . . . . . . . . . . . . . 430 Chapter 18. Open Systems basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1 What is the z/OS UNIX file system? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.1 The IBM implementation of UNIX on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.2 Basic UNIX concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.3 z/OS UNIX security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.4 Utilizing z/OS UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.5 Guidelines for installing products into the z/OS UNIX file system. . . . . . . . . . . 18.2 What is Java? What is J2EE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.3 What are Eclipse, Rational Application Developer, and WebSphere Developer for System z?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.3.1 Workbench basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.3.2 Perspectives, views, and editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 19. SCLM Developer Toolkit configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . 19.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.2 Setting up SCLM Developer Toolkit and your SCLM projects (Administrator task) . 19.2.1 ISPF.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.2.2 TRANSLATE.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.2.3 Site and project configuration files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.3 Setting up your IDE environment (user task) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 20. SCLM Developer Toolkit for mainframe development. . . . . . . . . . . . . . . 20.1 Working with the SCLM explorer view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.1 Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.2 Connecting to z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.3 Populating the explorer view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.4 Editing members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.5 Building members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.6 Promoting members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.7 Configuring SCLM Developer Toolkit for Breeze use . . . . . . . . . . . . . . . . . . . . 20.1.8 Running database contents reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.9 Audit and versioning options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.1.10 Adding new members to SCLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.2 Working with workstation files in a mainframe environment . . . . . . . . . . . . . . . . . . . 20.3 Using the architecture definition wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.4 Working with the SCLM IDE View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 432 432 432 434 435 435 437 439 439 441 449 450 450 450 453 455 457 463 464 464 465 466 474 478 481 482 483 490 496 502 506 509
Chapter 21. SCLM Developer Toolkit for Java Applications . . . . . . . . . . . . . . . . . . . . 523 21.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 21.2 Setting up SCLM Developer Toolkit and your SCLM projects. . . . . . . . . . . . . . . . . . 525 21.2.1 Java/J2EE language definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 21.2.2 Java/J2EE type requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 21.3 Setting up your IDE environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 21.4 Working with the IDE view (Eclipse projects) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 21.5 Usage scenarios: End-to-end usage scenario of a typical Java application development lifecycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 21.5.1 Sample Java project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 21.5.2 Migrating projects to an SCLM repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 21.5.3 Day-to-day activities by a single user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 21.5.4 Using DT in a team environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
Contents
ix
Chapter 22. Deployment with SCLM Developer Toolkit . . . . . . . . . . . . . . . . . . . . . . . . 22.1 Types of deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.1.1 SCLM to z/OS USS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.1.2 SCLM to WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.1.3 Custom deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 Deployment in SCLM Developer Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.1 Scripting with XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.2 Running an existing script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.3 Creating a new script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.4 Naming your script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.5 Running deployment in batch mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.6 Managing deployment in an SCLM hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.7 Group tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2.8 Deployment properties group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.3 Usage scenarios: Deployment in action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.3.1 Scenario 1: SCLM to z/OS USS deployment . . . . . . . . . . . . . . . . . . . . . . . . . . 22.3.2 Scenario 2: SCLM to WebSphere Application Server deployment . . . . . . . . . .
549 550 550 550 551 551 554 554 555 558 559 559 559 560 561 562 568
Part 6. SCLM Administrator Toolkit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 Chapter 23. IBM SCLM Administrator Toolkit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.1 What is the Administrator Toolkit? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.2 Key components of the Administrator Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.3 Terminology used in the Administrator Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.4 Using the workstation-based interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.4.1 Configuring the workstation-based client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.4.2 Listing projects in the project filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.4.3 Adding a project filter to a host connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.4.4 Administering a project using the graphical user interface . . . . . . . . . . . . . . . . 23.4.5 Creating a new project on the client by cloning an existing one . . . . . . . . . . . . 23.5 Using the ISPF-based interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.5.1 Listing projects in the ISPF panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.5.2 Navigating through the ISPF panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.5.3 Administering a project in the ISPF-based user interface . . . . . . . . . . . . . . . . . 23.5.4 Creating a new project on the host by cloning an existing one . . . . . . . . . . . . . 23.6 For more information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 24. Introduction to the IBM SCLM Administrator Toolkit . . . . . . . . . . . . . . . 24.1 Who should use this product and why . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.1.1 Two user interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2 Project Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.1 Specifying project settings and control data sets . . . . . . . . . . . . . . . . . . . . . . . 24.2.2 Specifying data set types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.3 Specifying groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.4 Specifying group and type data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.5 Specifying language definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.6 Specifying NOPROM service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.7 Viewing the refactor tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.8 Specifying user exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2.9 Viewing the source tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.3 The Language Definition Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.4 The Clone Project Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.5 The Migration and Remote Migration Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.5.1 Migration Wizard for host-based artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
A Practical Guide to Setting Up and Using SCLM
577 578 579 580 581 582 583 583 584 584 584 585 585 585 586 586 587 588 588 591 591 593 593 595 596 600 601 603 608 609 620 623 623
24.5.2 Remote Migration Wizard for workstation-based artifacts. . . . . . . . . . . . . . . . . 24.6 The Architecture Definition Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.6.1 Creating an ARCHDEF from a load module . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.6.2 Creating an ARCHDEF from JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.6.3 Creating an ARCHDEF from scratch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.7 The EAC Manager and RACF data set profile feature . . . . . . . . . . . . . . . . . . . . . . . 24.7.1 The EAC Manager node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.7.2 The RACF data set profile node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 25. Beyond the basics: A case study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.1 Cloning an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.2 Editing the new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.2.1 Changing project definition and control information . . . . . . . . . . . . . . . . . . . . . 25.2.2 Adding a new project group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.2.3 Adding new Group/Type data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.2.4 Changing the language definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.2.5 Changing the user exit information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.2.6 Building the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.3 Migrating artifacts into the new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.4 Creating architecture definitions for the new artifacts . . . . . . . . . . . . . . . . . . . . . . . .
626 632 632 639 642 645 645 655 661 662 664 665 666 669 670 672 674 677 685
Part 7. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 Appendix A. Chapter 1 listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 Appendix B. Chapter 2 listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 Appendix C. Chapter 3 listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Common bind exec example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example DB2CLIST language definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example DB2OUT language definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Multi-step version of COBOL with CICS and DB2 language definition . . . . . . . . . . . . . . . Single-step version of COBOL with CICS and DB2 language definition . . . . . . . . . . . . . . PLI with DB2 language definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 725 728 730 732 736 739
Appendix D. Chapter 13 listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 Appendix E. DDname substitution lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 HLASM, COBOL, PL/I and DB2 DDname substitutions. . . . . . . . . . . . . . . . . . . . . . . . . . . 747 CICS, Binder, DFSMS utilities, C/C++ and PL/X DDname substitutions . . . . . . . . . . . . . . 749 Appendix F. Additional material. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System requirements for downloading the Web material . . . . . . . . . . . . . . . . . . . . . . . How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IBM Redbooks publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to get IBM Redbooks publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 751 751 751 752 753 753 753 753 753 754
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755
Contents
xi
xii
Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
xiii
Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both:
AIX AIX 5L C/370 CICS Common User Access CUA DB2 DFSMS DFSMS/MVS DFSMSdfp IBM IMS MVS OS/390 RACF Rational Redbooks Redbooks (logo) REXX S/370 S/390 System z Tivoli VTAM WebSphere z/OS
The following terms are trademarks of other companies: EJB, Java, JVM, J2EE, and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Excel, Microsoft, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Pentium, Intel logo, Intel Inside logo, and Intel Centrino logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
xiv
Preface
In this IBM Redbooks publication we describe and document a number of different aspects of the Software Configuration and Library Manager (SCLM). Part 1 of the book focuses on setting up an SCLM project using commonly used languages such as COBOL and PL/I. Additionally, migration techniques are discussed for those customers considering migrating to SCLM from other vendor Software Configuration Management products. Part 2 describes basic usage of SCLM functions such as Edit, Build, and Promote. Part 3 goes a bit beyond the basics and looks at some of the newer functions that are being added to SCLM along with writing user exits and setting up SCLM for debugging with IBM Debug Tool. Parts 4, 5, and 6 concentrate on the SCLM Advanced Edition products such as Breeze, Enhanced Access Control, SCLM Developer Toolkit, and SCLM Administrator Toolkit. These sections describe what these products are and how they can be set up and used to aid your application development. This book is intended for project leaders, SCLM Library administrators, system programmers, and application programmers who are using, or are planning on using SCLM or one of the SCLM Advanced Edition products. The book is designed as a detailed introduction to SCLM and the SCLM Advanced Edition products.
xv
Jyotindra Mehta is an IT specialist in Pune, India. He has 25 years of experience with application development, systems programming, and database administration on the MVS platform with IBM and other organizations. Initially, an application programmer in COBOL, ADABAS/NATURAL, and CICS, he moved into more technical support roles, such as MVS Systems programmer, DB2 DBA, and SCLM Administrator after joining IBM India. Jyo has led an SCLM implementation of an IBM Australia financial application on an IBM India mainframe server. He has led the z/OS systems programming competency effort in the India GBS Global Delivery organization, and also provided consulting support to several customers on DB2 performance tuning. Jyo has written a technical paper on migration to SCLM, drawing on his experiences as an SCLM administrator, and also participates as an expert reviewer and presenter on IBM Indias mainframe sharenets. Kenichi Yoshimura is a software engineer in Australia Development Laboratory based in Perth, Australia. Since joining IBM in 2004, he has worked on several System z software products including IBM Fault Analyzer for z/OS and IBM SCLM Developer Toolkit. His main areas of expertise are Java on z/OS and Eclipse plug-in development. He holds a Master Degree in Engineering Science from The University of Melbourne. Ben Horwood is a Software Engineer and a recent addition to the Australia Development Laboratory, Perth. He currently works in the ISPF/SCLM team and before IBM spent around 4 years developing applications for the Windows platform. His current interests include Java and the world of z/OS. Jennifer Nelson is a Product Specialist of the AD Tools with Rocket Software in Austin, Texas. She has 10 years experience in the mainframe industry working with DB2 and mainframe storage with large mainframe vendors. She is currently working as a Product Specialist with Rocket Software as a business partner with IBM assisting Technical Sales with potential and existing customers. She holds a BA in Political Science from the University of Texas at Austin.
Figure 1 From left, Peter Eck, Jyotindra Mehta, and Liam Doherty
xvi
Thanks to the following people for their contributions to this project: John Cullen, IBM, System Programmer, Perth, Australia Greg Henderson, IBM, System Programmer, Perth, Australia Grant Sutherland, IBM, Lead Architect ISPF/SCLM, Perth, Australia John Philp, IBM, SCLM Software Engineer, Perth, Australia Paul Meaney, IBM, SCLM Developer Toolkit Software Engineer, Perth, Australia Larry England, IBM, Development Engineer, Silicon Valley Laboratory Chris Rayns, IBM, ITSO Poughkeepsie Rod Turner, IBM, Senior Software Engineer, Perth, Australia Adrian Simcock, IBM, System Programmer, Perth, Australia Corrine Stith, Rocket Software Johann Pramberger, IBM, Software Configuration Management Team Lead and Architect, Germany Rachel Trout, IBM, Software Engineer, Perth, Australia Douglas Nadel, IBM, SCLM Developer Toolkit Development, Raleigh
Preface
xvii
Yvonne Lyon, Editor, International Technical Support Organization, San Jose, CA Debbie DeCarlo, Event Planner, Social, and Culinary Support, San Jose, CA Joe DeCarlo, Manager, Special Projects, International Technical Support Organization, Raleigh, NC via San Jose, CA
Comments welcome
Your comments are important to us! We want our Redbooks publications to be as helpful as possible. Send us your comments about this or other Redbooks publications in one of the following ways: Use the online Contact us review Redbooks publication form found at: ibm.com/redbooks Send your comments in an e-mail to: redbooks@us.ibm.com Mail your comments to: IBM Corporation, International Technical Support Organization Dept. HYTD Mail Station P099 2455 South Road Poughkeepsie, NY 12601-5400
xviii
Part 1
Part
SCLM manuals
Throughout this book, we reference the SCLM manuals. Previously, these manuals were known as: ISPF SCLM Project Manager's and Developer's Guide, SC34-4817 ISPF SCLM Reference, SC34-4818 For z/OS 1.8, the two SCLM manuals were merged into a single manual. From z/OS 1.8 onwards, it is now called: ISPF SCLM Guide and Reference, SC34-4817
Configuration and delivery: Configuration control implies a higher level of abstraction than version control. The SCM tool must have some knowledge of which versions from a set of components comprise a specific build. Process management: Process management deals with the grouping and manipulation of versions of software assets as they progress through the software development lifecycle. This typically involves change management, approval levels, and production control. Problem tracking: Problem tracking entails recording enhancement/change requests or defect reports and correlating these with the resolution of the request. These reports may include a listing of the sources involved in the change. These change sets can then create released products containing only the feature and fixes desired. How do SCLM and SCLM Advanced Edition meet the requirements of an SCM tool?
Library management
As a library manager, SCLM manages changes to your application data, performs auditing and versioning, and controls the movement of your application from one set of staging libraries to the next (called Promote in SCLM).
Process management
SCLM provides Architecture definitions that are used to group parts of an application together. These architecture definition members are then used to drive the promotion process through the development life cycle. Additionally, the SCLM Advanced Edition package approval product, Breeze, provides approval control.
Problem tracking
SCLM provides the ability to assign change codes to members as they are edited and saved. Build and promote driven by these change codes can also be performed. SCLM in itself is not a problem tracking system. However, SCLM provides numerous user exit points where you can interface with other problem tracking systems.
Chapter 1.
SCLM User: This role is the programmer, team leader, or manager who will use SCLM to analyze, edit, build, and test their code and initiate and approve the movement of the code up the hierarchy to production. Using SCLM is covered beginning in Chapter 6, Using SCLM edit on page 153.
For example, here are a couple of typical situations that are good candidates for an alternate project definition: You need two distinct promotion paths, one for normal development and another for emergency fixes. Define a primary project definition for the normal development with a hierarchy of DEV1, TEST and PROD groups. Define an alternate project definition for emergency fixes with a hierarchy of EMER and PROD groups. An alternate is needed in this situation, so that common members in DEV1 and EMER do not lock each other out. Use this alternate with care as it can cause additional work. For example, if a developer is working on a member in DEV1 for some new development and another developer needs to make a production fix to it then the other developer can use the alternate to edit the member in EMER, make the fix and then promote it back to PROD. This creates work for the DEV1 developer. They must be notified of the fix so they they can merge the fixes into their version of the member in development in DEV1. In addition the DEV1 developer must fix the predecessor error that will occur if they try to promote the member. Fixing this error is covered on the last page of Chapter 6, Using SCLM edit on page 153. You are migrating from another CM tool to SCLM, and need to populate your SCLM hierarchy in reverse order, like PROD followed by TEST followed by DEV1. You need 3 project definitions to accomplish this, because members can only be added to a group that is the lowest or only group in a hierarchy. Define the first project definition with a hierarchy of only the PROD group. Define the second project definition with a hierarchy of only TEST and PROD groups. Define the third project definition with a hierarchy of groups DEV1, TEST and PROD . Use the first definition to migrate all production modules, the second to migrate all test modules, and the last one to migrate all development modules. Designate the last one as the primary project definition and others as alternate project definitions. See Chapter 4, Migrating to SCLM on page 119 for a detail discussion of this approach.
5. Create and execute JCL member SCLM01.PROJDEFS.SOURCE(ALLOCDS) to allocate project partition data sets for SCLM01. You must customize this JCL to execute in your environment. Note: Alternatively, you can allocate project partition data sets via the ISPF data set utility. Use data set attributes as specified in the ALLOCDS member. See Appendix A-1, SCLM01.PROJDEFS.SOURCE(ALLOCDS) on page 691 for the listing of the ALLOCDS member. 6. Create and execute JCL member SCLM01.PROJDEFS.SOURCE(ALLOCVER) to allocate versioning partition data sets (PDSs) for SCLM01. The JCL allocates versioning PDSs for all groups and types being versioned, namely TEST and PROD groups and all editable types, ARCHDEF, SOURCE, COPYLIB, PLINCL, and MACROS. You must customize this JCL to execute in your environment. Note: Alternatively, you can allocate versioning partition data sets via the ISPF data set utility. Use data set attributes as specified in the ALLOCVER member.
See Appendix A-2, SCLM01.PROJDEFS.SOURCE(ALLOCVER) on page 693 for the listing of the ALLOCVER member. 7. Change SCLM01.PROJDEFS.SOURCE members FLM@COBE, FLM@HLAS, FLM@L370 and FLM@PLIE, so that macro libraries, assembler/compiler libraries, and assembler/compiler options match the libraries and products in use at your location. The changes are specified in the initial comments of each macro member. Note: If you make changes to these members after Step 10 while installing this example project, then reassemble and relink the project definition SCLM01.PROJDEFS.SOURCE(SCLM01). See Appendix A-3, SCLM01.PROJDEFS.SOURCE(FLM@ARCD) on page 694 through Appendix A-8, SCLM01.PROJDEFS.SOURCE(FLM@TEXT) on page 703 for the listings of the FLM* members with customizations for the example project highlighted in bold. We include Appendix A-3 FLM@ARCD and A-8 FLM@TEXT only for reference purposes. They require no changes for the example project. 8. Create and execute JCL member SCLM01.PROJDEFS.SOURCE(SCLMACCT) to define the VSAM cluster for SCLM accounting information of the SCLM01 project. You must customize this JCL to execute in your environment. This job deletes, defines and initializes the VSAM cluster. Because the cluster does not exist the first time you submit the job, you receive a return code of 8 from the delete operation. Notes: Alternatively, you can define the VSAM cluster via the ISPF VSAM utilities interface. Use VSAM cluster attributes as specified in the SCLMACCT member. We recommend that you use the SCLMACCT JCL job to define the VSAM cluster, as it is considerably simpler than the ISPF VSAM utilities option. See Appendix A-9, SCLM01.PROJDEFS.SOURCE(SCLMACCT) on page 703 for the listing of the SCLMACCT member. 9. Create and execute JCL member SCLM01.PROJDEFS.SOURCE(SCLMVERS) to define the VSAM cluster for SCLM audit and versioning information of the SCLM01 project. You must customize this JCL to execute in your environment. This job deletes, defines, and initializes the VSAM cluster. Because the cluster does not exist the first time you submit the job, you receive a return code of 8 from the delete operation. Notes: Alternatively, you can define the audit and versioning VSAM cluster via the ISPF VSAM utilities interface. Use VSAM cluster attributes as specified in the SCLMVERS member. We recommend that you use the SCLMVERS JCL job to define the VSAM cluster, as it is considerably simpler than the ISPF VSAM utilities interface. See Appendix A-10, SCLM01.PROJDEFS.SOURCE(SCLMVERS) on page 704 for the listing of the SCLMVERS member.
10.Create the SCLM01 project definition from the example in A-11. You can start with the sample project FLM01PRJ in the ISPF sample library SISPSAMP, if you do not want to create it from scratch. Save the project definition in SCLM01.PROJDEFS.SOURCE(SCLM01) 11.Create the $ASMPROJ assemble and link edit JCL member from the example in A-12. You can start with the sample JCL member FLM02PRJ in the ISPF sample library SISPSAMP, if you do not want to create it from scratch. Update the assembler SYSLIB DD concatenation sequence of the JCL for the ISPF SISPMACS library at your installation. Save the JCL in SCLM01.PROJDEFS.SOURCE($ASMPROJ). 12.Assemble and link edit project definition SCLM01.PROJDEFS.SOURCE(SCLM01) by submitting JCL member SCLM01.PROJDEFS.SOURCE($ASMPROJ). This constructs the load module SCLM01.PROJDEFS.LOAD(SCLM01) that is executed by SCLM to control the project. Look at both assembler and linkage editor listings and confirm that no statements were flagged and that both steps completed without errors. Note: Alternatively, you can assemble and link edit SCLM01.PROJDEFS.SOURCE(SCLM01) using ISPF Foreground Assembler and ISPF Foreground Linkage Editor. If you choose this option, using the ISPF Data Set Utility, allocate the following partitioned data set with space in cylinders (1,5), with 10 directory blocks, and with record format FB, LRECL 80: SCLM01.PROJDEFS.OBJ This partitioned data set would contain the object code for the library structure as defined in the project definition. SCLM01.PROJDEFS.OBJ(SCLM01) is output of the foreground assembler and input to the foreground linkage editor. See Appendix A-11, SCLM01.PROJDEFS.SOURCE(SCLM01) on page 705 and Appendix A-12, SCLM01.PROJDEFS.SOURCE($ASMPROJ) on page 706 for the listings of the SCLM01 project definition and the $ASMPROJ JCL members, respectively.
MACROS: Assembler macros LIST: listings from compilers and assemblers OBJ: object code LMAP: load module maps LOAD: executable load modules PROCLIB: JCL procedures JOBLIB: JCL jobs
We have selected type names that are most suitable for the sample project. You should choose SCLM type names that best describe libraries of your project. See topic 1.5, Choosing your SCLM types on page 15 for a detail discussion of SCLM project types. FLMGROUP: Defines each group. The PROMOTE keyword defines the library structure. In the sample project, DEV1 and DEV2 are promoted to TEST and TEST is promoted to prod. See topic 1.4, Defining your hierarchy on page 10 for an in-depth discussion of SCLM project groups. FLMCNTRL: Identifies the default VSAM data sets for the project. The VSAM data sets store library control information about the members in the project hierarchy. COPY: Identifies members to be copied into the project definition. We use it to include language definition macros into the sample project definition. You can also maintain other SCLM project components, such as types, groups, project controls, and so on, in separate PDS members, and include them into the project definition. FLMAEND: Ends the project definition.
Language definitions
The sample project uses the following SCLM language definitions: FLM@ARCD: ARCHDEF (Architecture) language definition FLM@COBE: COBE (Enterprise COBOL) language definition FLM@HLAS: HLAS (high-level assembler) language definition FLM@L370: LE370 (z/OS binder/linkage editor) language definition FLM@PLIE: PLIE (Enterprise PL/I) language definition FLM@TEXT: TEXT (Untranslated Text) language definition These language definitions use the following SCLM macros: FLMSYSLB: This macro can be used to define a set of external libraries that contain project and/or system macros or includes. FLMLANGL: This macro specifies the language identifier. FLMTRNSL: This macro is used once for each translator to be invoked for a language. Translators are programs, CLIST or REXX called during user actions such as SAVE, EDIT, BUILD, PROMOTE, or DELETE. The parse translator is invoked on an SCLM SAVE action when the keyword FUNCTN specifies PARSE. The parse translator can store statistics (for example, lines-of-code counts) and dependency information (for example, includes and copy statements). The programs listed in the sample do come with SCLM. The build translator is invoked on an SCLM BUILD action when the keyword FUNCTN specifies BUILD. For example, in FLM@L370, the linkage editor IEWL is invoked. The build fails unless the return code is equal to, or less than, the value specified by the keyword GOODRC (0 in this example). The programs called are either load module, CLIST, or REXX, depending on the build scope. Some build translator programs come with SCLM, most of them are part of z/OS or extra products needed during a build.
The FLMALLOC macro is used to allocate data sets and ddnames required by translators. The FLMTRNSL, FLMALLOC, and FLMCPYLB macros can be compared to the JCL elements, EXEC, and DD statements. More information can be found in chapter 5 of the SCLM Guide and Reference. To summarize, the project definition specifies the names of the partitioned data sets used by the project (for example, SCLM01.DEV1.SOURCE), the library structure for the groups (for example, DEV1 members are promoted to TEST), and the languages to be used (for example, architecture definition, ASM, PL/I, COBOL, and link-edit).
10
The SCLM hierarchy is defined with the following SCLM macros: DEV1 DEV2 TEST PROD FLMGROUP FLMGROUP FLMGROUP FLMGROUP AC=(P,D),KEY=Y,PROMOTE=TEST AC=(P,D),KEY=Y,PROMOTE=TEST AC=(P),KEY=Y,PROMOTE=PROD AC=(P),KEY=Y
AC=(P,D) defines the authorization codes for the development group. An authorization code is an identifier used by SCLM to control authority to update and promote members within a hierarchy. Defining two authorization codes for DEV1 and DEV2 allows for parallel development. That is, it allows a same named member to be edited into both DEV1 and DEV2, one with an authorization code of P and one with an authorization code of D. Each SCLM group must have at least one authorization code. To promote from one group to the next higher group, each must have one common authorization code. All members in the main hierarchy for our sample project have an authorization code of P, which allows them to be drawn down to DEV1 or DEV2 and re-promoted back to PROD. If a member has been drawn down to DEV1 with the default authorization code of P and you want to edit a same named member in DEV2, you must edit it using an authorization code of D. This is because only one member at a time can be edited in a set of parallel development groups using the default or promotable authorization code. By parallel we mean multiple development groups promoting into a common group. In our example the common group is TEST. If edited using the D authorization code, the DEV2 version of the member will not be promotable. You can later merge its changes into the promotable version or take steps to make it promotable. The procedure to make it promotable will be covered in Chapter 6, Using SCLM edit on page 153.
11
Authorization codes control movement of data within the project hierarchy. They restrict the draw down and promotion of members (application components) to certain groups within the hierarchy. In regard to authorization codes, here are some rules that you should be aware of: Authorization codes can be up to 8 characters and cannot contain commas. Authorization codes work only on editable types such as source, not on build outputs. Groups can have any number of authorization codes assigned to them. You must assign an authorization code to each editable member, when you register it with SCLM. In order to put (draw-down) a member into a group, the authorization code of that member must match one of the authorization codes that have been assigned to the group. If no authorization codes exist for a group, SCLM does not permit draw-down or promotion of members to this group. When you promote a member from one group to the next, the member retains its authorization code. Thus, the group being promoted into and the group being promoted from must have a matching authorization code. If, as a result of a promote, you replace an older version of the module, SCLM does not retain the authorization code assigned to that older version. Define at least one authorization code for your project. Assign authorization code(s) to each SCLM group. A single code is generally sufficient for simple situations. It does allow each member under SCLM control to be drawn down to any development group and be promoted to the top of the hierarchy. If you require tighter restrictions on movement of members for your project, you must identify those situations and define additional authorization codes. Using the diagram you drew earlier in this section, examine the flow of members and determine if you require any restrictions on movement of members. Label each group with at least one authorization code.
12
In Figure 1-2 the following relationships exist: A member in DEV1 with an authorization code of PROTO cannot be promoted because group TEST does not have PROTO as an authorization code. A member in DEV1 with an authorization code of TESTONLY can be promoted to TEST, but cannot be promoted to PROD. A member in DEV1 or DEV2 with an authorization code of DEV can be promoted all the way up to group PROD. A member in DEV2 cannot have an authorization code of TESTONLY or PROTO; it must be either DEV or L0. A member in DEV2 with an authorization code of L0 cannot be promoted because group TEST does not have L0 as an authorization code. When you edit a member in a development group, SCLM looks at the authorization code you specified on the edit panel and tells you the following information: If that authorization code is not valid for that development group, you must enter an authorization code that is assigned to that group. If you enter an invalid authorization code and then press the help key, SCLM shows authorization codes for that group. If use of that authorization code prevents promotion of that member at some point in the group hierarchy, SCLM gives you the name of the group into which promotion is not allowed. If use of that authorization code leads to a potential promotion conflict with another member of the same name, SCLM does not allow the edit. Here is an example of this problem. SCLM allows you to have two members of the same name and type residing in two different development groups (such as DEV1 and DEV2 in Figure 1-2) under certain conditions. Each of those members has an authorization code assigned to it. Those codes, along with the authorization codes assigned to the higher groups in the hierarchy, determine how far up the hierarchy each of those members can be promoted. If the two promotion paths do not intersect, SCLM lets you edit those members in those groups. However, if there is at least one group through which both members can be promoted, changes made to one member would be lost when the other member is promoted. In that case, SCLM does not let you edit the members in those groups.
Chapter 1. SCLM project setup
13
If a member exists in group DEV1, SCLM uses authorization codes to determine whether you can edit a member with the same name and type in group DEV2.
There are three groups: DEV is the development library, FIX is the maintenance library, and PROD is the production library. In practice, there would be a much larger subhierarchy under both DEV and FIX in order to allow for both multiple developers and for testing of applications before moving them to production. DEV, FIX, and PROD each have a single authorization code, BETTER, FIXED, and FIXED respectively, and could have more. More importantly, no authorization code is assigned to both DEV and PROD. It is this aspect of the project definition that prevents the promotion of any modules from group DEV into group PROD. When the development code is ready to move into production, the authorization code BETTER must be added to the valid authorization codes for the PROD group. A programmer planning to make changes to a module for the next release of an application draws the module down from PROD into DEV, specifying an authorization code of BETTER on the SCLM EDIT-ENTRY PANEL. Changes are made and tested in DEV. Suppose that while the module is being changed and tested in the DEV group, a user encounters a problem with the application and another programmer determines that the fix requires a change to the module that has been drawn down to DEV. The programmer can draw down the module into FIX even though that same module has been drawn down into DEV. This is possible because the promotion paths of the two modules do not intersect; the module in DEV cannot be promoted into PROD because of authorization codes. Therefore, changes made to one module do not overwrite changes made to the other copy. When the fix has been made to the module in FIX and the application has been rebuilt at that group, the user can run the application from group FIX until the fix has been verified and then promoted to PROD.
14
Before the fix is promoted, the changes must be incorporated into the copy of the modules in DEV. This is a manual change made by the current owner of the modules in DEV with the assistance of the person who made the changes in FIX. Keep in mind that although authorization codes can be used to restrict promotion paths, they do not provide security against modifications to SCLM-controlled data made outside of the SCLM environment. You should use a security product such as Resource Access Control Facility (RACF), which is part of the z/OS Security Server or its functional equivalent for that purpose.
15
We have observed that most customers like to use a single source type for all languages, because it minimizes project management effort by reducing the number of application libraries under SCLM control. On the other hand, we have not observed such a near unanimity in the choice of single versus multiple language specific types for the application include or copy code. SCLM offers two ways to refer to include and copy code: The EXTEND=extended_type parameter of the FLMTYPE project definition macro is an 8-character name that can be used as an alternate type when resolving include dependencies. The FLMINCLS language definition macro associates include sets with types in the project hierarchy. This association is then used to determine the location of include members within the project. Each language definition can use this macro to define multiple include sets and each include set can be used throughout the language definition as needed. If you use a single type for include or copy code, you can use the Extend parameter of the FLMTYPE project definition macro or the FLMINCLS macro. The Extend parameter can refer to only one include or copy type. If you use a separate type for each include or copy library and you store your source code in a single source type, you must use the SCLM include set specification coded with the FLMINCLS macro. We recommend that you choose the FLMINCLS include set specification over the FLMTYPE Extend parameter, because FLMINCLS provides better flexibility than EXTEND. Use a single type for each unique format or layout of build output or derived members to simplify management of your environment. For example, we have used a single LOAD type for all load modules and a single LIST type for all compiler/assembler listings in the SCLM01 project. The SCLM01 sample project uses a single source type for all languages used in the project, and separate types for assembler macro, COBOL copy and PL/I include members, MACROS, COPYLIB and PLINCL, respectively.
16
To illustrate the above point, consider a project definition with the FLMTYPE macro written as follows: Example with EXTEND Parameter: MACROS SOURCE FLMTYPE FLMTYPE EXTEND=MACROS
FLMINCLS
TYPES=(SOURCE,MACROS)
In this situation, the type MACROS can contain members referenced by members in the SOURCE type. However, if the source code in type MACROS will always be at a higher layer (group) in the hierarchy (for example, PROD in the SCLM01 project), you do not need to allocate data sets for type MACROS below the PROD layer in the main hierarchy.
17
Note: This mapping is only maintained while users are executing SCLM functions. If ISPF utilities are used on data controlled by SCLM, the users should know the mapping between the PROJECT.GROUP.TYPE name and the fully qualified data set name. Use the SCLM accounting information to find the fully qualified names of project data sets for members stored in a particular group and type. The data set names are defined in the project definition with the FLMCNTRL and FLMALTC macros. Each macro has a DSNAME parameter that allows the project manager to specify the data set names for the entire project or for individual groups. The FLMCNTRL macro defines the data set names for the entire project. The FLMALTC macro defines the data set names on a group-by-group basis. The project definition may be easier to define and understand if you use FLMALTC to define the data set names for each group in the hierarchy and use the FLMCNTRL macro to only define project elements that all global to the entire project. The sample project SCLM01 described in section 1.1 uses the standard SCLM naming convention for both project and versioning partition data sets. A modified version of the SCLM01 sample project is shown in Appendix A-13, Flexible Naming of Project Partitioned Data Sets on page 707 that uses the flexible naming convention. The modified SCLM01 project uses the flexible naming convention of the pattern: component_name_1.component_name_2.@@FLMPRJ.@@FLMGRP.@@FLMTYP The DEVCNTL FLMALTC macro defines an alternate accounting database and data set names to be used by the DEV1 and DEV2 groups that references this macro. The partitioned data sets associated with the DEVx groups have the naming convention: 'ISPFSCLM.DEV.SCLM01.DEVx.type'. The TESTCNTL FLMALTC macro defines an accounting database and data set names to be used by the TEST group that references this macro. The naming convention used for the partitioned data sets associated with the TEST group is: 'ISPFSCLM.TEST. SCLM01.TEST.type'. The DSNAME parameters on both macros work the same way and can be used within the same project definition. The value specified on the DSNAME parameter is a pattern for the data set name. This pattern must meet MVS naming conventions and can contain the SCLM variables @@FLMPRJ, @@FLMGRP, and @@FLMTYP. If DSNAME is not specified, SCLM uses the default naming convention of PROJECT.GROUP.TYPE. The use of variable @@FLMTYP is required. SCLM verifies that the variable @@FLMTYP is used on each DSNAME parameter when the project definition is loaded into memory. The variable @@FLMGRP is very strongly recommended. The use of these variables minimizes the risk that data set names associated with different groups are the same and prevents data from being overwritten. The variable @@FLMPRJ is optional. The SCLM variable @@FLMDSN is created from the value of the DSNAME parameter. Therefore, if the data set name pattern is: component_name_1.component_name_2.@@FLMPRJ.@@FLMGRP.@@FLMTYP Then the value of @@FLMDSN will be: component_name_1.component_name_2.@@FLMPRJ.@@FLMGRP.@@FLMTYP. The versioning partitioned data sets can also use a naming convention other than SCLM's default naming convention. The VERPDS parameter on the FLMCNTRL and FLMALTC macros is used to specify the name of the versioning partitioned data sets. SCLM uses a 18
A Practical Guide to Setting Up and Using SCLM
default of @@FLMDSN.VERSION for the names of the versioning data sets. If a pattern other than the default is used, the variables @@FLMGRP and @@FLMTYP must be part of the data set name pattern. Using two variables minimizes the risk that the versioning data set names associated with different groups are the same, and prevents data from being overwritten. The modified sample SCLM01 project uses the default @@FLMDSN.VERSION names for versioning data sets. Please be aware that SCLM does not guarantee the uniqueness of the data set names or check the validity of values entered on the DSNAME parameter. There is also an alternative method of implementing a flexible naming convention and it does not depend upon SCLM. It is the IDCAMS DEFINE ALIAS facility, also known as data set alias. We have observed that some customers prefer data set alias instead of SCLMs standard flexible naming convention method. Here is an example of how you can implement flexible naming convention using data set alias: DEFINE ALIAS (NAME('<project>.<group>.HCSS') RELATE ('<project>.<group>.HELP.CSS')) -
Further discussion of data set alias is outside the scope of this redbook. Refer to the DFSMS/MVS documentation for additional information on this topic.
FLMLANGL
19
FLMINCLS
Use this macro to associate sets of includes found during the parse of a member with the types in the project definition that contain those includes. FLMALLOC macros then reference this macro to allocate the include libraries for build translators. The FLMINCLS macro can be used multiple times for each language, but each FLMINCLS macro must have a unique name within the language and be associated with at least one FLMALLOC macro. This helps ensure that the includes that are found by build are the same ones found by the translators. Use this macro to tell SCLM to automatically rebuild members with this language after they are promoted into the listed groups. Use this macro to define a translator for a language. It can be used multiple times for a language. Use this macro to vary the options passed to a build translator based on the group where the build is taking place. Options can be appended to the existing options or replace the options completely. FLMTOPTS macros must follow an FLMTRNSL macro with FUNCTN=BUILD. Use this macro to specify conditional execution of BUILD translator. Part of the specification can include examination of return codes from previous BUILD translators in the language definition. Use this macro for each data set allocation required by a translator. If you are using a ddname substitution list, specify an FLMALLOC macro for each ddname in the correct order. If not, determine the ddnames that are needed by the translator and specify an FLMALLOC macro for each ddname. Use this macro to identify data sets to be concatenated to a ddname. The data sets must be preallocated. The FLMCPYLB data sets are used as input to the Parse and other translators.
FLMTCOND
FLMALLOC
FLMCPYLB
For each language, take the following actions as necessary: Specify data sets containing dependencies that are not to be tracked, such as assembler system macros (macro FLMSYSLB). Specify the maximum number of includes, change codes, user data records, compilation units, and external dependencies expected in a source member (macro FLMLANGL; keyword BUFSIZE). Specify the version for the language (macro FLMLANGL: keyword: VERSION). This change will also trigger rebuilds of members with this language even if nothing else has changed. So each time you make essential changes to the language change the version. A proposed name is Dyymmdd, where yymmdd is the year month day format, e g. D070326 which says it was changed on March 26, 2007. Determine if ddname substitution is needed for the translator. This information can be found in the translator documentation. Adjust the PORDER parameter on the FLMTRNSL macro as needed. Verify translator load module names and load data sets for accuracy (macro FLMTRNSL; keywords COMPILE, DSNAME, and TASKLIB). Adjust translator return codes to project requirements if nonzero return codes are acceptable (macro FLMTRNSL; keyword GOODRC). Update default translator options, as required (macro FLMTRNSL; keyword OPTIONS). Verify translator version information (macro FLMTRNSL; keyword VERSION). Specify output listings (macro FLMALLOC; keyword PRINT).
20
Specify output default types (macro FLMALLOC; keyword DFLTTYP) to match the FLMTYPE type specified in the project definition. Verify that system libraries are being allocated for build translators. Either specify ALCSYSLB=Y on the FLMLANGL macro or ensure that the data sets from FLMSYSLB macros are specified on FLMCPYLB macros following IOTYPE=I allocations. Specify the include sets for the language to use. You must specify all the include-sets returned by the parser for the language. If you add a new FLMINCLS macro, ensure that it is referenced by at least one FLMALLOC of a build translator. If you remove an FLMINCLS macro, update any FLMALLOC macros that reference it, ensuring that no member's accounting data contains references to that include set. Example A-3 on page 694 through Example A-8 on page 703, referenced in 1.3.1, Steps to set up the sample project on page 6, show language definitions supplied by SCLM and tailored for the SCLM01 sample project. To help understand language definition macros more thoroughly, let us examine the FLM@COBE language definition in Example A-4 on page 695 in detail. In FLM@COBE, the FLMLANGL macro defines the COBE (Enterprise COBOL) language to SCLM. The FLMTRNSL parameters specify particular information about the compiler: The name of the compiler: Enterprise COBOL. The name of the compiler load module:IGYCRCTL. The version of the compiler: 3.4.0. The compiler options: XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ The FLMALLOC macros following the build FLMTRNSL macro specify each ddname needed by the COBOL compiler. SCLM allocates the ddnames specified on the FLMALLOC macro before invoking the translator (in this example, the COBOL IGYCRCTL load module). The FLMALLOC parameters allow specification of the record format (RECFM), the logical record length (LRECL), the number of records (RECNUM), and other options. An FLMCPYLB macro specifies that a ddname be associated with a null data set. You can include language definitions into the project definition, either by placing them directly into the project definition or having them copied into the project definition when the project definition is assembled. It is easier to maintain the project definition if you keep each language definition in a separate member and copy it into the project definition when the project definition is assembled. The SCLM01 sample project definition uses this method of including the language definitions.
21
The SCLM01 sample project definition listed in Figure 1-11 uses the primary accounting data set, SCLM01.ACCOUNT.FILE.
SAMPLE
C C
22
23
FLMALTC
FLMATVER
25
Create both the primary and secondary accounting data sets the same way, as a VSAM cluster, using the IDCAMS define cluster utility. Create additional accounting data sets, if you need to maintain accounting information for different groups in separate accounting data sets. Example A-9 on page 703, discussed in 1.3.1, Steps to set up the sample project on page 6, shows the JCL, called SCLM01.PROJDEFS.SOURCE(SCLMACCT), which is used to define the accounting data set supplied by SCLM and tailored for the SCLM01 sample project. Each accounting data set requires approximately three cylinders of 3390 DASD for every 1000 partitioned data set members that SCLM controls. The space required varies depending on how much information SCLM will control. If additional space in the data set is desired, modify the space parameter (shown as CYLINDERS in the example JCL).
Note: Blocksize=0 ensures best performance by using the system-determined block size. SCLM has no special considerations that require the allocation of additional space in the project partitioned data sets. Allocate the size of the project partitioned data sets according to the amount of data that will be stored in them.
26
27
28
Use the FLMATVER project definition macro to enable the audit and version utility. Using the group and type defined in this macro, SCLM records information in the audit control data set each time a member's accounting information is created, updated, or deleted within that SCLM group. This information is a record that contains: The member's accounting information The type of operation The user ID of the user who performed the operation The date and time the operation occurred Versioning partitioned data sets are organized into a hierarchy which matches that of project data sets, and controlled by the project definition. The version contains the information to recreate the member as it previously existed. Note: Version information is captured each time an editable member or an output that is not record format U is created or updated, but not when it is deleted. Since versioning of output or derived members or components does not generally add much value to the software configuration management (SCM) process, most customers implement versioning to create versions of only editable components.
1.10.2 Setting up the project definition for audit and versioning capability
You can use several parameters of the FLMCNTRL and FLMALTC macros and all parameters of the FLMATVER macro of the project definition to set up the audit and versioning capability for your project. We introduce these parameters in detail below.
29
specify different VERPDS data sets for each group or use the @@FLMGRP variable in the VERPDS name on the FLMCNTRL macro. Either way, do ensure that VERPDS data sets are unique for each group and type in the project hierarchy. Failure to specify and allocate unique VERPDS data sets can result in difficulty retrieving versions. You can have only one VERPDS data set per group and type at a time. However, you can respecify the VERPDS data set name to control the size of the versioning partitioned data sets. If the VERS=primary audit control data set name remains the same, a pointer to the VERPDS that holds a particular version allows you to retrieve and delete versions of members, even if you have changed the name of the VERPDS data set. Number of versions to keep: Use the VERCOUNT parameter on the FLMCNTRL macro to specify how many versions of a member to keep. The default value of zero, used in the SCLM01 example project indicates that all versions are kept. The number of versions specified using this parameter applies to all types that are versioned. You can override this value for specific groups and types using the VERCOUNT parameter on the FLMATVER (not FLMALTC) macro. Valid values are 0 and any integer value greater than or equal to 2. 1 is not a valid value, because that is already in the hierarchy. If you do specify a value of 2 or more, allocate a separate VERPDS for each group and type that has versioning enabled.
30
Ignore sequence number differences: Use the SEQNUM parameter to indicate whether to ignore sequence number differences. If you specify STANDARD, STD, or COBOL, SCLM ignores sequence number differences when creating a version of a member. STANDARD or STD means ignore differences in the last eight columns of the data for fixed formats, and the first eight columns of the data for variable formats. In both cases the ignored columns are presumed to be standard sequence numbers. COBOL means ignore differences in the first six columns of the data, which are presumed to be COBOL sequence numbers. Omitting this parameter, or specifying NONE, indicates that all columns are to be treated as data. Enable checksum verification on version retrieval Use the CHECKSUM parameter to indicate whether to enable checksum verification. The default value of YES enables checksum verification of versions on retrieval. The value of NO disables checksum verification. The checksum verification is a new feature of SCLM for z/OS V1R8. When you migrate from an earlier SCLM release in which SEQNUM support was not available, you might encounter message FLM39220 Return Code 34. If this happens, disable checksum verification (CHECKSUM=NO) and retry retrieval of the version to override the checksum verification failure. However, the validity of the retrieved version is not a sure thing. Hence, we recommend this procedure only for migration or for emergency use.
31
Notes: The LRECL value must be at least 259 and must be 4 bytes more than the LRECL of the largest source data set to be versioned. The 4 bytes in the block size calculation are for MVS control information, specifically for the blocklength field. For example, with a blocking factor of 10 the block size would be calculated as (259 x 10) + 4 = 2594.
32
must recover source code through versioning which is outside the scope of the Package Backout process. The term "package" refers to an SCLM architecture member that is used during build and promote processes. This architecture member defines the modules and architecture members that are promoted using include or change code parameters. The libraries that contain packages are determined by using the ISAPACK=Y flag on the FLMTYPE macro within the project definition. If an architecture member is promoted from a library which does not have an ISAPACK=Y flag then the package backout process will not be invoked and no modules will be backed up. During package backout, the equivalent of normal promote processing is performed from the backup group, with both the Promote Copy and Purge phases. The Copy phase copies modules from the backup group to the target group. The Purge phase deletes the backed up modules. The promote process also allows DB2 BINDs to be performed against any recovered DBRMs. Promote copy and purge exit processing is also invoked during the package backout process. This ensures that the integrity of backed out load modules and ensures that any other exit processing that is in place during a normal promote copy or purge process is maintained. Package Backout involves two phases, Backup and Restore. The backup phase occurs during a Promote process. For each member of a package marked for backout, it copies the old members to the existing backup data set, and saves the package details into a separate file, Before allowing the promote to continue. The restore phase occurs when users explicitly request to back out a package or an individual member. Restore promotes the old members back to the original group. The Package Details file PDS holds details of both the backed up members and the editable members in the package. They can be used as input to determine the appropriate versions to be recovered. You as the SCLM Administrator define This PDS, using the PACKFILE=Y parameter on the FLMTYPE macro. The Package Details PDS members hold the package backout information, such as: Package status Group Type Member Old member timestamp New member timestamp Timestamp when backed out Member status Member-level selection flag A package has the status of "BACKEDUP" when it is initially backed up, and "RESTORED" after a package-level restore is performed. A similar status is retained against the backed-up member, showing either "BACKEDUP", or "RESTORED" if it is restored using a member-level restore. To be able to recover source code of the Backed out Package, you must implement versioning for editable types that are promoted to a level at which Package Backout has been implemented. Package Backout by itself cannot control backout of editable types. Edit compare can be used to merge any desired changes from intermediate levels, and the member can be fixed and then built, tested, and promoted through the normal development process.
33
34
35
See Appendix A-16, Sample FLMLIBS Skeleton on page 711 for a sample FLMLIBS skeleton.
36
Notes: When allocating to VIO, make sure that enough auxiliary storage is dedicated to VIO so that system availability is not affected. Use of the BUFNO parameter on allocation of ISPF libraries is not supported. The ISPF temporary data set default names associated with the ISPCTLx are SPFTEMPx.CNTL, respectively, where x= value 0-9, A-W. The ISPF temporary data set default names associated with the ISPWRKx are SPFTEMPx.WORK, respectively, where x= value 1-9, A-W. The ddnames ISPWRKx are used by ISPF for file tailoring services with ISPFILE allocated to a PDS. The ddnames ISPLSTx are used for generated listings. The ddname ISPCTL0 is used with the edit SUBMIT command. The ddnames ISPCTLx are used with the PDF compress (both interactive and the LMCOMP service), PDF batch (option 5) and by ISPF for processing file tailoring service FTOPEN TEMP. ISPCTL1 is a required ddname when using SCLM. The data set should be allocated as an ISPF temporary data set for SCLM foreground processing and should be added to the FLMLIBS skeleton for batch processing. ISPF does not support multivolume temporary data sets. If DFSMS is installed, temporary data sets dynamically allocated by ISPF must be assigned a data class with a volume count of one. This can be controlled in the ACS routines by testing the execution mode (&XMODE) for a value of TSO. If you have dialogs that need to edit or browse temporary data sets, use the LMINIT service to associate a DATAID with ddname ZTEMPN and invoke edit or browse using the DATAID parameter. For more information, refer to the BROWSE and EDIT services in the z/OS ISPF Services Guide.
37
38
Chapter 2.
Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
Language definitions provide SCLM with language-specific control information such as the language name and the definition of language parse, build, copy, and purge translators. By creating a language definition as part of the project definition, you specify to SCLM the languages that will be used for the project. You can customize the examples provided with the product to suit specific requirements of your project. You can also tailor SCLM to support languages other than those listed in those examples.
39
2.1 Overview
A language definition describes language-specific processing in two ways: From a data-flow perspective, the language definition specifies all data sets used as input to or output from various SCLM processes such as Save, Edit, Build, Promote, and Delete. From a procedural perspective, the language definition specifies the translators (for example, parsers or compilers) that are invoked to process your SCLM-controlled data. The order in which those translators are invoked and the options to be passed to the translators are defined in the language definition. You must provide SCLM a language definition for each language (Assembler, COBOL, PL/I, Link-Edit, and so on) that you want SCLM to support. In most cases, you can make minor changes to the sample SCLM language definitions provided with ISPF. SCLM offers a language definition macro for each of the following definitions: FLMSYSLB System library definitions (Optional) FLMLANGL Language identifier definition (Required) FLMINCLS Include set definitions (Optional) FLMTRNSL Translator definitions (Optional) FLMALLOC Allocation definitions (Optional) FLMCPYLB Copy library definitions (Optional) Each macro accepts a number of different parameters. Therefore, you can specify a large variety of language definitions. The language definitions provided with the product are examples that can serve as a reference in the construction of language definitions for a specific application and environment. To determine what modifications you can make to the language definition, become familiar with the parameters of the language definition macros as documented in the z/OS ISPF Software Configuration and Library Manager Reference. Typically, if you want to write a new language definition or customize an existing one, you should copy a sample language definition and then modify it to meet your specific needs. However it is recommended to use the member name as the same name as specified on the option LANG= of FLMLANGL macro. This will make it easier to find the language translator for a particular language.
40
We discuss the following language definitions in this chapter: FLM@COBE FLM@CCBE COBCICS FLM@PLIE FLM@HLAS FLM@L370 Enterprise COBOL language definition, LANG=COBE (Appendix A-4) Enterprise COBOL with integrated CICS Precompile language definition, LANG=CICSCBE (Appendix B-1) Enterprise COBOL with separate CICS Precompile language definition, LANG=CCOBCICS (Appendix B-1) Enterprise PL/I language definition, LANG=PLIE (Appendix A-7) High-level assembler language definition, LANG=HLAS (Appendix A-5) z/OS binder/linkage editor language definition, LANG=LE370 (Appendix A-6)
See Appendix B-1, SCLM01.PROJDEFS.SOURCE(FLM@CCBE) on page 713 for the listing of the FLM@CCBE language definition with customizations for the example project, SCLM01, highlighted in bold. See Chapter 1, SCLM project setup on page 3 for the remaining language definitions. In the next sections, we illustrate the process of defining each language to SCLM. As we progress through each language definition, we discuss SCLM macros along with the information SCLM needs to control translator modules. Reference language definitions in the code for a project definition by means of the COPY statement.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
41
Compilers are not required to support a ddname substitution list in order to be defined to SCLM. However, ddname substitution list support makes it easy to link or string two different compilers or preprocessors together.
42
If you wanted to use ALTIN as the DD name for the primary compiler source file, you would have to specify DD(SYSPRINT,ALTIN). If you specified DD(ALTIN), SYSIN would be used as the ddname for the primary compiler source file and ALTIN would be used as the DD name for the compiler listing. You can also use * to indicate that the default DD name should be used. Thus DD(*,ALTIN) is equivalent to DD(SYSPRINT,ALTIN). For more information, see the chapter relating to Compile-time option descriptions. Note: What this means from an SCLM perspective is that PORDER=3 is not supported for the Enterprise PL/I compiler, so PORDER=1 should be used. However the use of the DD compiler option with PORDER=1 will provide the equivalent functionality as previous versions of the compiler using PORDER=3.
In this example, values are specified for four parameters. Defaults are used for the other parameters: LANG This specifies the language name a user must enter on the SPROF panel or on the Migrate Utility panel to request that this language definition be used to drive parse and build operations of the Enterprise COBOL modules. Use up to 8 characters to identify the specific language version with a certain release of the current Enterprise COBOL compiler. If you install a new release or version of the Enterprise COBOL compiler, you can set this parameter to a different value so that SCLM can mark all Enterprise COBOL modules needing to be rebuilt. You must then re-assemble and re-link your project definition. A suggested format is Dyymmdd to indicate the date the translator was changed. Verifies that external system libraries defined in FLMSYSLB are being allocated for build translators This is a description of the language, maximum 40 characters.
VERSION
ALCSYSLB LANGDESC
Notice that the continuation character in column 72, in this case a C. If the parameters for a macro will spread beyond one (1) line, then a continuation character must be used.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
43
TYPES=(COPYLIB)
The FLMINCLS macro specifies the name of the include set that uses this definition. If no name is specified (as in this example), the definition is associated with the default include set. An include set defines a search path for all includes associated with that include set. Multiple include sets can be specified in a language definition if the parser and compiler support distinguishing one kind of include from another. For the parser, this means that the syntax of the language must support determining which include set an include belongs to. For the compiler, this means that a separate ddname must be used for each different include set (kind of include). For example, Figure 2-3 shows how FLMINCLS could be specified when DB2 DCLGENs are read from a separate library: * FLMINCLS TYPES=(COPYBOOK,DCLGEN) DB2DCLS FLMINCLS TYPES=(DCLGEN) *
Figure 2-3 FLMINCLS specifying multiple include sets
In the above example, the COPYBOOK and DCLGEN could both have the same name, because they are included from different data sets. The following parameter is used: TYPES This specifies the name(s) of the types which are searched to find includes. In this case, SCLM searches the COPYLIB type first, and next the default @@FLMTYP type. The @@FLMTYP SCLM variable indicates that SCLM also needs to search the type of the member that is processed by the Enterprise COBOL compiler. If SCLM01.DEV1.SOURCE(IGYTSALE), for example, is going to be compiled, SCLM looks for includes first in the data sets associated with the COPYLIB type, and next the SOURCE type.
44
SCLM uses the included module information to maintain its dependency tables so that it knows which programs to recompile if an include changes. There are many default parsers with SCLM, but you can also create your own, or modify some of the samples. For more information on modifying parsers, see Chapter 7. Understanding and using the customizable parsers in the SCLM Guide and Reference, SC34-4817-05. The parse translator is shown in Figure 2-4. * FLMTRNSL CALLNAM='SCLM COBOL PARSE', FUNCTN=PARSE, COMPILE=FLMLPCBL, PORDER=1, CALLMETH=LINK, OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,)
Figure 2-4 FLMTRNSL macro specification for COBOL parser
C C C C C
The following parameters are used in this example: CALLNAM This is a character string that appears in messages during the specified FUNCTN (in this case PARSE). This value will assist in recognizing which translator was executing during the specified FUNCTN. The value PARSE tells SCLM that this program is to be invoked whenever you save a module with LANG=COBE. This is the member name of the load module for the Enterprise COBOL parser. Note that the keyword COMPILE actually identifies the load module name of a translator (which may or may not be a compiler). The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. The value LINK specifies the invocation method of the module specified in the COMPILE parameter. For CALLMETH of ATTACH, LINK, or TSOLNK, this is the name of a REXX exec or CLIST, or the entry point to a load module. For a CALLMETH of ISPLNK, this must have a value of SELECT. This specifies the options string to be passed to the parser. Strings that start with @@FLM are SCLM variables, and they are replaced by their current values before the string is passed to the parser. DSNAME is not used in this example, but it identifies the partitioned data set that contains the Enterprise COBOL parser load module. DSNAME is required only when the data set containing the desired module is not in the systems ISPLLIB, STEPLIB, or LINKLIST concatenations. FLMLPCBL is in ISP.SISPLPA, which is defined in the LINKLIST concatenation, so DSNAME is not required in this case. When more than one data set is to be searched, you can use the TASKLIB parameter in conjunction with, or as a replacement for, the DSNAME parameter.
FUNCTN COMPILE
PORDER CALLMETH
OPTIONS
DSNAME
Since the parser reads its source from a ddname, you must tell SCLM how to allocate that ddname. To do this, we use an FLMALLOC macro and an FLMCPYLB macro as shown in Figure 2-5.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
45
*
Figure 2-5 FLMALLOC and FLMCPYLB macro specifications for parser
The following parameters are used in this example: IOTYPE=A The value A tells SCLM to allocate a ddname to one or more specific data set(s). Each of those data sets are subsequently identified by using an FLMCPYLB macro. This identifies the ddname to be allocated. This identifies the member to be parsed. When the two SCLM variables are resolved, the parser is passed the data set and member that is being saved.
DDNAME @@FLMDSN(@@FLMMBR)
C C C C C C C
You can specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE DSNAME This is a character string that appears in the build messages. It names the Enterprise COBOL compiler. This tells SCLM that this program gets invoked whenever you want to build a member with LANG=COBE. This identifies the load module name for the Enterprise COBOL compiler. Names the partitioned data set that contains the Enterprise COBOL compiler load module. Since ECOBOL.V340.SIGYCOMP is not defined in the LINKLIST concatenation, DSNAME is used here. There are two ways you can control where the compiler is loaded from:
Do specify the DSNAME so that you as the administrator are assured where the compiler is loaded from. The disadvantage is that, if you specify the version in the name, you will have to modify your translators when you install a new release of the compiler. The advantage is that you are assured of knowing where the compiler is loaded from.
46
A Practical Guide to Setting Up and Using SCLM
Do not specify DSNAME and load the compiler up from the system
concatenation for ISPLLIB, STEPLIB and LINKLIST. The advantage is that you will not have to modify your translators. The disadvantage is that you might load a version of the compiler you are not expecting. PORDER GOODRC The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. The value 4 indicates that SCLM is to consider this build unsuccessful if the compiler completes with a return code greater than 4, meaning only informational and warning diagnostics are acceptable. This specifies the options string to be passed to the compiler.
OPTIONS
Let us now examine the ddnames used by the Enterprise COBOL compiler in detail as specified in the sample as provided as shown in Figure 2-7. As we have used PORDER=1, we have only allocated the ddnames that are required:.
The following parameters are used in this macro: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSLIN. After the language definition completes successfully, the temporary sequential data set is copied as a member in the SCLM hierarchy. This identifies the ddname to be allocated. In this case SYSLIN. The value OBJ tells SCLM to save what is written to this ddname and keep it under SCLM control, SCLM must be able to determine the member name and the SCLM-controlled data set name in which it is to save this output module. If SCLM is building an architecture definition, it determines the project, group, type and member as follows: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The group name is the second qualifier. SCLM looks at the architecture definition being built and retrieves the member and type from the architecture statement associated with the keyword OBJ. The type name is the third qualifier. The construction of the PDS name, however, still follows the defined rules in FLMCNTRL or FLMALTC based on the SCLM identifiers @@FLMPRJ, @@FLMGRP and @@FLMTYP. DFLTTYP The value OBJ tells SCLM to save what is written to this ddname to the SCLM type OBJ and keep it under SCLM control. If SCLM is building a source member, it determines the project, group, type and member as follows: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The SCLM type is the value of the DFLTTYP= keyword.
DDNAME KEYREF
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
47
The member name defaults to the name of the member being built. If SCLM is building an architecture definition (and not a source member directly) then the DFLTTYP= value is ignored. Instead, SCLM uses the type associated with the KEYREF= value. RECNUM The value 5000 tells SCLM to allocate enough space in this data set to hold 5000 records.
The following parameters are used with this macro: IOTYPE=I The value I tells SCLM to allocate this ddname to a concatenation of SCLM-controlled data sets. The types used in the concatenation are determined by the FLMINCLS macro referenced by the INCLS= parameter on the FLMALLOC macro. In this case, there is no INCLS= parameter so the default FLMINCLS (or include set) is used. A hierarchy of data sets is concatenated for each type specified for the referenced FLMINCLS macro. The hierarchy begins at the group where the build is taking place and extends to the top of the project's hierarchy. In this case, the concatenation first contains all of the data sets for the INCLUDES type followed by the data sets for the value substituted into the @@FLMTYP variable. See the KEYREF= parameter to determine the value which is substituted into the @@FLMTYP and @@FLMETP variables. DDNAME KEYREF This identifies the ddname to be allocated. In this case SYSLIB. The value SINC tells SCLM that, if you are building an architecture definition, refer to the first SINC statement in that architecture definition for the type that is substituted into the @@FLMTYP macro. The value for @@FLMETP comes from the EXTEND= parameter of the FLMTYPE macro for that type. If you are not building an architecture definition, the type is the type of the member being built.
48
The following parameters are used in this example: IOTYPE=S The value S tells SCLM to allocate a temporary sequential data set and create the input stream for the translator by concatenating the contents of all the members that are SINCed as well as any text specified via CMD cards. This identifies the ddname to be allocated, in this case, SYSIN. The value SINC tells SCLM that, if you are building a source module directly, SCLM copies that member to this temporary data set. If you are building a CC architecture definition, SCLM copies the members listed on the SINC statement to this data set.
DDNAME KEYREF
The following parameters are used in this example: IOTYPE=W DDNAME The value W tells SCLM to allocate a temporary sequential data set for translator use. This identifies the ddname to be allocated, in this case, SYSUT1 through SYSUT7.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
49
The following parameters are used in this example: IOTYPE=A DDNAME NULLFILE The value A tells SCLM to allocate a ddname to the data set identified by the next FLMCPYLB macro. This identifies the ddname to be allocated, in this case, SYSTERM and SYSPUNCH. This allocates the specified DD to a dummy data set.
C C
The following parameters are used in this example: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSPRINT. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy This identifies the ddname to be allocated, in this case, SYSPRINT. The value LIST refers SCLM to the LIST record in the architecture definition being built. That record contains the member name and type into which the listing is saved after a successful build. (SCLM copies the data from the temporary data sets into members of the PDSs controlled by SCLM after a successful build.) The value LIST specifies the data set type into which this listing is written whenever a module is built directly or when using INCLD in an architecture definition. The value Y specifies that this is a listing that should be copied to the Build List data set after the build process completes. The value FBA specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed block with an ASA control character. The value 133 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 50000 tells SCLM to allocate enough space in this data set to hold 50000 records.
DDNAME KEYREF
DFLTTYP
PRINT RECFM
LRECL RECNUM
50
The format of the macro is: language FLMSYSLB data set The language is an 8-character language name that must be the same name as the language specified in the LANG field on the FLMLANGL macro. To specify multiple data sets for a language, omit the language on all but the first data set. The data set parameter lists each static copy data set under the FLMSYSLB macro for this language definition.
In this example, values are specified for 5 parameters. Defaults are used for the other parameters.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
51
LANG
This specifies the language name a user must enter on the SPROF panel or on the Migrate Utility panel to request that this language definition be used to drive parse and build operations of the Enterprise COBOL with CICS modules. Use up to 8 characters to identify the specific language version with a certain release of the current Enterprise COBOL compiler. If you install a new release or version of the Enterprise COBOL compiler, you can set this parameter to a different value so that SCLM can mark all Enterprise COBOL modules needing to be rebuilt. You must then re-assemble and re-link your project definition. A suggested format is Dyymmdd to indicate the date the translator was changed. A value of Y verifies that system data sets are being allocated for build translators, and automatically adds these data sets to the concatenation of IOTYPE=I and KEYREF=SINC allocations. The value BUILD defers checking of FLMSYSLB data sets until build time. This is a description of the language, maximum 40 characters.
VERSION
ALCSYSLB
CHKSYSLB LANGDESC
Notice the continuation character in column 72, in this case a C. If the parameters for a macro will spread beyond 1 line, then a continuation character must be used.
TYPES=(COPYLIB)
In this example, the TYPES parameter of the FLMINCLS macro is used to tell SCLM where to look for includes. Because no name label is specified, this definition applies to the default include set. The FLMINCLS macro specifies the name of the include set that uses this definition. If no name is specified (as in this example), the definition is associated with the default include set. An include set defines a search path for all includes associated with that include set. Multiple include set s can be specified in a language definition if the parser and compiler support distinguishing one kind of include from another. For the parser, this means that the syntax of the language must support determining which include set an include belongs to. For the compiler, this means that a separate ddname must be used for each different include set (kind of include). The following parameter is used: TYPES This specifies the name(s) of the types which are searched to find includes. In this case, SCLM searches the COPYLIB type first, and next the default @@FLMTYP type. The @@FLMTYP SCLM variable indicates that SCLM also needs to search the type of the member that is processed by the Enterprise COBOL compiler.
52
C C C C C C C
Specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE VERSION TASKLIB This is a character string that appears in the build messages. It names the Enterprise COBOL compiler. This tells SCLM that this program gets invoked whenever you want to build a member with LANG=COBE. This identifies the load module name for the Enterprise COBOL compiler. Version of the compiler used for information purposes. This value is stored in the account record for any generated outputs. This specifies the ddname associated with one or more data sets that contain the translator load module or modules. The data sets will be specified using an FLMALLOC macro with in our example, a ddname of TASKLIB. When specified for a translator using a ddname substitution list, the TASKLIB allocation does not appear in the list passed to the translator. TASKLIB is only valid for CALLMETH=ATTACH. The operating system searches for executable members in, if specified, the DSNAME parameter, then in the TASKLIB concatenation, and then in the system concatenation. The value 4 indicates that SCLM is to consider this build unsuccessful if the compiler completes with a return code greater than 4, meaning only informational and warning diagnostics are acceptable. The value 1 tells SCLM that this program expects an options string but not a ddname substitution list.
GOODRC
PORDER
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
53
OPTIONS
This specifies the options string to be passed to the compiler. As this translator needs to perform a CICS precompile we must pass the parameter CICS(''COBOL3'') to the Enterprise COBOL compiler to tell it to translate the CICS statements.
Let us now examine the ddnames used by the Enterprise COBOL compiler in detail as specified in the sample as provided. As we have used PORDER=1 we have only allocated the ddnames that are required. We can see that as we are using the Enterprise COBOL translator and utilizing the built-in CICS translator, that the DDnams used are exactly the same as were used in the previous example, 2.2.2, Enterprise COBOL on page 43. So refer to that example for an explanation of the ddnames used in the COBOL compile step. The only difference is the use of the TASKLIB option on the FLMTRNSL macro and therefore the provision of a TASKLIB FLMALLOC macro.
Allocate TASKLIB DD
In a single step translator that requires multiple load modules from different locations, as in this case with the CICS precompiler and COBOL compiler, we need to tell the translator where to find all the load modules. If the compilers are not allocated to the system linklist then we must define the load module locations in the translator. The DSNAME parameter on the FLMTRNSL macro only lets us specify a single data set. In our case we need both the CICS precompile and COBOL compile. So we must use a TASKLIB statement on the FLMTRNSL macro that specifies a ddname that lists all of the required compiler data sets as shown in Figure 2-17. * (* TASKLIB*) FLMALLOC IOTYPE=A,DDNAME=TASKLIB FLMCPYLB ECOBOL.V340.SIGYCOMP FLMCPYLB CICS.TS31.CICS.SDFHLOAD
A description of the parameters follows: IOTYPE=A The value A tells SCLM to allocate a ddname to one or more specific data set(s). Each of those data sets are subsequently identified by using an FLMCPYLB macro. This identifies the ddname to be allocated.In this case TASKLIB. This matches the ddname specified by the TASKLIB parameter on the previous FLMTRNSL macro.
DDNAME
The 2 FLMCPYLB macros specify the data sets required by the compiler to perform the CICS translation as well as the Enterprise COBOL compilation.
54
The format of the macro is: language FLMSYSLB data set The language is an 8-character language name that must be the same name as the language specified in the LANG field on the FLMLANGL macro. To specify multiple data sets for a language, omit the language on all but the first data set. The data set parameter lists each static copy data set under the FLMSYSLB macro for this language definition.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
55
In this example, values are specified for 5 parameters. Defaults are used for the other parameters. LANG This specifies the language name a user must enter on the SPROF panel or on the Migrate Utility panel to request that this language definition be used to drive parse and build operations of the Enterprise COBOL with CICS modules. Use up to 8 characters to identify the specific language version with a certain release of the current Enterprise COBOL compiler. If you install a new release or version of the Enterprise COBOL compiler, you can set this parameter to a different value so that SCLM can mark all Enterprise COBOL modules needing to be rebuilt. You must then re-assemble and re-link your project definition. A suggested format is Dyymmdd to indicate the date the translator was changed. A value of Y verifies that system data sets are being allocated for build translators, and automatically adds these data sets to the concatenation of IOTYPE=I and KEYREF=SINC allocations. The value BUILD defers checking of FLMSYSLB data sets until build time. This is a description of the language, maximum 40 characters.
VERSION
ALCSYSLB
CHKSYSLB LANGDESC
Notice the continuation character in column 72, in this case a C. If the parameters for a macro will spread beyond 1 line, then a continuation character must be used.
TYPES=(COPYLIB)
In this example, the TYPES parameter of the FLMINCLS macro is used to tell SCLM where to look for includes. Because no name label is specified, this definition applies to the default include set. The FLMINCLS macro specifies the name of the include set that uses this definition. If no name is specified (as in this example), the definition is associated with the default include set. An include set defines a search path for all includes associated with that include set. Multiple include set s can be specified in a language definition if the parser and compiler support distinguishing one kind of include from another. For the parser, this means that the syntax of the language must support determining which include set an include belongs to. For the compiler, this means that a separate ddname must be used for each different include set (kind of include). The following parameter is used: TYPES This specifies the name(s) of the types which are searched to find includes. In this case, SCLM searches the COPYLIB type first, and next the default @@FLMTYP type. The @@FLMTYP SCLM variable indicates that SCLM also needs to search the type of the member that is processed by the Enterprise COBOL compiler.
56
C C C C C C C
Specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE DSNAME Names the CICS precompiler. This name appears in build messages. This tells SCLM that this program gets invoked whenever you want to build a member with language Enterprise COBOL with CICS. This identifies the load module name, DFHECP1$, for the CICS precompiler. Names the partitioned data set that contains the CICS precompiler load module. Since CICS.TS31.CICS.SDFHLOAD is not defined in the LINKLIST concatenation, DSNAME is used here. Version of the compiler used for information purposes. This value is stored in the account record for any generated outputs. The value 4 indicates that SCLM is to consider this build unsuccessful if the precompiler completes with a return code greater than 4, meaning Only informational and warning diagnostics are acceptable. The value 3 tells SCLM that this program expects an options string and a ddname substitution list to the CICS precompiler. See 2.2.1, Using ddnames and ddname substitution lists on page 41 for more information on ddname substitution lists. This specifies the options string to be passed to the precompiler.
VERSION GOODRC
PORDER
OPTIONS
By using PORDER=3, a ddname substitution list is passed to the CICS precompiler. This allows us to pass the output from the precompiler to the Enterprise COBOL compiler via the CICSTRAN DD allocation. The output from the CICS precompiler normally goes to SYSPUNCH and the input to the Enterprise COBOL compiler comes from SYSIN.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
57
As these are two different DD names, using PORDER=1, SCLM is not going to be able to associate the output from the CICS precompile to the input to the Enterprise COBOL compile. PORDER=3 allows us to substitute a different ddname than is expected by the compiler for both the CICS precompile and COBOL compile, thus allowing us to associate the output from the CICS precompile to the input of the COBOL compile. As discussed earlier in 2.2.1, Using ddnames and ddname substitution lists on page 41, when you use a ddname substitution list, you must define the ddnames in the order in which they are expected to appear in the ddname substitution list by the translator. The compiler uses temporary ddnames created by SCLM, or the ddname you tell SCLM to use, instead of the standard documented ddnames, such as SYSIN. Let us now examine the ddnames used by the CICS precompiler in detail.
The following parameters are used in this example: IOTYPE=S The value S tells SCLM to allocate a temporary sequential data set and create the input stream for the translator by concatenating the contents of all the members that are SINCed as well as any text specified via CMD cards. The value SINC tells SCLM that, if you are building a source module directly, SCLM copies that member to this temporary data set. If you are building a CC architecture definition, SCLM copies the members listed on the SINC statement to this data set. The value FB specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed block. The value 80 specifies the record length, in characters, of the temporary data set that SCLM creates. This identifies the ddname to be allocated. In this case SYSIN.
KEYREF
This definition contains the following parameters: IOTYPE=O The value O tells SCLM that the precompiler writes to this ddname using a sequential data set. SCLM creates a temporary sequential data set and allocates it to a temporary ddname (since this is part of a ddname substitution list). The value FBA specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed block with an ASA control character. The value 121 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 35000 tells SCLM to allocate enough space in this data set to hold 35000 records. The value Y specifies that this is a listing that should be copied to the Build List data set after the build process completes.
RECFM
Figure 2-25 FLMALLOC macro specifications for SYSTERM and SYSPUNCH DDs
The following parameters are used in this example: IOTYPE=W The value W tells SCLM that the precompiler writes to this ddname using a sequential data set. SCLM creates a temporary sequential data set and allocates it to a ddname specified on the ddname parameter (since this is part of a ddname substitution list). See also the DDNAME parameter. The value FB specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed block. The value 80 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 5000 tells SCLM to allocate enough space in this data set to hold 5000 records. This tells SCLM to assign the ddname CICSTRAN to this allocation, so that the Enterprise COBOL compiler can refer back to it for the modified source.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
59
C C C C C C C C
Figure 2-26 FLMTRNSL macro specification for COBOL compiler with separate CICS precompile
You can specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE DSNAME This is a character string that appears in the build messages. It names the Enterprise COBOL compiler. This tells SCLM that this program gets invoked whenever you want to build a member with LANG=COBE. This identifies the load module name for the Enterprise COBOL compiler. Names the partitioned data set that contains the Enterprise COBOL compiler load module. Since ECOBOL.V340.SIGYCOMP is not defined in the LINKLIST concatenation, DSNAME is used here. Version of the compiler used for information purposes. This value is stored in the account record for any generated outputs. The value 4 indicates that SCLM is to consider this build unsuccessful if the compiler completes with a return code greater than 4, meaning only informational and warning diagnostics are acceptable. The value 3 tells SCLM that this program expects an options string and a ddname substitution list to the CICS precompiler. See 2.2.1, Using ddnames and ddname substitution lists on page 41 for more information on ddname substitution lists. This specifies the options string to be passed to the compiler.
VERSION GOODRC
PORDER
OPTIONS
By using PORDER=3, a ddname substitution list is passed to the COBOL compiler. This allows the Enterprise COBOL compiler to receive input from the CICSTRAN DD allocation previously allocated in the CICS precompile step rather than the SYSIN DD as normally expected by the COBOL compiler.
60
As discussed earlier in 2.2.1, Using ddnames and ddname substitution lists on page 41, when you use a ddname substitution list, you must define the ddnames in the order in which they are expected to appear in the ddname substitution list by the translator. The compiler uses temporary ddnames created by SCLM, or the ddname you tell SCLM to use, instead of the standard documented ddnames, such as SYSIN. Let us examine the ddnames used by the Enterprise COBOL compiler in detail:
The following parameters are specified in this macro: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSLIN. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy This identifies the ddname to be allocated. In this case SYSLIN. The value OBJ tells SCLM to save what is written to this ddname and keep it under SCLM control, SCLM must be able to determine the member name and the SCLM-controlled data set name in which it is to save this output module. If SCLM is building an architecture definition, it determines the project, group, type and member as follows: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The group name is the second qualifier. SCLM looks at the architecture definition being built and retrieves the member and type from the architecture statement associated with the keyword OBJ. The type name is the third qualifier. The construction of the PDS name however still follows the defined rules in FLMCNTRL or FLMALTC based on the SCLM identifiers @@FLMPRJ, @@FLMGRP and @@FLMTYP. DFLTTYP The value OBJ tells SCLM to save what is written to this ddname to the SCLM type OBJ and keep it under SCLM control. If SCLM is building a source member, it determines the project, group, type and member as follows: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The SCLM type is the value of the DFLTTYP= keyword. The member name defaults to the name of the member being built. If SCLM is building an architecture definition (and not a source member directly) then the DFLTTYP= value is ignored. Instead, SCLM uses the type associated with the KEYREF= value. RECNUM The value 5000 tells SCLM to allocate enough space in this data set to hold 5000 records. 61
DDNAME KEYREF
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
The following parameters are used with this macro: IOTYPE=I The value I tells SCLM to allocate this ddname to a concatenation of SCLM-controlled data sets. The types used in the concatenation are determined by the FLMINCLS macro referenced by the INCLS= parameter on the FLMALLOC macro. In this case, there is no INCLS= parameter so the default FLMINCLS (or include set) is used. A hierarchy of data sets is concatenated for each type specified for the referenced FLMINCLS macro. The hierarchy begins at the group where the build is taking place and extends to the top of the project's hierarchy. In this case, the concatenation first contains all of the data sets for the INCLUDES type followed by the data sets for the value substituted into the @@FLMTYP variable. See the KEYREF= parameter to determine the value which is substituted into the @@FLMTYP and @@FLMETP variables. KEYREF The value SINC tells SCLM that, if you are building an architecture definition, refer to the first SINC statement in that architecture definition for the type that is substituted into the @@FLMTYP macro. The value for @@FLMETP comes from the EXTEND= parameter of the FLMTYPE macro for that type. If you are not building an architecture definition, the type is the type of the member being built. This identifies the ddname to be allocated. In this case SYSLIB.
DDNAME
62
The following parameters are used in this example: IOTYPE=U The value U tells SCLM to allocate a temporary sequential data set using ddname CICSTRAN. CICSTRAN refers back to the same ddname preallocated by the CICS precompiler for the modified source. The value SINC is ignored for IOTYPE=U This tells SCLM to assign the ddname CICSTRAN to this allocation for the Enterprise COBOL compiler to refer back to it for the modified source.
KEYREF DDNAME
This definition contains the following parameters: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSPRINT. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy The value LIST refers SCLM to the LIST record in the architecture definition being built. That record contains the member name and type into which the listing is saved after a successful build. (SCLM copies the data from the temporary data sets into members of the PDSs controlled by SCLM after a successful build.) The value FBA specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed block with an ASA control character. The value 133 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 25000 tells SCLM to allocate enough space in this data set to hold 25000 records. The value Y specifies that this is a listing that should be copied to the Build List data set after the build process completes. The value LIST specifies the data set type into which this listing is written whenever a module is built directly or when using INCLD in an architecture definition.
KEYREF
RECFM
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
63
The following parameters are used in this example: IOTYPE=A NULLFILE The value A tells SCLM to allocate a ddname to the data set identified by the next FLMCPYLB macro. This allocates the specified DD to a dummy data set.
* 10 * 11
The following parameters are used in this example: IOTYPE=W DDNAME The value W tells SCLM to allocate a temporary sequential data set for translator use. This identifies the ddname to be allocated. In this case SYSUT1 through SYSUT7.
* 13
* 14
The following parameters are used in this example: IOTYPE=A The value A tells SCLM to allocate a ddname to the data set identified by the next FLMCPYLB macro.
64
NULLFILE
In this example, values are specified for 3 parameters. Defaults are used for the other parameters. LANG This specifies the language name a user must enter on the SPROF panel or on the Migrate Utility panel to request that this language definition be used to drive parse and build operations of the Enterprise PL/I modules. Use up to 8 characters to identify the specific language version with a certain release of the current Enterprise PL/I compiler. If you install a new release or version of the Enterprise PL/I compiler, you can set this parameter to a different value so that SCLM can mark all Enterprise PL/I modules needing to be rebuilt. You must then re-assemble and re-link your project definition. A suggested format is Dyymmdd to indicate the date the translator was changed. This is a description of the language, maximum 40 characters.
VERSION
LANGDESC
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
65
Notice the continuation character in column 72, in this case a C. If the parameters for a macro will spread beyond 1 line, then a continuation character must be used.
TYPES=(PLINCL)
In this example, the TYPES parameter of the FLMINCLS macro is used to tell SCLM where to look for includes. Because no name label is specified, this definition applies to the default include set. The FLMINCLS macro specifies the name of the include set that uses this definition. If no name is specified (as in this example), the definition is associated with the default include set. An include set defines a search path for all includes associated with that include set. Multiple include set s can be specified in a language definition if the parser and compiler support distinguishing one kind of include from another. For the parser, this means that the syntax of the language must support determining which include set an include belongs to. For the compiler, this means that a separate ddname must be used for each different include set (kind of include). The following parameter is used: TYPES This specifies the name(s) of the types which are searched to find includes. In this case, SCLM searches the PLINCL type first, and next the default @@FLMTYP type. The @@FLMTYP SCLM variable indicates that SCLM also needs to search the type of the member that is processed by the Enterprise PL/I compiler. For example, if 'SCLM01.DEV2.SOURCE(FLM01MD2)' is being compiled, SCLM looks for includes first in the data sets associated with the PLINCL type, and next the SOURCE type.
66
* FLMTRNSL CALLNAM='SCLM PL/I PARSE', FUNCTN=PARSE, COMPILE=FLMLPGEN, PORDER=1, OPTIONS=(SOURCEDD=SOURCE, STATINFO=@@FLMSTP, LISTINFO=@@FLMLIS, LISTSIZE=@@FLMSIZ, LANG=I)
Figure 2-37 FLMTRNSL macro specification for Enterprise PL/I parser
C C C C C C C C
The following parameters are used in this example: CALLNAM This is a character string that appears in messages during the specified FUNCTN (in this case PARSE). This value will assist in recognizing which translator was executing during the specified FUNCTN. The value PARSE tells SCLM that this program is to be invoked whenever you save a module with LANG=PLIE. Member name of the load module for the Enterprise PL/I parser. Note that the keyword COMPILE actually identifies the load module name of a translator (which may or may not be a compiler). The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. This specifies the options string to be passed to the parser. Strings that start with @@FLM are SCLM variables, and they are replaced by their current values before the string is passed to the parser. The LANG=I options parameter tells the parser that this is a PL/I member. FLMLPGEN is a general purpose parser, and hence, needs to know whether this is a assembler, PL/I, REXX or text member. CALLMETH The CALLMETH parameter is not specified so the default value of ATTACH specifies the invocation method of the module specified in the COMPILE parameter. DSNAME is not used in this example, but it identifies the partitioned data set that contains the Enterprise PL/I parser load module. DSNAME is required only when the data set containing the desired module is not in the systems ISPLLIB, STEPLIB or LINKLIST concatenations. FLMLPGEN is in ISP.SISPLPA which is defined in the LINKLIST concatenation, so DSNAME is not required in this case. When more than one data set is to be searched, you can use the TASKLIB parameter in conjunction with, or as a replacement for, the DSNAME parameter.
FUNCTN COMPILE
PORDER OPTIONS
DSNAME
Since the parser reads its source from a ddname, you must tell SCLM how to allocate that ddname. To do this, we use an FLMALLOC macro and an FLMCPYLB macro as shown in Figure 2-38. * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR)
*
Figure 2-38 FLMALLOC and FLMCPYLB macro specifications for parser Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
67
The following parameters are used in this example: IOTYPE=A The value A tells SCLM to allocate a ddname to one or more specific data set(s). Each of those data sets are subsequently identified by using an FLMCPYLB macro. This identifies the ddname to be allocated. This identifies the member to be parsed. When the two SCLM variables are resolved, the parser is passed the data set and member that is being saved.
DDNAME @@FLMDSN(@@FLMMBR)
Now you can tell SCLM how to invoke the Enterprise PL/I compiler. To do so, use an FLMTRNSL macro, as shown in Figure 2-39, followed by one or more FLMALLOC and FLMCPYLB macros. The Enterprise PL/I compiler is IBMZPLI, and on the system we used it resides in the Enterprise PL/I load library EPLI.V350.SIBMZCMP. * FLMTRNSL CALLNAM='ENTERPRISE PL/I COMPILER', FUNCTN=BUILD, COMPILE=IBMZPLI, DSNAME=EPLI.V350.SIBMZCMP, VERSION=3.5.0, GOODRC=0, PORDER=1, OPTIONS=(MACRO,OBJECT,SOURCE,XREF) *
Figure 2-39 FLMTRNSL macro specification for Enterprise PL/I
C C C C C C C
You can specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE DSNAME This is a character string that appears in the build messages. It names the Enterprise PL/I compiler. This tells SCLM that this program gets invoked whenever you want to build a member with LANG=PLIE. This identifies the load module name for the Enterprise PL/I compiler. Names the partitioned data set that contains the Enterprise PL/I compiler load module. Since EPLI.V350.SIBMZCMP is not defined in the LINKLIST concatenation, DSNAME is used here. There are two ways you can control where the compiler is loaded from:
Do specify the DSNAME so that you as the administrator are assured where the compiler is loaded from. The disadvantage is that, if you specify the version in the name, you will have to modify your translators when you install a new release of the compiler. The advantage is you are assured of where the compiler is loaded from. Do not specify DSNAME and load the compiler up from the system
concatenation for ISPLLIB, STEPLIB and LINKLIST. The advantage that is you will not have to modify your translators. The disadvantage is you may load a version of the compiler you are not expecting. VERSION This is the version of the compiler used for information purposes. This value is stored in the account record for any generated outputs.
68
GOODRC
The value 0 indicates that SCLM is to consider this build unsuccessful if the compiler completes with a return code greater than 0, meaning only informational are acceptable. The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. This specifies the options string to be passed to the compiler.
PORDER OPTIONS
Let us now examine the ddnames used by the Enterprise PL/I compiler in detail as specified in the sample as provided. As we have used PORDER=1 we have allocated the minimum ddnames that are required.
The following parameters are specified in this macro: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSLIN. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy This identifies the ddname to be allocated. In this case SYSLIN. The value OBJ tells SCLM to save what is written to this ddname and keep it under SCLM control, SCLM must be able to determine the member name and the SCLM-controlled data set name in which it is to save this output module. If SCLM is building an architecture definition, it determines the project, group, type and member as follows: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The group name is the second qualifier. SCLM looks at the architecture definition being built and retrieves the member and type from the architecture statement associated with the keyword OBJ. The type name is the third qualifier. The construction of the PDS name however still follows the defined rules in FLMCNTRL or FLMALTC based on the SCLM identifier @@FLMPRJ, @@FLMGRP and @@FLMTYP. DFLTTYP The value OBJ tells SCLM to save what is written to this ddname to the SCLM type OBJ and keep it under SCLM control. If SCLM is building a source member, it determines the project, group, type and member as follows: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The SCLM type is the value of the DFLTTYP= keyword. The member name defaults to the name of the member being built.
DDNAME KEYREF
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
69
If SCLM is building an architecture definition (and not a source member directly) then the DFLTTYP= value is ignored. Instead, SCLM uses the type associated with the KEYREF= value. RECNUM The value 5000 tells SCLM to allocate enough space in this data set to hold 5000 records.
The following parameters are used in this example: IOTYPE=I The value I tells SCLM to allocate this ddname to a concatenation of SCLM-controlled data sets. The types used in the concatenation are determined by the FLMINCLS macro referenced by the INCLS= parameter on the FLMALLOC macro. In this case, there is no INCLS= parameter so the default FLMINCLS (or include set) is used. A hierarchy of data sets is concatenated for each type specified for the referenced FLMINCLS macro. The hierarchy begins at the group where the build is taking place and extends to the top of the project's hierarchy. In this case, the concatenation first contains all of the data sets for the INCLUDES type followed by the data sets for the value substituted into the @@FLMTYP variable. See the KEYREF= parameter to determine the value which is substituted into the @@FLMTYP and @@FLMETP variables. DDNAME KEYREF This identifies the ddname to be allocated. In this case SYSLIB. The value SINC tells SCLM that, if you are building an architecture definition, refer to the first SINC statement in that architecture definition for the type that is substituted into the @@FLMTYP macro. The value for @@FLMETP comes from the EXTEND= parameter of the FLMTYPE macro for that type. If you are not building an architecture definition, the type is the type of the member being built.
If you have any %INCLUDE ddname(member) statements in your Enterprise PL/I code, you need an FLMALLOC macro for each unique ddname in your language definition. You also need multiple PL/I include types, one for each ddname, if you want to keep the includes separate in SCLM. You can also specify multiple FLMINCLS macros to define a search order for each of the different include sets. An example of this can be seen in , Step 2: Define include sets to identify the location of included members on page 44. in the Enterprise COBOL example. A common use of this would be for normal includes used in conjunction with DB2 DCLGENs that share the same name.
70
The following parameters are used in this example: IOTYPE=W DDNAME The value W tells SCLM to allocate a temporary sequential data set for translator use. This identifies the ddname to be allocated. In this case SYSUT1.
The following parameters are used in this example: IOTYPE=S The value S tells SCLM to allocate a temporary sequential data set and create the input stream for the translator by concatenating the contents of all the members that are SINCed as well as any text specified via CMD cards. This identifies the ddname to be allocated. In this case SYSIN. The value SINC tells SCLM that, if you are building a source module directly, SCLM copies that member to this temporary data set. If you are building a CC architecture definition, SCLM copies the members listed on the SINC statement to this data set.
DDNAME KEYREF
The following parameters are used in this example: IOTYPE=A DDNAME NULLFILE The value A tells SCLM to allocate a ddname to the data set identified by the next FLMCPYLB macro. This identifies the ddname to be allocated. In this case SYSPUNCH. This allocates the specified DD to a dummy data set.
71
C C C
This definition contains the following parameters: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSPRINT. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy This identifies the ddname to be allocated. In this case SYSPRINT. The value LIST refers SCLM to the LIST record in the architecture definition being built. That record contains the member name and type into which the listing is saved after a successful build. (SCLM copies the data from the temporary data sets into members of the PDSs controlled by SCLM after a successful build.) The value LIST specifies the data set type into which this listing is written whenever a module is built directly or when using INCLD in an architecture definition. The value VBA specifies the record format of the temporary data set that SCLM creates. In this example, the record format is variable blocked with an ASA control character. The value 137 specifies the record length, in characters, of the temporary data set that SCLM creates. The value Y specifies that this is a listing that should be copied to the Build List data set after the build process completes. The value 5000 tells SCLM to allocate enough space in this data set to hold 5000 records.
DDNAME KEYREF
DFLTTYP
RECFM
72
The FLMSYSLB macro for the system CICS libraries is shown in Figure 2-46. * HLAS
FLMSYSLB SYS1.MACLIB
The format of the macro is: language FLMSYSLB data set The language is an 8-character language name that must be the same name as the language specified in the LANG field on the FLMLANGL macro. To specify multiple data sets for a language, omit the language on all but the first data set. The data set parameter lists each static copy data set under the FLMSYSLB macro for this language definition.
In this example, values are specified for four parameters. Defaults are used for the other parameters: LANG This specifies the language name a user must enter on the SPROF panel or on the Migrate Utility panel to request that this language definition be used to drive parse and build operations of the High Level Assembler modules. Use up to 8 characters to identify the specific language version with a certain release of the current High Level Assembler. If you install a new release or version of the High Level Assembler, you can set this parameter to a different value so that SCLM can mark all High Level Assembler modules needing to be rebuilt. You must then re-assemble and re-link your project definition. A suggested format is Dyymmdd to indicate the date the translator was changed. A value of Y verifies that system data sets are being allocated for build translators, and automatically adds these data sets to the concatenation of IOTYPE=I and KEYREF=SINC allocations. This is a description of the language, maximum 40 characters.
VERSION
ALCSYSLB
LANGDESC
Notice the continuation character in column 72, in this case a C. If the parameters for a macro will spread beyond 1 line, then a continuation character must be used.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
73
* FLMINCLS *
Figure 2-48 FLMINCLS macro specification for High Level Assembler
TYPES=(MACROS)
In this example, the TYPES parameter of the FLMINCLS macro is used to tell SCLM where to look for included macros. Because no name label is specified, this definition applies to the default include set. The FLMINCLS macro specifies the name of the include set that uses this definition. If no name is specified (as in this example), the definition is associated with the default include set. An include set defines a search path for all includes associated with that include set. Multiple include set s can be specified in a language definition if the parser and compiler support distinguishing one kind of include from another. For the parser, this means that the syntax of the language must support determining which include set an include belongs to. For the compiler, this means that a separate ddname must be used for each different include set (kind of include). The following parameter is used: TYPES This specifies the name(s) of the types which are searched to find includes. In this case, SCLM searches the MACROS type first, and next the default @@FLMTYP type. The @@FLMTYP SCLM variable indicates that SCLM also needs to search the type of the member that is processed by the High Level Assembler. For example, if 'SCLM01.DEV2.SOURCE(FLM01MD1)' is being compiled, SCLM looks for macros first in the data sets associated with the MACROS type, and next the SOURCE type.
C C C C C C C C
74
The following parameters are used in this example: CALLNAM This is a character string that appears in messages during the specified FUNCTN (in this case PARSE). This value will assist in recognizing which translator was executing during the specified FUNCTN. The value PARSE tells SCLM that this program is to be invoked whenever you save a module with LANG=PLIE. Member name of the load module for the High Level Assembler parser. Note that the keyword COMPILE actually identifies the load module name of a translator (which may or may not be a compiler). The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. This specifies the options string to be passed to the parser. Strings that start with @@FLM are SCLM variables, and they are replaced by their current values before the string is passed to the parser. The LANG=A options parameter tells the parser that this is a PL/I member. FLMLPGEN is a general purpose parser, and hence, needs to know whether this is an assembler, PL/I, REXX or text member. CALLMETH The CALLMETH parameter is not specified so the default value of ATTACH specifies the invocation method of the module specified in the COMPILE parameter. DSNAME is not used in this example, but should be mentioned. DSNAME identifies the partitioned data set that contains the High Level Assembler parser load module. DSNAME is required only when the data set containing the desired module is not in the systems ISPLLIB, STEPLIB or LINKLIST concatenations. FLMLPGEN is in ISP.SISPLPA which is defined in the LINKLIST concatenation, so DSNAME is not required in this case. When more than one data set is to be searched, you can use the TASKLIB parameter in conjunction with, or as a replacement for, the DSNAME parameter.
FUNCTN COMPILE
PORDER OPTIONS
DSNAME
Since the parser reads its source from a ddname, you must tell SCLM how to allocate that ddname; we use an FLMALLOC macro and an FLMCPYLB macro as shown in Figure 2-50. * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR)
*
Figure 2-50 FLMALLOC and FLMCPYLB macro specifications for parser
A description of the parameters follows: IOTYPE=A The value A tells SCLM to allocate a ddname to one or more specific data set(s). Each of those data sets are subsequently identified by using an FLMCPYLB macro. This identifies the ddname to be allocated. This identifies the member to be parsed. When the two SCLM variables are resolved, the parser is passed the data set and member that is being saved.
DDNAME @@FLMDSN(@@FLMMBR)
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
75
Now you can tell SCLM how to invoke the High Level Assembler. To do so, use an FLMTRNSL macro, as shown in Figure 2-51, followed by one or more FLMALLOC and FLMCPYLB macros. The High Level Assembler is ASMA90, and on the system we used it resides in the assembler load library ASM.SASMMOD1. * FLMTRNSL CALLNAM='HL ASM', FUNCTN=BUILD, COMPILE=ASMA90, VERSION=1.5, GOODRC=0, PORDER=1, OPTIONS=(XREF(SHORT),LINECOUNT(75),OBJECT,RENT)
Figure 2-51 FLMTRNSL macro specification for High Level Assembler
C C C C C C
You can specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE VERSION GOODRC This is a character string that appears in the build messages. It names the High Level Assembler. This tells SCLM that this program gets invoked whenever you want to build a member with LANG=HLAS. This identifies the load module name for the High Level Assembler. Version of the compiler used for information purposes. This value is stored in the account record for any generated outputs. The value 0 indicates that SCLM is to consider this build unsuccessful if the compiler completes with a return code greater than 0, meaning only informational are acceptable. The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. This specifies the options string to be passed to the compiler. Like the parser translator the DSNAME is not used in this example, so the High Level Assembler load module, ASMA90, will be located in the systems ISPLLIB, STEPLIB or LINKLIST concatenations. ASMA90 is in ASM.SASMMOD1 which is defined in the LINKLIST concatenation, so DSNAME is not required in this case. When more than one data set is to be searched, you can use the TASKLIB parameter in conjunction with, or as a replacement for, the DSNAME parameter.
Let us now examine the ddnames used by the High Level Assembler in detail as specified in the sample as provided. As we have used PORDER=1 we have allocated the minimum ddnames that are required.
76
The following parameters are used in this example: IOTYPE=S The value S tells SCLM to allocate a temporary sequential data set and create the input stream for the translator by concatenating the contents of all the members that are SINCed as well as any text specified via CMD cards. This identifies the ddname to be allocated. In this case SYSIN. The value SINC tells SCLM that, if you are building a source module directly, SCLM copies that member to this temporary data set. If you are building a CC architecture definition, SCLM copies the members listed on the SINC statement to this data set.
DDNAME KEYREF
The following parameters are used in this example: IOTYPE=W DDNAME RECNUM The value W tells SCLM to allocate a temporary sequential data set for translator use. This identifies the ddname to be allocated. In this case SYSUT1. The value 15000 tells SCLM to allocate enough space in this data set to hold 15000 records.
The following parameters are specified in this macro: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSLIN. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy This identifies the ddname to be allocated. In this case SYSLIN. The value OBJ tells SCLM to save what is written to this ddname and keep it under SCLM control, SCLM must be able to determine the member name and the SCLM-controlled data set name in which it is to save this output module. If SCLM is building an architecture definition, it determines the project, group, type and member as follows: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The group name is the second qualifier.
DDNAME KEYREF
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
77
SCLM looks at the architecture definition being built and retrieves the member and type from the architecture statement associated with the keyword OBJ. The type name is the third qualifier. The construction of the PDS name however still follows the defined rules in FLMCNTRL or FLMALTC based on the SCLM identifiers @@FLMPRJ, @@FLMGRP and @@FLMTYP. DFLTTYP The value OBJ tells SCLM to save what is written to this ddname to the SCLM type OBJ and keep it under SCLM control. If SCLM is building a source member, it determines the project, group, type and member: The high-level qualifier is the project identifier that was previously specified. The group is the level at which the build is taking place. The SCLM type is the value of the DFLTTYP= keyword. The member name defaults to the name of the member being built. If SCLM is building an architecture definition (and not a source member directly) then the DFLTTYP= value is ignored. Instead, SCLM uses the type associated with the KEYREF= value. RECNUM The value 9000 tells SCLM to allocate enough space in this data set to hold 9000 records.
The following parameters are used in this example: IOTYPE=A DDNAME NULLFILE The value A tells SCLM to allocate a ddname to the data set identified by the next FLMCPYLB macro. This identifies the ddname to be allocated. In this case SYSTERM and SYSPUNCH. This allocates the specified DD to a dummy data set.
* FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC
Figure 2-56 FLMALLOC macro specification for SYSLIB DD
The following parameters are used in this example: IOTYPE=I The value I tells SCLM to allocate this ddname to a concatenation of SCLM-controlled data sets. The types used in the concatenation are determined by the FLMINCLS macro referenced by the INCLS= parameter on the FLMALLOC macro. In this case, there is no INCLS= parameter so the default FLMINCLS (or include set) is used. A hierarchy of data sets is concatenated for each type specified for the referenced FLMINCLS macro. The hierarchy begins at the group where the build is taking place and extends to the top of the project's hierarchy. In this case, the concatenation first contains all of the data sets for the INCLUDES type followed by the data sets for the value substituted into the @@FLMTYP variable. See the KEYREF= parameter to determine the value which is substituted into the @@FLMTYP and @@FLMETP variables. DDNAME KEYREF This identifies the ddname to be allocated. In this case SYSLIB. The value SINC tells SCLM that, if you are building an architecture definition, refer to the first SINC statement in that architecture definition for the type that is substituted into the @@FLMTYP macro. The value for @@FLMETP comes from the EXTEND= parameter of the FLMTYPE macro for that type. If you are not building an architecture definition, the type is the type of the member being built.
C C
This definition contains the following parameters: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSPRINT. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy This identifies the ddname to be allocated. In this case SYSPRINT. The value LIST refers SCLM to the LIST record in the architecture definition being built. That record contains the member name and type into which the listing is saved after a successful build. (SCLM copies the data from the temporary data sets into members of the PDSs controlled by SCLM after a successful build.) The value Y specifies that this is a listing that should be copied to the Build List data set after the build process completes.
DDNAME KEYREF
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
79
RECFM
The value FBA specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed blocked with an ASA control character. The value 121 specifies the record length, in characters, of the temporary data set that SCLM creates. The value LIST specifies the data set type into which this listing is written whenever a module is built directly or when using INCLD in an architecture definition. The value 20000 tells SCLM to allocate enough space in this data set to hold 20000 records.
LRECL DFLTTYP
RECNUM
In this example, values are specified for four parameters. Defaults are used for the other parameters.: LANG The name of the language translator SCLM will use when it encounters a linkedit control (LEC) ARCHDEF. The default language in SCLM will use is LE370 unless there is a LKED keyword in the LEC ARCHDEF. If there is a LKED keyword specifying an alternative language translator then there must be a language translator defined with a LANG parameter that matched the language specified by the LKED keyword. The value N indicates that the linkage editor language cannot be assigned to editable members. (The default is Y.) Use up to 8 characters to identify the specific language version with a certain release of the current binder/linkage editor. If you install a new release or version of the binder/linkage editor, you can set this parameter to a different value so that SCLM can mark all LEC ARCHDEFS as needing to be rebuilt. You must then re-assemble and re-link your project definition. A suggested format is Dyymmdd to indicate the date the translator was changed. This is a description of the language, maximum 40 characters.
CANEDIT VERSION
LANGDESC
80
Notice the continuation character in column 72, in this case a C. If the parameters for a macro will spread beyond 1 line, then a continuation character must be used.
Step 2: Specify the program (linkage editor) that processes the modules
Next, tell SCLM how to invoke the z/OS Binder (linkage editor). To do so, use an FLMTRNSL macro, as shown in Figure 2-59, followed by FLMALLOC and FLMCPYLB macros. The z/OS binder is IEWL, and it resides in the system load library SYS1.LINKLIB. * FLMTRNSL CALLNAM='LKED/370', FUNCTN=BUILD, COMPILE=IEWL, VERSION=F64, GOODRC=0, PORDER=3, OPTIONS=(DCBS,MAP)
Figure 2-59 FLMTRNSL macro specification for High Level Assembler
C C C C C C
You can specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE VERSION GOODRC This is a character string that appears in the build messages. It names the z/OS Binder. This tells SCLM that this program gets invoked whenever you want to build an LEC ARCHDEF that invokes the standard linkage editor (LANG=LE370). This identifies the load module name for the z/OS Binder. Version of the compiler used for information purposes. This value is stored in the account record for any generated outputs. The value 0 indicates that SCLM is to consider this build unsuccessful if the compiler completes with a return code greater than 0, meaning only informational are acceptable. The value 3 tells SCLM that this program expects an options string and a ddname substitution list to the z/OS Binder. See 2.2.1, Using ddnames and ddname substitution lists on page 41 for more information on ddname substitution lists. This specifies the options string to be passed to the z/OS Binder. The DSNAME is not used in this example, so the z/OS Binder module, IEWL, will be located in the systems ISPLLIB, STEPLIB or LINKLIST concatenations. IEWL is in SYS1.LINKLIB which is defined in the LINKLIST concatenation, so DSNAME is not required in this case.
PORDER
OPTIONS DSNAME
Let us now examine the ddnames used by the z/OS Binder in detail as specified in the sample as provided. As we have used PORDER=3 we have to allocate all of the ddnames expected by the z/OS binder. As discussed earlier in 2.2.1, Using ddnames and ddname substitution lists on page 41, when you use a ddname substitution list, you must define the ddnames in the order in which they are expected to appear in the ddname substitution list by the translator. The compiler uses temporary ddnames created by SCLM, instead of the standard documented ddnames, such as SYSIN. However in the sample translator as supplied, many of the actual ddnames are specified, so will be allocated with those ddnames.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
81
The following parameters are specified in this macro: IOTYPE=S The value S tells SCLM to allocate a temporary sequential data set and create the input stream for the translator by concatenating the contents of all the members that are SINCed as well as any text specified via CMD cards. This will include all OBJ input to the z/OS Binder. INCL generates a linkage editor include statement for each OBJ member or load module referenced in the link-edit control (LEC) architecture definition. The value FB specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed blocked. The value 80 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 20000 tells SCLM to allocate enough space in this data set to hold 20000 records. This identifies the ddname to be allocated. In this case SYSLIN. The DDNAME parameter could be omitted as we are using PORDER=3 and we could default the ddname to an SCLM generated ddname.
The following parameters are used in this example: IOTYPE This passes a member name in the ddname substitution list. The KEYREF parameter identifies the member name and type. This IOTYPE is commonly used to identify the load module name for the S/370 linkage editor. IOTYPE=L is only valid when the PORDER parameter in the FLMTRNSL macro is set to 2 or 3. KEYREF When you build an LEC architecture definition, the FLMALLOC macro with IOTYPE=L passes the member name referenced on the LOAD statement to the Linkage Editor when KEYREF of LOAD is specified.
82
The following parameters are used in this example: IOTYPE The value of P allocates a temporary partitioned data set to contain output from the translator. After the language definition completes successfully the temporary partitioned data set member is copied as a member in the SCLM hierarchy. The value of LOAD identifies the target member into which the translator output will be copied. The value of U specifies the record format of the temporary load library data set that SCLM creates. In this example, the record format is undefined. The value of 0 specifies the record length, in characters, of the temporary data set that SCLM creates. The value of 500 tells SCLM to allocate enough space in this data set to hold 500 records. The value of 20 tells SCLM to allocate 20 directory blocks for the temporary load library. This identifies the ddname to be allocated. In this case SYSLMOD. The DDNAME parameter could be omitted as we are using PORDER=3 and we could let SCLM default the ddname to an SCLM generated ddname.
*
Figure 2-63 FLMALLOC macro specification for SYSLIB DD
A description of the parameters follows: IOTYPE The value of A tells SCLM to allocate a ddname to one or more specific data set(s). Each of those data sets are subsequently identified by using an FLMCPYLB macro.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
83
DDNAME
This identifies the ddname to be allocated. In this case SYSLIB. The DDNAME parameter could be omitted as we are using PORDER=3 and we could default the ddname to an SCLM generated ddname.
Customize FLMCPYLB macros for the external data sets used at your location. Also, if you are linking in any third party load modules, include FLMCPYLB macros for the data sets where these load libraries are stored.
This definition contains the following parameters: IOTYPE=O The value O tells SCLM to allocate a temporary sequential data set to ddname SYSPRINT. After the language definition completes successfully the temporary sequential data set is copied as a member in the SCLM hierarchy The value LMAP Refers SCLM to the LMAP record in the architecture definition being built. That record contains the member name and type into which the listing is saved after a successful build. (SCLM copies the data from the temporary data sets into members of the PDSs controlled by SCLM after a successful build.) The value FBA specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed blocked with an ASA control character. The value 121 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 2500 tells SCLM to allocate enough space in this data set to hold 2500 records. The value Y specifies that this is a listing that should be copied to the Build List data set after the build process completes. This identifies the ddname to be allocated. In this case SYSPRINT.
KEYREF
RECFM
84
(* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N
* * 10 * * 11
The following parameters are used in this example: IOTYPE=A DDNAME NULLFILE The value A tells SCLM to allocate a ddname to the data set identified by the next FLMCPYLB macro. This identifies the ddname to be allocated. In this case SYSTERM. This allocates the specified DD to a dummy data set.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
85
2.2.8 Summary
Do the following steps to customize an existing SCLM language definition, or to write a new SCLM language definition: 1. Define the language name to the SCLM project definition. 2. Define include-sets for the language to identify the locations of included members. For external libraries use the FLMSYSLB macro before the FLMLANGL macro. 3. List the various programs (parsers, compilers, and so on) used to parse, build your source or issue an action during promote. Use the correct FUNCTN option on the FLMTRNSL macro. 4. For each program (or translator), look up the ddname substitution list (usually in the Programmer's Guide for the compiler), or list the ddnames used by the program. 5. Write an FLMTRNSL macro for each program or translator. 6. Write an FLMALLOC macro for each ddname to be allocated to the translator. 7. Use the information in the translator program documentation to determine which IOTYPE value to specify as well as which other FLMALLOC keywords are appropriate.
VERIFY
86
For promotes, SCLM invokes a verify translator to verify build inputs and outputs. For example, when an LEC architecture definition is being promoted, the source, object, and load members are verified before the promote copy phase. BUILD A build translator can assemble, compile, link, or otherwise process a member so that the outputs have different formats than the inputs. For example, building a COBOL source program generates a listing and an object module. A copy translator is invoked when Promote copies an SCLM-controlled member to the next group in the hierarchy. Copy translators are invoked before Promote copies the SCLM-controlled member. If the copy translators for a member fail, Promote does not attempt to copy the controlled member. Copy translators can be used to copy data that is related to an SCLM-controlled member but is not under SCLM control itself. Purge translators can be used to purge data that is related to an SCLM-controlled member but is not under SCLM control itself. Purge translators are invoked whenever SCLM performs a delete operation on an SCLM-controlled member during build or promote.
COPY
PURGE
As described in 2.2, Language definitions based upon samples , you invoke SCLM translators through the FLMTRNSL language definition macro. You provide the required information about invocation of the translator to SCLM through various parameters, such as its function, location, calling method, and so on.
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
87
Chapter 2. Defining languages translators for traditional compliers: Assembler, COBOL, and PL/I
89
90
Chapter 3.
91
3.1 Overview
SCLM supports DB2 processing through Bind control objects that are referred to as DB2CLIST objects. This terminology is historical, as when DB2 support was added to SCLM, CLIST was the interpretive language of choice. These days most sites use REXX. For this chapter we continue to use the term DB2 CLIST for consistency between this Redbooks publication and the SCLM Guide and Reference, even though we will use REXX in our examples. A DB2 CLIST specifies DBRM(s) to be bound into application plans or collections. SCLM maintains accounting information for the DB2 CLIST for DBRM dependencies captured through an include statement for each DBRM in the DBRM comment block. During Build, the DB2 CLIST member Binds DBRM(s) in the current SCLM group. A non-editable copy of the DB2 CLIST is placed in the type to be used during Promote. During the Promote Copy phase, the non-editable copy of the DB2 CLIST binds in the to group. During the Promote Purge phase, it frees in the from group.
92
3. The BUILD process executes the DB2CLIST member to perform the appropriate BIND or FREE DB2 operation. The process creates an identical copy of the DB2CLIST, referred to as a DB2OUT member, and places it in the type that is used during the PROMOTE process. The DB2OUT is an SCLM output generated by the DB2 bind/free translator and, therefore, is non-editable. 4. The only difference between the original DB2CLIST and the new DB2OUT is the language value. The language for the original DB2CLIST is associated with a language definition that contains the parse and build translators. The SCLM sample for this language definition, ISP.SISPMACS(FLM@BD2), names it DB2CLIST. The language for the new DB2OUT is associated with a language definition that contains the copy and purge translators. The SCLM sample for this language definition, ISP.SISPMACS(FLM@BDO), names it DB2OUT. 5. On promote, SCLM does not execute the DB2CLIST but only promotes it. However, on promote, SCLM executes the COPY and PURGE phases of the translators and as such will run the contents of the DB2OUT member. This is why the DB2 translator creates a DB2OUT. Promote processes the DB2OUT in exactly the same way that BUILD processes the DB2CLIST. On the COPY phase the DB2OUT will be executed with the BIND option and on the PURGE phase the DB2OUT will be executed with the FREE option if you wish to free the plan or package at the from-group level. In your high-level architecture definitions, always refer to the DB2CLIST used during the Build stage. Do not refer to the DB2OUT used during the Promote stage.
93
PLNBIND PLNOUT
This type contains editable REXX/CLIST source members for plan binds. They are used during SCLM Build to control DB2 bind and free functions. This type contains non-editable build output that is used during SCLM Promote to control BIND and FREE functions for plans. During a build of a PLNBIND, a copy of the PLNBIND is copied to the type PLNOUT into the group that is being built. During a promote, this member is called to bind the plan in the TO group and free the plan in the FROM group. Since the PLNOUT is the output from the PLNBIND, SCLM will move both objects together during a Promote. This type contains editable REXX/CLIST source members for package binds. They are used during SCLM Build to control DB2 bind and free functions. This type contains non-editable build output that is used during SCLM Promote to control BIND and FREE functions for packages. During a build of a PKGBIND, a copy of the PKGBIND is copied to the type PKGOUT into the group that is being built. During a promote, this member is called to bind the package in the TO group and free the package in the FROM group. Since the PKGOUT is the output from the DB2CLIST, SCLM will move both objects together during a Promote. This type contains link-edit control (LEC) architecture definitions for source modules. This type contains generic architecture definitions to bind DBRMs. This type contains DCLGEN members of DB2 tables and views.
PKGBIND PKGOUT
Specify the additional types with the FLMTYPE macro in the SCLM01 project definition. Note: While defining new DB2 types, you must preserve the EBCDIC collating sequence. SCLM promotes in EBCDIC collating sequence order. For example, types DBRM, DB2OUT, PLNOUT, PKGOUT are OK, but DBRM with CDB2OUT (for CICS programs) is not. If you use type CDB2OUT, during the promote, SCLM would initiate the bind for the CDB2OUT member before promoting the DBRM. To have DB2CLIST (PKGBIND/PLNBIND) members and DBRM members with the same name, an FLMINCLS macro needs to be specified in the language definition for the DB2CLIST members. The FLMINCLS macro must list the DBRM type first on the TYPES parameter. Example 3-1 is an example of an FLMINCLS macro to do this.
Example 3-1 FLMINCLS for DB2CLIST language
* SPECIFY TYPES TO SEARCH FOR DBRMS THAT ARE TRACKED AS * INCLUDES TO THE DB2 CLIST MEMBERS * FLMINCLS TYPES=(DBRM)
94
Table 3-1 Recommended data set attributes for SCLM types for DB2 support Type DBRM PLNBIND PLNOUT PKGBIND PKGOUT ARCHLEC ARCHBIND DCLGEN DSORG PO PO PO PO PO PO PO PO RECFM FB FB FB FB FB FB FB FB LRECL 80 80 80 80 80 80 80 80 BLKSIZE 0 0 0 0 0 0 0 0
Copy either one of the following members listed in Appendix C, Chapter 3 listings on page 725 into SCLM01.PROJDEFS.SOURCE: COBCICD2 3-Step COBCICD2 1-Step SCLM language definition for Enterprise COBOL with DB2 and CICS (Three-Step Version) SCLM language definition for Enterprise COBOL with DB2 and CICS (One-Step Version)
Change SCLM01.PROJDEFS.SOURCE members FLM@BDO, FLM@BD2, FLM@2ASM, FLM@2CBE, FLM@2PLE and COBCICD2, so that macro libraries, assembler/ precompiler/ compiler libraries, and assembler/ precompiler / compiler options match the libraries and products in use at your location. The changes are specified in the initial comments of each macro member.
95
FLMLANGL . .
LANG=PLNBIND
FLMLANGL . .
LANG=PKGBIND
b. Change the LANG values on the PLNOUT and PKGOUT translators, so that LANG=PLNOUT and LANG=PKGOUT. See Example 3-4 and Example 3-5.
Example 3-4 FLMLANGL statement in PLNOUT
* FLMLANGL LANG=PLNOUT
* FLMLANGL LANG=PKGOUT
c. Modify the DBRMTYPE values in the OPTIONS parameter on the FLMTRNSL macros in all four DB2 translators to reflect your DBRM type. This tells SCLM which DBRM libraries to allocate during the bind step to the DBRMLIB DD. See Example 3-6.
Example 3-6 Defining DBRMTYPE in DB2 translators
* * BUILD TRANSLATOR(S) * FLMTRNSL CALLNAM='DB2 BIND', FUNCTN=BUILD, COMPILE=FLMCSPDB, PORDER=1, GOODRC=4, CALLMETH=LINK, OPTIONS=(FUNCTN=BUILD, OPTION=BIND, SCLMINFO=@@FLMINF, PROJECT=@@FLMPRJ, ALTPROJ=@@FLMALT, DBRMTYPE=DBRM, GROUP=@@FLMGRP, MEMBER=@@FLMMBR)
96
* INCLD SCLMDB2P SOURCE CMD INCLUDE SYSLIB(DSNELI) * PARM RMODE(24),AMODE(31) * LOAD LMAP SCLMDB2P LOAD SCLMDB2P LMAP
* INCLD RDBKC01 SOURCE CMD INCLUDE SYSLIB(DSNCLI) CMD INCLUDE SYSLIB(DFHEI1) * LOAD LMAP RDBKC01 CICSLOAD RDBKC01 LMAP
ARCHLEC PKGBIND
The INCLD keyword copies the xxxBIND contents to the xxxOUT member. This is so that the xxxOUT member can be used in the bind process for levels in the hierarchy higher than the development group. We recommend that you create such an HL architecture definition, because you need to maintain only one HL and one LEC architecture definition per source component.
Chapter 3. Writing DB2 translators and bind processing
97
SINC OUT3
RDBKC01 RDBKC01
PKGBIND PKGOUT
Next, create an HL architecture definition to control both the compilation/link-edit and the bind, so that SCLM knows the correct processing scope. This HL architecture definition should just include the two previously defined LEC and generic architecture definitions for the source module. See Example 3-11.
Example 3-11 Sample HL architecture definition for Compilation, Link-Edit and Bind
INCL INCL
RDBKC01 RDBKC01
ARCHLEC ARCHBIND
You can look at the names of included DBRMs for a DB2CLIST by browsing its accounting information: 1. Select the Utilities option from the SCLM Main Menu. (Option 3) 2. Select the Library option from the SCLM Utilities Menu. (Option 1) 3. From the SCLM Library Utility - Entry Panel, enter the DB2 type to be used during Build, in our examples this is PKGBIND.
98
4. From the list of members, select the PKGBIND member that you want to examine and browse its accounting information. 5. From the Accounting Record for the PKGBIND, select the Number of Includes. 6. Finally, you see the list of included DBRMs in the PKGBIND. Use an architecture definition to build or to promote the DB2CLIST member. Use the SINC or INCLD keyword to reference the member from an architecture definition as shown previously. You can also build or promote The DB2CLIST member directly without using an architecture member. When the DB2CLIST member is built or promoted directly or is processed through an INCLD architecture definition keyword, SCLM uses the defaults defined in the DB2CLIST language definition. See Example 3-12.
Example 3-12 PKGBIND Example Calls Common Bind EXEC
/* REXX */ Arg INPARMS Parse var INPARMS '(' OPTION ' ' '(' GROUP ' ' /*********************************************************************/ /* SPECIFY AN INCLUDE FOR THE DBRM TO BE INCLUDED IN THE DB2 */ /* PACKAGE. SCLM TRACKS DEPENDENCY ON DBRMS WITH THE COMMENTED */ /* OUT INCLUDE STATEMENT. */ /*********************************************************************/ /*** THE INCLUDE STATEMENT MUST REMAIN COMMENTED OUT. ***/ /*********************************************************************/ /* */ /* %INCLUDE RDBKC01 */ /* */ /*********************************************************************/ /* SET UP THE PARMS FOR A PACKAGE BIND. */ /*********************************************************************/ If OPTION = "BIND" Then OPTION = "PACKBIND" If OPTION = "FREE" Then OPTION = "PACKFREE" MEMBER = "RDBKC01" EXPLAIN = "NO" /*----------------------------------------*/ /* CALL REXXBIND EXEC TO PERFORM BIND */ /*----------------------------------------*/ PARMS = OPTION GROUP MEMBER EXPLAIN Address TSO "EX 'SCLM01.PROJDEFS.REXX(REXXBIND)' '"PARMS"'" EXITCC = RC EXIT EXITCC In Example 3-12 we can see the following key points: The PKGBIND translator will pass in an Option and a Group. The OPTION will be BIND if the translator is executed at Build time or at promote time during the COPY phase. The OPTION will be FREE if the translator is in the PURGE phase of the promote. The DBRM name is specified in the commented out %INCLUDE. This will maintain SCLM dependency between the DBRM member and the PKGBIND that needs to be run to bind the DBRM. Certain parameters are set up for binding such as EXPLAIN. Other parameters could also be set up, such as ISOLATION and VALIDATE for example. If there are bind options that are specific to a particular member, then they can be set here.
99
The bind processor is called to do the actual bind and set up other parameters based on the Group where the bind needs to occur. The actual bind could be coded in the PKGBIND but it is better practice to keep your bind processor separate from the PKGBIND members. This means that if any bind options change in future, the PKGBIND might not need to be changed, only rebuilt, thus minimizing the changes required. It is possible to include a Select on the group and set group-specific parameters there rather than in the bind processor. It is also possible to include the bind invocation in the PKGBIND but we do not recommend it, because, if a certain bind parameter changes, then all the PKGBIND members need to change. See Appendix C-1, Common bind exec example on page 725 for the listing of a common bind EXEC example. You have to modify this according your DB2 needs.
3.2.11 Summary
To summarize, here is a checklist of actions you need to perform to enable DB2 support for your SCLM project: 1. Add DB2-specific types, DBRM, PLNBIND, PLNOUT, PKGBIND, PKGOUT, ARCHLEC, ARCHBIND and DCLGEN, to your project definition, and allocate FB 80 PDSs/PDSEs for each of them. 2. Specify an FLMINCLS macro in the language definition for the PLNBIND and PKGBIND members. List the DBRM type first on the TYPES parameter of the FLMINCLS macro.
100
3. Copy sample language definitions that apply to your DB2 environment. Refer to the list of language definitions provided in Appendix C, Chapter 3 listings on page 725. Customize FLM@BD2 and FLM@BDO language definitions for PLNBIND/PLNOUT and PKGBIND/PKGOUT types and languages. 4. Create a LEC architecture definition under the ARCHLEC type for each source Program with embedded SQL with INCLD, LOAD and other statements, as applicable. 5. Create an HL architecture definition under the (existing) architecture definition type to associate the link-edit to the bind with the INCLD statement for the PLNBIND/PKGBIND member and the INCL statement for the LEC architecture definition. 6. Alternatively, create a pair of generic and HL architecture definitions. Code SINC and OUTx statements on the generic architecture definition under the ARCHBIND type, and the INCL statement on the HL architecture definition under the architecture definition type. 7. Create a PLNCLIST member for each application plan, and a PKGCLIST member for each application package, as a TSO REXX or a CLIST procedure. 8. Code a commented out %INCLUDE statement in the DB2CLIST member to have SCLM generate accounting information for the DBRM to be bound. 9. If you want to implement binds on other LPARs, create a Build user exit or a Promote user exit or both to build a job using ISPF file tailoring techniques.
FUNCTN
GROUP MEMBER
OPTION
101
The variable name for the project name. This parameter is required, and must be set to @@FLMPRJ. The variable name for the SCLM internal pointer. This parameter is required, and must be set to @@FLMINF. The variable name for the group to promote to. This parameter is required, and must be set to @@FLMTOG. This variable is ignored for FUNCTN=BUILD.
FLM@BDO
COBCICD2 1-Step
We now illustrate the process of defining DB2CLIST and DB2OUT languages to SCLM. We discuss SCLM macros along with the information SCLM needs to control translator modules. Include language definitions in a project definition by means of the COPY statement.
102
In this example, values are specified for two parameters. Defaults are used for the other parameters. LANG Specifies the language name a user must enter on the SPROF panel or on the Migrate Utility panel to request that this language definition be used to drive build and parse operations of the DB2CLIST modules. In our example we have changed the generic DB2CLIST name to the more meaningful PKGBIND name. Description of Language, max 40 characters.
LANGDESC
* FLMINCLS * In this example, the TYPES parameter of the FLMINCLS macro is used to tell SCLM where to look for DBRMs included in the DB2CLIST member. Because no name is specified, this definition applies to the default include set. name FLMINCLS Specifies the name of the include set that uses this definition. If no name is specified (as in this example), the definition is associated with the default include set. An include set defines a search path for all includes associated with that include set. Refer to Chapter 2.2, Language definitions based upon samples on page 40 for more information on include sets. Specifies the name(s) of the types which are searched to find includes. In this case, SCLM searches the DBRM type first, and then the default @@FLMTYP type. TYPES=(DBRM)
TYPES
103
* FLMTRNSL CALLNAM='PARSE DB2 BIND', FUNCTN=PARSE, COMPILE=FLMLSS, PORDER=1, OPTIONS=(PTABLEDD=, SOURCEDD=SOURCE, TBLNAME=FLMPDBRM, STATINFO=@@FLMSTP, LISTINFO=@@FLMLIS, LISTSIZE=@@FLMSIZ, CONTIN=0, EOLCOL=72) * The following parameters are included in this example: CALLNAM A character string that appears in messages during the specified FUNCTN (in this case PARSE). This value will assist in recognizing which translator was executing during the specified FUNCTN. The value PARSE tells SCLM that this program is to be invoked whenever you parse a module with language DB2CLIST. Member name of the load module for the DB2CLIST parser translator. Not used here, because ISP.SISPLPA is defined in the LINKLIST concatenation. The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. Specifies the options string to be passed to the parser. Strings that start with @@FLM are SCLM variables, and they are replaced by their current values before the string is passed to the parser. The ddname assigned to the parser data set load module. This parameter is required. The name of the parser table load module, FLMPDBRM, DBRM table. This parameter is required. The value 0 indicates to the parser not to concatenate continued lines. The default is column 72. The value 72 tells the parser the maximum number of characters from each input line to process. The default is 0. C C C C C C C C C C C
Since the parser reads its source from a ddname, you must tell SCLM how to allocate that ddname. To do this, use an FLMALLOC macro and an FLMCPYLB macro as shown in Example 3-16.
Example 3-16 Parse step continued for the DB2CLIST language
104
A description of the parameters follows: IOTYPE=A Tells SCLM to allocate a ddname to one or more specific data set(s). Each of those data sets are subsequently identified by using an FLMCPYLB macro. Identifies the ddname to be allocated. In this case SOURCE. Identifies the member to be parsed. When the two SCLM variables are resolved, you get the member of the data set in which you are interested.
DDNAME @@FLMDSN(@@FLMMBR)
Now you can tell SCLM how to invoke the FLMCSPDB DB2 bind/free translator. To do so, use an FLMTRNSL macro followed by one or more FLMALLOC and FLMCPYLB macros. FLMCSPDB resides in the ISPF load library ISP.SISPLPA as shown in Example 3-17.
Example 3-17 FLMCSPDB step of the DB2CLIST language
* FLMTRNSL CALLNAM='DB2 BIND', FUNCTN=BUILD, COMPILE=FLMCSPDB, PORDER=1, GOODRC=4, CALLMETH=LINK, OPTIONS=(FUNCTN=BUILD, OPTION=BIND, SCLMINFO=@@FLMINF, PROJECT=@@FLMPRJ, ALTPROJ=@@FLMALT, DBRMTYPE=DBRM, GROUP=@@FLMGRP, MEMBER=@@FLMMBR) C C C C C C C C C C C C C
Specify as many parameters as required, and let SCLM supply default values for the others: CALLNAM FUNCTN COMPILE DSNAME PORDER GOODRC Names the DB2 bind/free translator. This name appears in build messages. Tells SCLM that this program gets invoked whenever you want to build a member with language DB2CLIST. Identifies the load module name FLMCSPDB for the DB2 bind/free translator. Not used here, because ISP.SISPLPA is defined in the LINKLIST concatenation. The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. The value 4 indicates that SCLM is to consider this build unsuccessful if the translator completes with a return code greater than 4, meaning Only informational and warning diagnostics are acceptable. Specifies the options string to be passed to the translator. At translator run time, the SCLM variable @@FLMMBR is resolved to the member name being built. The value DBRM is the type where DBRMs are stored. The value BUILD specifies the SCLM function invoking the translator. The value BIND specifies the operation to be performed with the DB2 Plan or package.
OPTIONS
105
The FLMCSPDB translator uses four ddnames for the build function, and does not mandate a ddname substitution list, but does support one. Let us examine the ddnames used by the FLMCSPDB translator in detail:. Allocate ddname ISRPROXY to the DB2CLIST member to be processed as shown in Example 3-18.
Example 3-18 ISRPROXY ddname for the DB2CLIST language
The parameters used in the example are as follows: IOTYPE DDNAME KEYREF The value S tells SCLM to allocate a temporary sequential data set. This identifies the ddname to be allocated. In this case ISRPROXY. The value SINC tells SCLM that, if you are building a DB2CLIST member directly, SCLM copies that member to this temporary data set. If you are building a generic architecture definition, SCLM copies the members listed on the SINC statement to this data set. The value Y tells SCLM to cataloged this temporary data set with the SCLM02 high-level qualifier, and to delete it upon completion of all translator functions. The value FB specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed block. The value 80 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 5000 tells SCLM to allocate enough space in this data set to hold 5000 records (records that are fixed block and 80 characters in length).
CATLG
Allocate ddname ISRDB2OT to the DB2OUT copy of the DB2CLIST member as shown in Example 3-19.
Example 3-19 ISRDB2OT ddname for the DB2CLIST language
The following parameters are specified in this macro: IOTYPE DDNAME KEYREF The value O tells SCLM to allocate a temporary sequential data set to ddname DB2OUT. This identifies the ddname to be allocated. In this case ISRDB2OT. The value OUT3 tells SCLM to save what is written to this ddname and keep it under SCLM control, SCLM must be able to determine the member name and the SCLM-controlled data set name in which it is to save this output member. If SCLM is building an architecture definition, it determines the project, group, type, and member as follows: 1. The high-level qualifier is the project identifier that was previously specified.
106
2. The group is the level at which the build is taking place. The group name is the second qualifier. 3. SCLM looks at the architecture definition being built and retrieves the member and type from the architecture statement associated with the keyword OUT3. The type name is the third qualifier. LANG The value DB2OUT allows the build output of a DB2CLIST member to be assigned a different language, DB2OUT, than the build input, DB2CLIST. If this parameter is not specified, then build outputs are assigned the same language as inputs. See the next section for a detail discussion of the DB2OUT language definition. In our example we have changed the default DB2OUT language to the more meaningful PKGOUT. The value FB specifies the record format of the temporary data set that SCLM creates. In this example, the record format is fixed block. The value 80 specifies the record length, in characters, of the temporary data set that SCLM creates. The value 750000 tells SCLM to allocate enough space in this dataset to hold 750000 records (records that are fixed block and 80 characters in length). The value DB2OUT tells SCLM to save what is written to this ddname and keep it under SCLM control, SCLM must be able to determine the member name and the SCLM-controlled data set name in which it is to save this output member. If SCLM is building a source (DB2CLIST) member, it determines the project, group, type and member as follows: 1. The high-level qualifier is the project identifier that was previously specified. 2. The group is the level at which the build is taking place. 3. The type is the value of the DFLTTYP keyword. 4. The member name defaults to the name of the member being built. If SCLM is building an architecture definition (and not a source member directly) then the DFLTTYP value is ignored. Instead, SCLM uses the type associated with the KEYREF value. In our example we have changed the default DB2OUT default type to the more meaningful PKGOUT. Allocate ddname DSNTRACE to a temporary work data set for the translator to invoke DB2 trace facility using IOTYPE=W and PRINT=I as shown in Example 3-20.
Example 3-20 DSNTRACE ddname for the DB2CLIST language
Allocate ddname DUMMYDD to one or more partitioned data sets. FLMCSPDB uses this ddname to find included DBRMs. The FLMINCLS macro described earlier needs to be referenced here to ensure that the compiler is picking up includes from the correct data sets. Since IOTYPE=I allocations default to the default include set shown earlier, this is automatically done. If another name was used on the FLMINCLS macro, that name needs to be referenced here using the INCLS parameter.
107
IOTYPE=I allocates a ddname with a concatenation of all the PDSs in the hierarchy starting with the group specified for the BUILD and ending with the top, or production level, group. First the hierarchy for the INCLUDE type is allocated, followed by the type of the first SINCed member from the architecture definition, or, if no architecture definition is used, the type of the member being built. This is shown in Example 3-21.
Example 3-21 DUMMYDD ddname for the DB2CLIST language
-- DUMMY DD - REQUIRED FOR FLMINCLS MACRO BUT NOT TRANSLATOR FLMALLOC IOTYPE=I,DDNAME=DUMMYDD,KEYREF=SINC
The parameters used with this macro are as follows: IOTYPE The value I tells SCLM to allocate this ddname to a concatenation of SCLM-controlled data sets. The types used in the concatenation are determined by the FLMINCLS macro referenced by the INCLS parameter on the FLMALLOC macro. In this case, there is no INCLS parameter so the default FLMINCLS (or include set) is used. A hierarchy of data sets is concatenated for each type specified for the referenced FLMINCLS macro. The hierarchy begins at the group where the build is taking place and extends to the top of the project's hierarchy. In this case, the concatenation first contains all of the data sets for the INCLUDES type followed by the data sets for the value substituted into the @@FLMTYP variable. See the KEYREF parameter to determine the value which is substituted into the @@FLMTYP and @@FLMETP variables. KEYREF The value SINC tells SCLM that, if you are building an architecture definition, refer to the first SINC statement in that architecture definition for the type that is substituted into the @@FLMTYP macro. The value for @@FLMETP comes from the EXTEND= parameter of the FLMTYPE macro for that type. If you are not building an architecture definition, the type is the type of the member being built.
These macros together constitute a language definition similar to one in Figure 3-15, SCLM02.PROJDEFS.SOURCE(FLM@BD2). It contains comments to explain the flow of operations.
108
In this example, values are specified for two parameters. Defaults are used for the other parameters: LANG This specifies the language name of this language definition to drive promote copy and promote purge operations of DB2OUT members. In our example we have changed the generic DB2OUT name to the more meaningful PKGOUT name. This is a description of the language, maximum 40 characters.
LANGDESC
* FLMTRNSL CALLNAM='DB2 PROM BIND', FUNCTN=COPY, COMPILE=FLMCSPDB, PORDER=1, GOODRC=4, CALLMETH=LINK, PDSDATA=Y, OPTIONS=(FUNCTN=@@FLMFNM, OPTION=BIND, SCLMINFO=@@FLMINF, PROJECT=@@FLMPRJ, ALTPROJ=@@FLMALT, DBRMTYPE=DBRM, GROUP=@@FLMGRP, TOGROUP=@@FLMTOG, MEMBER=@@FLMMBR) The following parameters are used in this example: CALLNAM FUNCTN COMPILE DSNAME PORDER GOODRC This names the DB2 bind/free translator and appears in build messages. This tells SCLM that this program gets invoked whenever you want to promote copy a member with language DB2OUT. This identifies load module name FLMCSPDB for DB2 bind/free translator. This is not used here, because ISP.SISPLPA is defined in the LINKLIST concatenation. The value 1 tells SCLM that this program expects an options string but not a ddname substitution list. The value 4 indicates that SCLM is to consider this build unsuccessful if the translator completes with a return code greater than 4, meaning Only informational and warning diagnostics are acceptable. This specifies the options string to be passed to the translator. At translator run time, the SCLM variable @@FLMMBR is resolved to the member name being promoted. C C C C C C C C C C C C C C C
OPTIONS
109
The value DBRM is the type name where DBRMs are stored. The value @@FLMFNM resolves to the SCLM function promote copy invoking the translator. The value BIND specifies the operation to be performed with the DB2 Plan or package.
The FLMCSPDB translator uses two ddnames for the promote copy function, and does not mandate a ddname substitution list, but does support one. Let us now examine the ddnames used by the FLMCSPDB translator in detail. Allocate ddname ISRPROXY to the DB2OUT member to be processed as shown in Example 3-24.
Example 3-24 ISRPROXY ddname of the DB2OUT language
The following parameters are used in this example: IOTYPE=A This tells SCLM to allocate a ddname to one or more specific data set(s). Each of those data sets are subsequently identified by using an FLMCPYLB macro. This identifies the ddname to be allocated. The value @@FLMDSF identifies the DB2OUT data set member SCLM located (found) at the promote group to be processed. When this SCLM variable is resolved, you get the member of the data set in which you are interested.
DDNAME FLMCPYLB
Allocate ddname DSNTRACE to a temporary work data set for the translator to invoke DB2 trace facility using IOTYPE=W and PRINT=I as shown in Example 3-25.
Example 3-25 DSNTRACE ddname of the DB2OUT language
110
* FLMTRNSL CALLNAM='DB2 PROM FREE', FUNCTN=PURGE, COMPILE=FLMCSPDB, PORDER=1, GOODRC=4, CALLMETH=LINK, PDSDATA=Y, OPTIONS=(FUNCTN=@@FLMFNM, OPTION=FREE, SCLMINFO=@@FLMINF, PROJECT=@@FLMPRJ, ALTPROJ=@@FLMALT, DBRMTYPE=DBRM, GROUP=@@FLMGRP, TOGROUP=@@FLMTOG, MEMBER=@@FLMMBR) The following parameters are used in this example: FUNCTN The value of PURGE in the first occurrence tells SCLM that this program gets invoked whenever you want to promote purge a member with language DB2OUT. The value @@FLMFNM in the second occurrence resolves to the SCLM function promote purge invoking the translator. The value FREE is the operation to be performed with the DB2 Plan or package. C C C C C C C C C C C C C C C
FUNCTN OPTION
See Step 2 for a detailed description of other parameters used in this example. The FLMCSPDB translator uses two ddnames for the promote purge function, and does not mandate a ddname substitution list, but does support one. Let us now examine the ddnames used by the FLMCSPDB translator:. Allocate ddname ISRPROXY to the DB2OUT member to be processed as shown in Example 3-27.
Example 3-27 ISRPROXY ddname for DB2OUT language
See Step 2 for a detailed description of the parameters used in this example. Allocate ddname DSNTRACE to a temporary work data set for the translator to invoke DB2 trace facility using IOTYPE=W and PRINT=I as shown in Example 3-28.
Example 3-28 DSNTRACE ddname for DB2OUT language
111
These macros together constitute a language definition similar to one in Figure 3-16, SCLM02.PROJDEFS.SOURCE(FLM@BDO). It contains comments to explain the flow of operations.
By specifying some additional parameters on the parser step in the language translators, it is now possible to utilize standard PL/I and COBOL techniques to allow separate include sets for normal includes and DB2 includes. The previously mentioned samples provided in ISP.SISPMACs, as well as FLM@2CCE, do not utilize this support. So the samples provided in Example C-4 on page 732, Example C-5 on page 736, and Example C-6 on page 739 show this support, and we refer to these translators in the following explanations of the support.
112
Specify different include sets for COBOL copybooks and DB2 includes
The FLMINCLS macro specifies the name of the include sets that define to SCLM where included copybooks and DB2 DCLGEN includes will be resolved from. Let us look at the definition as shown in Example 3-29.
Example 3-29 Include sets for copybook and DCLGEN support
* FLMINCLS TYPES=(SOURCE,COPYLIB,DCLGENC) DCLGENC FLMINCLS TYPES=(DCLGENC) * The first FLMINCLS definition is associated with the default include set because no name is specified in the left most position. This means that if there is a COPY XYZ statement in the COBOL source, SCLM will build a SYSLIB concatenation that searches the source followed by the copybook libraries and then followed by the DCLGENC library. The second FLMINCLS definition is associated with the DCLGENC include set and SCLM will use this alternate include set to search for DCLGENs as follows: When the source code is being processed by the multi-step COBOL language definition with a separate DB2 preprocessor step and there is a EXEC SQL INCLUDE statement in the COBOL source then the DCLGENC include set will be used to find the DCLGENs. When the source code is being processed by the single-step COBOL language definition with the integrated DB2 coprocessor and there is a COPY XYZ OF DCLGENC statement in the COBOL source, then the DCLGENC include set will be used to find the DCLGENs.
113
We see the new parameters highlighted in Example 3-30. The definitions are as follows: SQL= INCLSET This parameter has a maximum of eight characters specifying the name of the include set assigned to EXEC SQL INCLUDE dependencies. When INCLSET is present, include set dependencies will be generated. That is, when COPY ABC OF XYZ statements are encountered, a dependency for copybook ABC is generated with an include set name of XYZ. This facilitates having copybooks with same name from different sources. This parameter is only needed in the single-step COBOL language definition.
What this means is that, when using the same named member for both COBOL copybooks and DB2 DCLGENs and the source is being processed by the single step COBOL language definition, the DB2 declare needs to be included with the COPY XYZ OF DCLGENC rather than specifying an EXEC SQL INCLUDE member. So the following COBOL code would be used to specify a copybook of RDBKTB01 and a DCLGEN or RDBKTB01 as shown in Example 3-31.
Example 3-31 COBOL code with include for COPYBOOK, DB2 table declare and SQLCA
* COPY RDBKTB01. * COPY RDBKTB01 OF DCLGENC. * EXEC SQL INCLUDE SQLCA END-EXEC. * However, when the source code is processed by the multi-step COBOL language that uses the DB2 preprocessor the EXEC SQL INCLUDE statements can be used to include DCLGENs. Warning: If your COBOL code current uses EXEC SQL INCLUDE statements to include your DB2 DCLGENs and you cannot or choose not to recode them with the COPY XYZ OF DCLGENC syntax, and you have same named members for both COBOL copybooks and DB2 DCLGENs, then you must code your SCLM DB2 languages using the multi-step language definition that uses the DB2 preprocessor. Regardless of which language variation is being used, when the member is saved, the include list stored in the account record will look like Example 3-32.
Example 3-32 Include list specified in the account record
Include-set ----------DCLGENC
114
* FLMALLOC IOTYPE=I,DDNAME=DCLGENC,KEYREF=SINC,INCLS=DCLGENC
This FLMALLOC can be specified at the end of the translator step for the COBOL compile. The IOTYPE=I specifies this as an include definition. You can see that the INCLS parameter is used. This is the reference to the FLMINCLS with the name of DCLGENC. SCLM will build a DD name of DCLGENC with a list of the types specified in the DCLGENC FLMINCLS statement. Normal COBOL COPY statements will be resolved through the normal SYSLIB concatenation.
* *
The IOTYPE=I specifies this as an include definition. You can see that the INCLS parameter is used. This is the reference to the FLMINCLS with the name of DCLGENC. SCLM will build a SYSLIB concatenation with a list of the types specified in the DCLGENC FLMINCLS statement. Normal COBOL COPY statements will be resolved through the normal SYSLIB concatenation. The complete language translators can be found in Example C-4 on page 732 and Example C-5 on page 736.
PL/I support
The sections of the single-step Enterprise PL/I compiler with DB2 coprocessor that we have modified from the shipped sample are as described below. In order to implement this support there are three things that need to be changed: Adding multiple FLMINCLS to support multiple include sets Adding new parser parameters to let SCLM to know to create different include sets Adding addition FLMALLOC statements for additional DB2 include set
Specify different include sets for PL/I includes and DB2 includes
The FLMINCLS macro specifies the name of the include sets that define to SCLM where included PLINCLs and DB2 DCLGEN includes will be resolved from. Let us look at the definition as shown in Example 3-35.
Example 3-35 Include sets for COPYBOOK and DCLGEN support
115
The first FLMINCLS definition is associated with the default include set because no name is specified in the left most position. This means that if there is a %INCLUDE XYZ statement in the PL/I source, SCLM will build a SYSLIB concatenation that searches the PL/I source followed by the PLINCL libraries and then followed by the DCLGENP library. The second FLMINCLS definition is associated with the DCLGENP include set. This means that if there is a %INCLUDE DB2DCLS(XYZ) statement in the PL/I source, then SCLM builds an alternate include set for the PLINCLs that are in the DCLGENP include set.
* FLMTRNSL CALLNAM='SCLM PL/I PARSE', FUNCTN=PARSE, COMPILE=FLMLPGEN, PORDER=1, OPTIONS=(SOURCEDD=SOURCE, STATINFO=@@FLMSTP, LISTINFO=@@FLMLIS, LISTSIZE=@@FLMSIZ, LANG=I(I)) C C C C C C C C
We see the new parameters highlighted in Example 3-36. The following definition applies: LANG=I(I) The LANG=I parameter is the current parameter that specifies that this parser is for the PL/I language. By appending the (I) parameter it generates include set dependencies.
What this means is when using the same named member for both PL/I INCLUDEs and DB2 DCLGENs that the DB2 declare needs to be included with the %INCLUDE DCLGENP(XYZ) rather than specifying an EXEC SQL INCLUDE member. So the following PL/I code would be used to specify a PLINCL of RDBKTB01 and a DCLGEN or RDBKTB01 as shown in Example 3-37.
Example 3-37 PL/I code with include for PLINCL, DB2 table declare and SQLCA
%INCLUDE RDBKTB01; /*****************************************************/ /* SQL INCLUDE FOR SQLCA */ /*****************************************************/ EXEC SQL INCLUDE SQLCA; /*****************************************************/ /* SQL DECLARATION FOR TABLE SCLMTB01 */ /*****************************************************/ %INCLUDE DB2DCLS(RDBKTB01);
116
When the member is saved, the include list stored in the account record will look like Example 3-38.
Example 3-38 Include list specified in the account record
Include-set ----------DB2DCLS
* FLMALLOC IOTYPE=I,DDNAME=DB2DCLS,KEYREF=SINC,INCLS=DB2DCLS
This FLMALLOC can be specified at the end of the translator step for the PL/I compile. The IOTYPE=I specifies this as an include definition. You can see that the INCLS parameter is used. This is the reference to the FLMINCLS with the name of DB2DCLS. SCLM will build a DD name of DB2DCLS with a list of the types specified in the DB2DCLS FLMINCLS statement. Normal PL/I %INCLUDE statements will be resolved through the normal SYSLIB concatenation. The complete language translator can be found in Appendix C-6, PLEDB2 - single-step version on page 739.
117
118
Chapter 4.
Migrating to SCLM
After you have tested your new SCLM project, you are now ready to fully populate it with all of your source members, create architectural definitions (ARCHDEFs) for all members that need to be compiled and linked, and optionally compile and link (build) all source members and finally cut over to your new SCLM project. Before we present this migration process, let us first review the big picture of setting up and converting to SCLM. Here are main steps: 1. Planning/kickoff meeting 2. Setting up SCLM: a. b. c. d. e. Defining project hierarchy Allocating library (data set) types Defining language definitions (processes) Setting up project controls Setting up any needed user exits.
3. Testing 4. Source migration 5. Creating architecture definitions and optionally building them 6. Cutover to SCLM In the previous chapters we have discussed SCLM planning, setup, and testing. This chapter deals with the last three steps (4, 5, and 6) of converting to SCLM.
119
See section 4.7, Running the SCLM Migration Utility for an explanation of how to run the Migration Utility. 5. Create ARCHDEFs for load modules, copy them to the ARCHDEF type, and migrate them into SCLM with the ARCHDEF language. ARCHDEFs should also be created by language type. This topic is covered in section 4.8, ARCHDEF generation 6. If SCLM load modules are going to be used when SCLM goes live, use the high level member listing ARCHDEFs to build all members. If a copy exit is going to be used, then build a subset of the members to ensure that they build correctly. 7. Repeat step 4 for the delta migration if there is no production freeze. See 4.4, Production freeze versus delta migration on page 123 for further explanation of this step. 8. Cut over to SCLM. This topic is covered in section 4.9, Cutover to SCLM.
120
Migrate conditionally
By performing the migration conditionally, you are building up the members in the source dataset by language without affecting the members that were already migrated previously with a different language. A conditional migrate does not affect members that already have a valid language. Therefore. make sure that the copy and migrate steps are done in pairs by
language type.
COPY language
In this example migration plan, all copybooks and DCLGENs are to be used by COBOL programs. These members need to be parsed when they are saved in SCLM to keep track of any imbedded COPY statements within them so they must be handled by a language that has a COBOL parser. We assigned the copybooks and DCLGENs a language of COPY. The COPY language only has a single step in it and that is the COBOL parse step. The COPY language is equivalent to taking a simple COBOL batch language and removing the COBOL compile step. COBOL copybooks and DCLGENs can be assigned your COBOL batch language, but it may make more sense to handle them with the more simple COPY language since they do not need to be compiled in any way.
121
Migration timing
When you are creating a migration plan, you must estimate how long each step will last and how long the migration in total will last. The length of the migration may determine when you will perform it, if you will need a delta migration or if you can just freeze everyone out of the library until the migration is completed, and so on. You will therefore want to perform some test migrations of 100 members or so, for example, to determine how long it will take per member to migrate. Typical timings are 5 seconds per member although significantly slower or faster migrations are possible depending on your CPUs speed and load. Once you know your timing per member, you can multiply it by the total number of members you have to determine your total minimum migration time. Then you must perform similar calculations for ARCHDEF creation and migration. Of course you have to plan for some time between jobs to check results and debug problems. If you are building your programs, you have to do timings on build time and estimate your total build time. If you are doing a delta migration, you must add in an estimate for it. When you add it all up, you may find that the migration time will last several days or even weeks, which must be figured into your migration plan and schedule.
123
The separation process consists of several steps: 1. Determine an inventory of what is to be moved into SCLM and plan for the mapping to SCLM. This process is covered in section 4.5.1, Determining source inventory and map to extract and SCLM datasets that follows. 2. Create a set of migrate extract datasets based upon the inventory and SCLM languages and language variation they map to. 3. Copy the members by language type to the extract datasets. How you extract these members from your current library management product by language and type is up to you. This is no trivial task, but it is beyond the scope of this book to discuss it, as the process is specific to particular library management products.
4.5.1 Determining source inventory and map to extract and SCLM datasets
This step consists of creating an inventory of all members to be migrated into SCLM and where they are currently located and then mapping that inventory to the extract datasets and then mapping the extract datasets to SCLM by type and language. Here is an example of an inventory mapping. Table 4-1 is an example for a Panvalet migration. You must come up with a similar mapping for your conversion. In the first and second columns are your source datasets and member counts. The member counts will be useful when you are doing your migration timing estimates and when you want to verify copy and migrate counts. In the third column are your migrate extract datasets that you create with a name of your choice. By convention, we put the language in the last node of the dataset name. For the text type members, we use the SCLM type as the last node. In the fourth column we put the SCLM datasets that the extract datasets map to. In the last column, we specify the SCLM language for the members in each extract dataset.
Table 4-1 Example Panvalet migration plan Source PROD.SOURCE.PANLIB PROD.SOURCE.PANLIB PROD.SOURCE.PANLIB PROD.SOURCE.PANLIB PROD.SOURCE.PANLIB PROD.SOURCE.PANLIB PROD.SOURCE.PANLIB PROD.SOURCE.PANLIB PROD.JCL.PANLIB PROD.PARM.PANLIB PROD.PARM.PROCLIB Count 895 240 127 1792 349 651 406 552 5534 1595 366 Migrate Dataset SCLM.MIGRATE.COPYLIB SCLM.MIGRATE.DCLGEN SCLM.MIGRATE.ASM SCLM.MIGRATE.COBOL SCLM.MIGRATE.COBDYN SCLM.MIGRATE.COBDB2 SCLM.MIGRATE.COBDB2C SCLM.MIGRATE.COBCICS SCLM.MIGRATE.JCLLIB SCLM.MIGRATE.PARMLIB SCLM.MIGRATE.PROCLIB SCLM Dataset SCLM.PROD.COPYLIB SCLM.PROD.DCLGEN SCLM.PROD.SOURCE SCLM.PROD.SOURCE SCLM.PROD.SOURCE SCLM.PROD.SOURCE SCLM.PROD.SOURCE SCLM.PROD.SOURCE SCLM.PROD.JCLLIB SCLM.PROD.PARMLIB SCLM.PROD.PROCLIB SCLM Language COPY COPY ASM COB COBDYN COBDB2 COBDB2C COBCICS TEXT TEXT TEXT
124
125
SCLM Migration Utility - Entry Panel Command ===> Selection criteria: Project . : SCLM Group . . . PROD Type . . . . SOURCE Member . . . *
Member information: Authorization code . . Change code . . . . . . Language . . . . . . . COBDB2C Output control: Ex Sub Messages . . 1 2 1. Terminal Report . . 3 2 2. Printer Listings . . 3 2 3. Data set 4. None
Figure 4-1 SCLM Migration Utility panel
Mode . . . 1
Process . . 2
Printer . . * Volume . .
Figure 4-2 shows sample output messages from the migration utility. They show that two members have been successfully migrated into SCLM. You will want to ensure that you get a zero return code from your migrations. FLM32101 FLM06501 FLM87107 FLM06501 FLM87107 FLM32401 MIGRATION UTILITY INITIATED - 05:10:49 ON 2007/01/11 TRANSLATOR RETURN CODE FROM ===> SCLM COBOL PARSE SAVE SUCCEEDED FOR MEMBER SCLMTST1 AT 05:10:49, CODE: TRANSLATOR RETURN CODE FROM ===> SCLM COBOL PARSE SAVE SUCCEEDED FOR MEMBER SCLMTST2 AT 05:10:49, CODE: MIGRATION UTILITY COMPLETED - 05:10:49 ON 2007/01/11
===> 0 0 ===> 0 0
126
/* REXX */ /*********************************************************************/ /* REXX PROGRAM TO CREATE A HIGH LEVEL ARCHDEF FROM ALL THE MEMBERS */ /* OF AN INPUT PDS (PER LANGUAGE). */ /*********************************************************************/ TRACE O ARG MEMIN SAY 'MEMIN = 'MEMIN'*' DUMMY = OUTTRAP("CMD_OUTPUT_LINE.","*") "LISTDS 'SCLM.MIGRATE."MEMIN"' MEMBERS" NUMBER_OF_MEMBERS = CMD_OUTPUT_LINE.0 - 6 DO I = 7 TO CMD_OUTPUT_LINE.0 J = I - 6 MEMB = SUBSTR(CMD_OUTPUT_LINE.I,3,8) OUTPUT_LINE.J = 'INCL 'MEMB' ARCHDEF' END "ALLOC DA('SCLM.MIGRATE.ARCHDEF(@"MEMIN")') F(OUTFILE) OLD" "EXECIO * DISKW OUTFILE (STEM OUTPUT_LINE. FINIS" "FREE FI(OUTFILE)" SAY "CREATING HL ARCHDEF 'SCLM.MIGRATE.ARCHDEF(@"MEMIN")'" EXIT
127
You need to run the above REXX for each extract dataset that needs ARCHDEFs created for them. See Example 4-2 for an example REXX that does this.
Example 4-2 Running member listing REXX for each language
/* REXX */ Trace o "EX "EX "EX "EX "EX "EX Exit 'SCLM.PROJDEFS.REXX(MEMBLIST)' 'SCLM.PROJDEFS.REXX(MEMBLIST)' 'SCLM.PROJDEFS.REXX(MEMBLIST)' 'SCLM.PROJDEFS.REXX(MEMBLIST)' 'SCLM.PROJDEFS.REXX(MEMBLIST)' 'SCLM.PROJDEFS.REXX(MEMBLIST)' 'ASM'" 'COBOL'" 'COBDYN'" 'COBCICS'" 'COBDB2'" 'COBDB2C'"
/* REXX */ /**********************************************************************/ /* EXEC TO BUILD ARCHDEFS */ /**********************************************************************/ TRACE O ARG MEMIN INDSN = "'SCLM.MIGRATE.ARCHDEF'" BKMEMIN = MEMIN L = LENGTH(MEMIN) IF L = 8 THEN DO MEMIN = LEFT(MEMIN,7) END MEM = @||MEMIN MAXLEN = 80 ADDRESS ISPEXEC "LMINIT DATAID(MAPS) DATASET("INDSN") ENQ(SHR)" IF RC = 0 THEN DO "LMOPEN DATAID("MAPS") OPTION(INPUT)" IF RC = 0 THEN DO "LMMFIND DATAID("MAPS") MEMBER("MEM")" IF RC = 0 THEN DO 128
A Practical Guide to Setting Up and Using SCLM
SAY 'CREATING ARCHDEFS ... PLEASE WAIT' DO UNTIL RC <> 0 ADDRESS ISPEXEC "LMGET DATAID("MAPS") MODE(INVAR) DATALOC(RECIN) DATALEN(RECLEN) MAXLEN("MAXLEN")" IF RC = 0 THEN DO KEYW = STRIP(SUBSTR(RECIN,1,4),T) IF KEYW = INCL THEN DO MAPNM = STRIP(SUBSTR(RECIN,6,8),T) ADDRESS TSO CALL ARCHOPE MAPNM NEWSTACK /* Modify the following section to create the proper archdefs for each */ /* of your language types. */ SELECT WHEN MEM = '@ASM' THEN DO QUEUE "*" QUEUE "* NAME: "MAPNM QUEUE "* LINK EDIT CONTROL(LEC) ARCHDEF FOR ASSEMBLER" QUEUE "*" QUEUE "INCLD "MAPNM" SOURCE * COMPILE SOURCE" QUEUE "LOAD "MAPNM" LOAD * LINK EDIT LOAD MODULE" QUEUE "LMAP "MAPNM" LINKLIST * LINK LIST" END WHEN MEM = '@COBOL' THEN DO QUEUE "*" QUEUE "* NAME: "MAPNM QUEUE "* LINK EDIT CONTROL(LEC) ARCHDEF FOR COBOL BATCH" QUEUE "*" QUEUE "INCLD "MAPNM" SOURCE * COMPILE SOURCE" QUEUE "LOAD "MAPNM" LOAD * LINK EDIT LOAD MODULE" QUEUE "LMAP "MAPNM" LINKLIST * LINK LIST" END WHEN MEM = '@COBCICS' THEN DO QUEUE "*" QUEUE "* NAME: "MAPNM QUEUE "* LINK EDIT CONTROL(LEC) ARCHDEF FOR CICS COBOL" QUEUE "*" QUEUE "INCLD "MAPNM" SOURCE * COMPILE SOURCE" QUEUE "LOAD "MAPNM" LOADCICS * LINK EDIT LOAD MODULE" QUEUE "LMAP "MAPNM" LINKLIST * LINK LIST" QUEUE "COPY CICSLINK ARCHDEF * INCLUDE CICS INTERFACE" QUEUE "LKED LE370C" END WHEN MEM = '@COBDB2' THEN DO QUEUE "*" QUEUE "* NAME: "MAPNM QUEUE "* LINK EDIT CONTROL(LEC) ARCHDEF FOR BATCH DB2 COBOL" QUEUE "*" QUEUE "INCLD "MAPNM" SOURCE * COMPILE SOURCE" QUEUE "LOAD "MAPNM" LOAD * LINK EDIT LOAD MODULE" QUEUE "LMAP "MAPNM" LINKLIST * LINK LIST" QUEUE "COPY DB2LINK ARCHDEF * INCLUDE DB2 INTERFACE" QUEUE "LKED LE370DB" END
129
WHEN MEM = '@COBDB2C' THEN DO QUEUE "*" QUEUE "* NAME: "MAPNM QUEUE "* LINK EDIT CONTROL(LEC) ARCHDEF FOR CICS / DB2 COBOL" QUEUE "*" QUEUE "INCLD "MAPNM" SOURCE * COMPILE SOURCE" QUEUE "LOAD "MAPNM" LOADCICS * LINK EDIT LOAD MODULE" QUEUE "LMAP "MAPNM" LINKLIST * LINK LIST" QUEUE "COPY CDB2LINK ARCHDEF * INCLUDE DB2 INTERFACE" QUEUE "LKED LE370DC" END OTHERWISE END CALL ARCHWR MAPNM DELSTACK END END /*IF INCL*/ END /*IF RC=0*/ END /*DO UNTIL*/ END /*LMMFIND*/ END /*LMOPEN*/ END /*LMINIT*/ "LMCLOSE DATAID("MAPS")" "LMFREE DATAID("MAPS")" EXIT /**********************************************************************/ /* */ /* ARCHOPE : OPEN OUTPUT PDS MEMBER FOR WRITING ARCHDEF */ /* */ /**********************************************************************/ ARCHOPE: PARSE UPPER ARG XMAP XMAP1 = STRIP(XMAP) ARCH = "SCLM.ARCHDEF."BKMEMIN"("XMAP1")" "ALLOC DA('"ARCH"') FI(ARCHDEF) SHR REUSE" RETURN RC /**********************************************************************/ /* */ /* ARCHWR : WRITE ARCHDEF MEMBER TO PDS */ /* */ /**********************************************************************/ ARCHWR: PARSE UPPER ARG XMAP DO WHILE QUEUED() > 0 "EXECIO 1 DISKW ARCHDEF" END "EXECIO 0 DISKW ARCHDEF (FINIS" RETURN RC /**********************************************************************/ /* */
130
/* LECOPE : OPEN OUTPUT PDS MEMBER FOR WRITING LECDEF */ /* */ /**********************************************************************/ LECOPE: PARSE UPPER ARG XMAP XMAP1 = STRIP(XMAP) ARCH = "SCLM.LECDEF."BKMEMIN"("XMAP1")" "ALLOC DA('"ARCH"') FI(LECDEF) SHR REUSE" RETURN RC /**********************************************************************/ /* */ /* LECWR : WRITE LECDEF MEMBER TO PDS */ /* */ /**********************************************************************/ LECWR: PARSE UPPER ARG XMAP DO WHILE QUEUED() > 0 "EXECIO 1 DISKW LECDEF" END "EXECIO 0 DISKW LECDEF (FINIS" RETURN RC return You have to execute the above REXX for each language. This REXX uses the member listings created in the prior step so do not run it before running the member listing REXX. Example 4-4 is an example REXX of calling your ARCHDEF generating REXX for each language.
Example 4-4 REXX to run mass ARCHDEF creation REXX
/* REXX */ Trace o "EX "EX "EX "EX "EX "EX Exit 'SCLM.PROJDEFS.REXX(BUILDARC)' 'SCLM.PROJDEFS.REXX(BUILDARC)' 'SCLM.PROJDEFS.REXX(BUILDARC)' 'SCLM.PROJDEFS.REXX(BUILDARC)' 'SCLM.PROJDEFS.REXX(BUILDARC)' 'SCLM.PROJDEFS.REXX(BUILDARC)' 'ASM'" 'COBOL'" 'COBDYN'" 'COBCICS'" 'COBDB2'" 'COBDB2C'"
131
Planning
You must have held planning meetings with the staff responsible for all aspects of code management and execution including your librarian, DBAs, operations, management, etc. All potential aspects of the cutover to SCLM should be discussed and you have to come up with a migration plan in some detail for the last few days leading up to the cutover.
Training
You must have trained all of your developers that are to use SCLM in the use it. The training sessions will have covered, at a minimum, how to edit, build, test, and promote their code. Training should also cover how to create a new member in SCLM including how to create a ARCHDEF for it. You must document your hierarchy, groups, types, languages and ARCHDEF variations. You will also need to document how to use special processing that you set up such as copy exits, bind processing, or the use of Breeze.
Code freeze
You will want to lead up to the cutover with some sort of source code freeze of your current library product. This freeze could last the entire time of your migration to SCLM or can last just during your final delta migration.
132
Security
You must verify that all security (RACF, EAC) is in place for your team (developers, testers, operations, DBAs) and for the Breeze started task, etc. to use SCLM and at the same time plan on removing the update access to your old product. If developers are binding their DB2 programs in SCLM, you have to ensure that they have bind authority.
Archiving
If your old product stores its records in a proprietary format you may need to extract all old code and audit records to a format that is readable outside of the tool so that when your old tool is no longer on your system you can still have access to the old records.
Backups
Since SCLM will be maintained in a new set of datasets you must ensure that your backups (daily, weekly, monthly, etc.) are in place for the new SCLM datasets.
Disaster recovery
You may want to examine your disaster recovery plan for references to your library product and update it as needed to reference SCLM.
Breeze considerations
If you have installed Breeze, you will want to ensure that all approvers, approver groups, and junction records are in place for the approval process that you have come up with, that all approvers are aware of how to approve packages, that all users have update access to the Breeze dataset, that the Breeze exits are in place and that the sweep job has been scheduled if needed.
133
However, if you have decided to execute out of your new SCLM load libraries once you go live with SCLM, then you will have some ,additional migration steps: 1. You have to recreate all of your load modules in SCLM by building all of your programs. You must plan for enough time to perform all of the builds and to debug all of the compile and link problems you will have. For all DB2 programs, the build jobs must bind all newly built programs just before you are ready to run them. 2. You have to modify all JCL and PROCs to point to SCLM datasets and then reschedule them in your job scheduler to run out of SCLM libraries. 3. You have to bring down your production CICS regions, modify their startup JCL to point to the SCLM load libraries and then start the regions again. 4. You have to test a subset of the newly created load modules by running some of your production jobs and transactions and compare the results to the same jobs and transactions running in your old environment.
134
Chapter 5.
135
* comment lines - describe the content of the archdef * INCL memberxx archtype * comments * PROM memberyy texttype * INCLD memberzz sourcetype * comments * Comments can be included into ARCHDEFs in two ways: Any line beginning with a * is a comment. Any characters to the right of the last argument is treated as a comment. Using an * is not necessary, but helps to separate out the comments for readability. Do not add comments to PROM statements. Programs that need to be compiled and linked should be included into the high-level ARCHDEF with an INCL of the members ARCHDEF. The ARCHTYPE variable should be replaced with your ARCHDEF type, for example, ARCHDEF. Programs that are processed with languages that are self contained (no link edit is needed, or the link is integrated into the language) should be included into the high-level ARCHDEF with an INCLD. The sourcetype variable should be replaced with the members type where the source is stored. Members that have no language processing should be included into the ARCHDEF with a PROM statement. PROM refers to PROMOTE. These members will be promoted without processing.
136
* NAME: P2007601 * DESC: PACKAGE FOR 2007601 * DEFECT: 2007601 * * ADD SOME NEW FUNCTIONALITY AND FIXING A DEFECT * * ARCHDEF MEMBERS * INCL SCLMTST1 ARCHDEF * Batch Program INCL SCLMTST2 LECDEF * Batch DB2 Program INCL SCLMTST2 LECDEF * Online DB2 Program INCL SCLMTST3 ARCHDEF * Online Program * * JCL MEMBERS * PROM PAY63702 JCLLIB * Job Control Language * * DOC MEMBERS * PROM P2007601 DOC * Documentation
137
Inputs to LEC architecture members are identified in the same way that inputs to CC architecture members are identified. The one difference is that by default, LEC architecture members include object and load modules generated by the OBJ and LOAD statements in the input stream to the linkage editor. SINC statements can be used in LEC architecture members to identify object modules or load modules which are generated outside of the project. If SINC statements are being used to include load modules, the input ddname for the build translator must specify KEYREF=INCL. The LINK statement can also be used to identify an input to the linkage editor. It identifies an output of another ARCHDEF in the project that does not need to be rebuilt before being included in the input stream of the linkage edit. SCLM usually verifies that the inputs to the LEC architecture member are up to date before link-editing the inputs. SCLM will rebuild any inputs that are outputs of building other members in the project when those outputs are out-of-date. The inputs specified on LINK statements are an exception. These inputs will not be rebuilt. You can override default linkage editor options by using the PARM statement. Use the statement as many times as necessary to specify all options you want. SCLM uses the standard S/370 linkage editor as defined by the LE370 language definition unless an LKED statement is used to override the default. You can specify in the LEC ARCHDEF that SCLM pass linkage edit control statements directly to the linkage editor by using the CMD statement. Insert the control statements along with the object and load modules by careful positioning in the LEC architecture member. The CMD statement can be used to include object modules and load modules that are in data sets outside of the project. The format of an LEC ARCHDEF is shown in Example 5-3.
Example 5-3 Format of LEC ARCHDEF
* comment lines * comment lines INCLD memberxx sourcetype INCL memberxx ccdeftype INCLD memberyy sourcetype CMD ... * COPY copymbr archtype * LOAD memberxx loadtype LMAP memberxx linklist LKED LEzzz PARM zzz
* * * * * * * * * *
include main module OR include main module via CCDEF include any statically linked subroutines send commands to linkage editor commonly used to include external load modules used to include statements from other archdefs usually used to include commonly used CMD statements write out load module; must be included write out link listing use alternate link edit language
Just like a high-level ARCHDEF, a comment can be included into ARCHDEFs in two ways, starting a line with a * to make the whole line a comment or adding comment to the end of any line. Do not add comments to PARM statements. The main module should be included into the LEC ARCHDEF with the first INCLD of the members source type. Enter the sourcetype variable as the type where the source member is included. Alternately, if the source program has a compilation control ARCHDEF, it should be included into the LEC ARCHDEF with an INCL of the members CCDEF.
138
Any statically linked subroutines should be similarly included with an INCLD statement. Subroutines can also be included with an INCL of its CCDEF if it has one. External load modules should be included with a CMD INCLUDE SYSLIB statement. Any other linkage editor commands such as a ORDER statement can also be included with a CMD statement. Common CMD statements for a collection of programs can be grouped together into an ARCHDEF and included into the LEC ARCHDEF with a COPY statement. A LOAD statement must be included into the LEC ARCHDEF. Follow the LOAD statement with the load module name and then the load module type. The name of the load module does not have to match the name of any included source or of the ARCHDEF itself. Usually though the name of the ARCHDEF, the load module and the main source program will match. An LMAP statement can be used to save the link listing if you set up your project and link language to store link listings. An LKED statement can be used to override the default linkage editor (LE370). A PARM statement can be used to override default linkage editor statements.
* NAME: SCLMTST1 * DESC: LINK EDIT CONTROL (LEC) ARCHDEF FOR COBOL * INCLD SCLMTST1 SOURCE * CREATE OBJECT LOAD SCLMTST1 LOADLIB * CREATE LOAD MODULE LMAP SCLMTST1 LMAP * LINK-EDIT LISTING The above ARCHDEF is an LEC ARCHDEF. The INCLD keyword specifies the source program to be compiled and linked into the load module. The source is stored in the SOURCE type. The name of the load module is specified with the LOAD statement and is stored into the LOADLIB type. LMAP points to the link listing and is stored in the LMAP type.
Example 5-5 Example DB2 LEC ARCHDEF for a batch program
* NAME: SCLMTST2 * DESC: HIGH LEVEL (HL) ARCHDEF FOR COBOL DB2 * INCL SCLMTST2 LECDEF * COMPILE AND LINK INCLD SCLMTST2 BIND * INITIATE DB2 BINDS The above ARCHDEF is a special high-level ARCHDEF. It is for a DB2 program and a DB2 program needs to have two functions performed for it, a build and a bind. If you have set up SCLM to have binds controlled from an ARCHDEF, then you should have set up your ARCHDEF similar to this.
139
This ARCHDEF includes the control members for the two functions that are to be performed, an LECDEF member to perform the build and a BIND member to perform the BIND. Normally high-level ARCHDEFs by convention are not stored in the ARCHDEF type, but rather in another type such as the PACKAGE type. In this case this high-level ARCHDEF is used to build a single load module as are LEC ARCHDEFs, and when built, it performs all necessary actions for the DB2 programs, the build and the bind. Therefore we decided to include the DB2 ARCHDEFs in the ARCHDEF type. This is where the developers expect to find all the members to build single load modules, as shown in Example 5-6.
Example 5-6 Example DB2 LEC ARCHDEF for a online program
* NAME: SCLMTST3 * DESC: HIGH LEVEL (HL) ARCHDEF FOR ONLINE COBOL DB2 * INCL SCLMTST3 LECDEF * COMPILE AND LINK INCLD SCLMTST3 BIND * INITIATE DB2 BINDS The foregoing exampleis also a special DB2 high-level ARCHDEF, but it is for an ONLINE program. The ONLINE differences are specified in the LECDEF member as shown in Example 5-7.
Example 5-7 Example LEC ARCHDEF for a ONLINE program
* NAME: SCLMTST4 * DESC: LINK EDIT CONTROL (LEC) ARCHDEF FOR ONLINE COBOL * INCL SCLMTST4 CCDEF * CREATE OBJECT LOAD SCLMTST4 CICSLOAD * CREATE LOAD MODULE LMAP SCLMTST4 LMAP * LINK-EDIT LISTING COPY CICSLINK ARCHDEF * CICS INTERFACE LKED LE370C The above ARCHDEF is an LEC ARCHDEF for an online (CICS) program. This ARCHDEF has one new feature, which is an include for a CCDEF. Compare how the line for the CCDEF is coded versus the first ARCHDEF above, which has an INCLD statement to bring in the source. Whenever you need to code a CCDEF to override a compile PARM, you must change the ARCHDEF to point to it. Change the INCLD that includes the SOURCE to an INCL for the CCDEF. This ARCHDEF also has two additional statements. The COPY statement includes a common ARCHDEF that includes statements that must be included into each CICS program. These include the CMD statement that links in the CICS interface module. The ARCHDEFs referenced by the COPY statements are documented below. The LKED statement specifies that the LE370C link language is to be used to link this member instead of the default LE370 link language. LE370C is identical to LE370 except that it has the CICS load libraries in the SYSLIB concatenation.
140
* NAME: SCLMTST2 * DESC: LINK EDIT CONTROL (LEC) ARCHDEF FOR COBOL DB2 * INCLD SCLMTST2 SOURCE * CREATE OBJECT LOAD SCLMTST2 LOADLIB * CREATE LOAD MODULE LMAP SCLMTST2 LMAP * LINK-EDIT LISTING COPY DB2LINK ARCHDEF * DB2 INTERFACE LKED LE370DB The above ARCHDEF is an LEC ARCHDEF for a DB2 program. Its only difference compared to the first ARCHDEF is that this ARCHDEF has two additional statements. The COPY statement includes a common ARCHDEF that includes statements that must be included into each batch DB2 program. These include the CMD statement that call the INCLUDE statement to link in the DB2 interface module. The LKED statement specifies that the LE370D link language is to be used to link this member instead of the default LE370 link language. LE370D is identical to LE370 except that it has the DB2 load libraries in the SYSLIB concatenation as shown in Example 5-9.
Example 5-9 Example LEC ARCHDEF for a online DB2 program stored in the LECDEF type
* NAME: SCLMTST3 * DESC: LINK EDIT CONTROL (LEC) ARCHDEF FOR ONLINE COBOL DB2 * INCL SCLMTST3 CCDEF * CREATE OBJECT LOAD SCLMTST3 CICSLOAD * CREATE LOAD MODULE LMAP SCLMTST3 LMAP * LINK-EDIT LISTING COPY DB2CLINK ARCHDEF * DB2 INTERFACE FOR CICS COPY CICSLINK ARCHDEF * CICS INTERFACE LKED LE370DC The above ARCHDEF is an LEC ARCHDEF for an online (CICS) DB2 program. This ARCHDEF also has a include for a CCDEF. In addition, the COPY statements includes the common ARCHDEFs that includes statements that must be included into each CICS / DB2 program. These include the CMD statement that links in the CICS interface and the DB2 CICS interface for DB2 modules. The LKED statement specifies that the LE370DC link language is to be used to link this member instead of the default LE370 link language. LE370DC is identical to LE370 except that it has the CICS and DB2 load libraries in the SYSLIB concatenation.
141
* comments * SINC memberxx sourcetype OBJ memberxx objectype LIST memberxx listing type OUTx memberxx dbrmlibtype OUTx memberxx othertype PARMx overriding parameters
* * * * *
Just like the other ARCHDEFs, a comment can be included into CCDEFs in two ways, starting a line with a * to make the whole line a comment or adding comment to the end of any line. Do not add comments to PARM statements. The program should be included into the CCDEF ARCHDEF with a SINC of the members source type. The sourcetype variable should be entered as the type where the source member is included.
142
An OBJ statement must be included. Specify the member name and type to save the compile output object. A LIST statement must be included if the language includes the LIST keyref to indicate the name and type to save the compile listing. OUTx statements must be included for all OUTx keyrefs in the language to indicate the name and type to save these outputs. OUT1 is commonly used for DB2 languages for the DBRMLIB output. A PARMx statement can be included to override any compile options in language steps that have a PARMKWD. Specify the correct PARMx for the language step you want to override followed by the parameter value you want to override.
Example CCDEFs
Example 5-11 and Example 5-12 are examples of two CCDEFs. They are the CCDEFs that are called by the two ARCHDEFs above. They are stored in the CCDEF type and are used to override the default DYN compiler parameter.
Example 5-11 Example CCDEF for a DB2 program
* NAME: SCLMTST3 * DESC: COMPILATION CONTROL (CC) ARCHDEF FOR SCLMTST3 * INCL: POINTED TO BY LEC ARCHDEF SCLMTST3 * SINC SCLMTST3 SOURCE OBJ SCLMTST3 OBJ LIST SCLMTST3 SRCLIST OUT1 SCLMTST3 DBRMLIB OUT2 SCLMTST3 SYSDEBUG PARM1 NODYN The example above shows a CCDEF for a DB2 program. If you compare this CCDEF to the one below, you will see that it has a statement for OUT1, while the one below does not. This points out that CCDEFs need to be customized to the language type of the program that the CCDEF is being written for. A CCDEF needs one line for each keyref in the language of the program. The keyref will be the same name as the keyword. In the example above, there are keyrefs for SINC, OBJ, LIST, OUT1 and OUT2 in the COBDB2 language, which is the language of SCLMTST3. After the keyword comes the member name, which is usually the same for each line, but you can rename outputs here by changing the name. After the member name is the SCLM type where the source is located for the SINC statement and the output types for each output. These are usually the same as the default type coded in the language definition, but you can change them if needed to redirect them to another type.
Example 5-12 Example CCDEF for a CICS program
* NAME: SCLMTST4 * DESC: COMPILATION CONTROL (CC) ARCHDEF FOR SCLMTST3 * INCL: POINTED TO BY LEC ARCHDEF SCLMTST4 * SINC SCLMTST4 SOURCE OBJ SCLMTST4 OBJ LIST SCLMTST4 SRCLIST OUT2 SCLMTST4 SYSDEBUG PARM1 NODYN
143
ARCHDEF format
Most architecture definition statements have the format: <keyword> <member> <type> <comment> <keyword> is an SCLM reserved word. See the SCLM Guide and Reference for a complete list of keywords. <member> is the name of a part under SCLM control. <type> is the third qualifier of the PDS where the member resides. <comment> is user information appended to the statement. No special character is required to indicate a comment at the end of a line.
144
INCL
145
146
147
Member COBDB2C: * NAME: XXXXXXXX * DESC: HIGH LEVEL (HL) ARCHDEF FOR ONLINE COBOL DB2 * INCL XXXXXXXX LECDEF * COMPILE AND LINK INCLD XXXXXXXX BIND * INITIATE DB2 BINDS
148
Member COBDB2: * NAME: XXXXXXXX * DESC: COMPILATION CONTROL (CC) ARCHDEF FOR XXXXXXXX * INCL: POINTED TO BY LEC ARCHDEF XXXXXXXX * SINC XXXXXXXX SOURCE OBJ XXXXXXXX OBJ LIST XXXXXXXX SRCLIST OUT1 YYYYYYYY DBRMLIB OUT2 XXXXXXXX SYSDEBUG Member COBDB2C: * NAME: XXXXXXXX * DESC: COMPILATION CONTROL (CC) ARCHDEF FOR XXXXXXXX * INCL: POINTED TO BY LEC ARCHDEF XXXXXXXX * SINC XXXXXXXX SOURCE OBJ XXXXXXXX OBJ LIST XXXXXXXX SRCLIST OUT1 XXXXXXXX DBRMLIB OUT2 XXXXXXXX SYSDEBUG
149
150
Part 2
Part
Using SCLM
In this part of the book, we describe basic usage scenarios. We show you how a developer will edit, build, and promote a program. We discuss program development from a work unit perspective, using SCLMs option to drive the edit, build, and promote from an architecture definition that defines the Unit of Work. We show you some new features in SCLM relating to leaving copybooks behind at the development group and why this can be important to you. To best utilize SCLM, we show you some SCLM best practices relating to a number of topics, including comparing versions, versioning, and administrator responsibilities. We also provide some solutions for handling SCLM issues such as B37/E37 errors and predecessor verification errors. Discussion in the chapters in this part is not designed to replace the SCLM Guide and Reference, but rather to give an overview of the normal processing cycle a developer will take while using SCLM. The SCLM Guide and Reference talks in more depth about aspects of each of the SCLM options.
151
152
Chapter 6.
153
Control Information: . . . SCLM07 (Project high-level qualifier) . . . (Project definition: defaults to project) . . . DEV1 (Defaults to TSO prefix)
Figure 6-1 SCLM Main Menu - Entering project name and development group
Just as in ISPF, it is possible to access members in a number of different ways. You can use option 1 (View) and option 2 (Edit) from the SCLM Main Menu to specify members individually or list the members in a certain type. You can then use option 4 (Build) to compile the member and option 5 (promote) to move the member up the hierarchy. When you are working on a member, though, your normal process will be to Edit, then compile. So rather than jumping from option to option, SCLM provides a member list processing panel similar to ISPF option 3.1. For the following scenarios, we drive all the processing from this member list panel.
154
155
--------------------------------------------------------------------------SCLM Library Utility - Entry Panel Option ===> E blank A M B D E Display member list Browse accounting record Browse build map Browse member Delete member, acct, bmap Edit member V C P U T View member Build member Promote member Update authorization code Transfer ownership
(Blank or pattern for member selection list) . . TAM (T=TEXT, A=ACCT, M=BMAP)
Enter "/" to select option / Hierarchy view / Confirm delete / View processing options for Edit Show Member Description
Figure 6-2 Specify member to add to SCLM
Process . . 3
You are now presented with the SCLM Edit Entry Panel as shown in Figure 6-3 on page 157. You can suppress the display of this panel by deselecting the View processing options for Edit option on SCLM Library Utility Entry Panel shown in Figure 6-2. On the SCLM Edit Entry Panel there are two fields where you can optionally enter information, the Change code and Authorization code fields. A change code is an 8-character identifier used to indicate the reason for an update or modification to a member controlled by SCLM. The change code entered should be externally defined, but can be verified by the user defined change code exits. Change code exits are discussed in Chapter 12, SCLM user exit processing on page 241. An authorization code is an identifier used by SCLM to control authority to update and promote members within a hierarchy. These codes can be used to allow concurrent development without the risk of module collisions (overlaid changes). As we discussed in chapter one, each group in the hierarchy must have at least one authorization code associated with it and if parallel development is needed then additional authorization codes can be defined for a group. The first authorization code defined for a group is its default. An authorization code can be entered on this panel if you want the member to be saved with other than the default authorization code. If your project has multiple development groups and a same named member has already been saved in another development group using the default authorization code then you must enter one of the additional defined authorization codes in order to enter the edit session. Pressing Enter on the SCLM Edit Entry Panel takes you into the standard ISPF editor where you can code the module you need. You can at this time use any of the normal tools that ISPF provides to copy in code from a data set external to SCLM, or use ISPF cut and paste to bring code in. 156
A Practical Guide to Setting Up and Using SCLM
--------------------------------------------------------------------------SCLM Edit - Entry Panel Command ===> SCLM Library: Project . . Group . . . Type . . . Member . .
: : . .
SCLM07 DEV1 . . . TEST . . . PROD . . . COBOL STARTAPP (Blank or pattern for member selection list)
Initial Macro . . Profile Name . . . Options / Confirm Cancel/Move/Replace Mixed Mode Edit on Workstation Preserve VB record length Change code . . . . . . Authorization code . . Parser Volume . . . . .
Figure 6-3 SCLM Edit - Entry Panel
(If blank, the default auth code is used) (If blank, the default volume is used)
Once you have finished editing the member, you can press PF3 to save it, or type save on the command line. At this time SCLM needs to know some additional information about the member. Primarily you need to associate the member with a language. The language is one of the most important aspects of SCLM, as it is the language that dictates how a member will be processed during build (compile) and promote processing. Your SCLM administrator will have set up a number of languages for use in your SCLM project, which invoke, for example, the COBOL compiler. Select the language that is appropriate for the member you are saving as shown in Figure 6-4. ____________________________________________________________________ SCLM Edit Profile Command ===> SCLM Library: SCLM07.DEV1.COBOL Member: STARTAPP Press the Enter key with the language field blank to view a list of valid languages or enter the desired values and press Enter. Enter the Cancel command to exit with no change. Language . . . . COBDT Change code . . Description . . COBOL II WITH DEBUG TOOL SIDEFILE (Use "=" to retrieve last entry)
157
Pressing Enter when the language is blank displays a list of languages that have been set up by your SCLM administrator. From z/OS version 1.8 onwards, or by applying the appropriate PTF that applies APAR OAxxxxx, a language description is also available to make selection of the appropriate language easier as shown in Figure 6-5. Select one of the following valid languages for member in Project SCLM07 Language Description -------- -------------------------------------ARCHDEF ARCHITECTURE DEFINITION CICSCBE ENTERPRISE COBOL WITH CICS CICSPLE ENTERPRISE PL/I WITH CICS COBDT COBOL II WITH DEBUG TOOL SIDEFILE COBE ENTERPRISE COBOL COB2 COBOL II COB3DB2 ENTERPRISE COBOL WITH DB2 HLAS OS/VS HIGH LEVEL ASSEMBLER PLEDB2 PLI ENTERPRIZE WITH DB2 PLIDB2X PLIE ENTERPRISE PL/I TEXT UNTRANSLATED TEXT ******************************* Bottom of data ********************************
Figure 6-5 List of available languages
S -
Once saved, the SCLM Member List panel is displayed where the member you have just worked on is listed along with some statistical information. The list of available options is displayed on the panel also, so you can work on a number of members directly from this member list. In the panel shown in Figure 6-6 there are three columns shown labeled Text, Account and Bld Map. These tell us certain information about the member. The Text refers to the location of the physical member source in the SCLM hierarchy. For a new member this will be the development group specified. The Account refers to the location of the SCLM accounting information or Meta-data. This is additional information SCLM stores about the member for configuration purposes. The final column, Bld Map, relates to the build map. The build map is some additional SCLM information that is stored that relates generated outputs, such as OBJ and LIST, to the source they were generated from. ___________________________________________________________________________ Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Member 1 of 1 Command ===> Scroll ===> CSR A=Account V=View M=Map C=Build B=Browse P=Promote D=Delete U=Update E=Edit T=Transfer
Member Status Text Chg Date Chg Time Account Bld Map STARTAPP DEV1 2006/11/15 05:33:15 DEV1 ******************************* Bottom of data ********************************
Figure 6-6 SCLM Member List
158
(Blank or pattern for member selection list) . . TAM (T=TEXT, A=ACCT, M=BMAP)
Enter "/" to select option / Hierarchy view / Confirm delete / View processing options for Edit Show Member Description
Figure 6-7 List members to edit
Process . . 3
Press Enter and a list of members that met the specified pattern are displayed as shown in Figure 6-8. SCLM looks for members matching the specified criteria starting at the specified development group and looking up the SCLM project hierarchy until a match is found. If you only wish to search for members in the group specified then uncheck the Hierarchy View option on the SCLM Library Utility panel shown in Figure 6-7. In the member list panel shown below, there are three columns labeled Text, Account and Bld Map. These tell us certain information about the member. The Text refers to the location of the physical member source in the SCLM hierarchy. In the example shown the source for this program is currently stored in the PROD group in the hierarchy. The Account refers to the location of the SCLM accounting information or meta-data. This is additional information SCLM stores about the member for configuration purposes. The final column Bld Map relates to the build map. The build map is some additional SCLM information that is stored that relates generated outputs, such as OBJ and LIST, to the source they were generated from. Information on build maps is covered in Building members in SCLM on page 167.
159
--------------------------------------------------------------------------Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Member 1 of 2 Command ===> Scroll ===> CSR A=Account V=View M=Map C=Build B=Browse P=Promote D=Delete U=Update E=Edit T=Transfer
Member Status Text Chg Date Chg Time Account Bld Map PRINTAPP PROD 2006/11/15 07:07:17 PROD PROD STARTAPP PROD 2006/11/15 05:33:15 PROD PROD ******************************* Bottom of data ********************************
Figure 6-8 List of members that met specified criteria
To work on a member, enter E next to the required member and press Enter. The SCLM Edit Entry Panel as shown in Figure 6-3 on page 157 is displayed, where you can optionally enter a change code and authorization code as we discussed previously. Press Enter again and you are presented with the member for you to begin work on. Once you have finished editing, press PF3 or type save to save the member. When you press PF3 you are taken back to the member list panel where the information presented has ben updated to show the new location of the member in the hierarchy. As you have saved the member SCLM took a copy and saved it in the development group, plus updated the SCLM accounting information to reflect this. This is shown in Figure 6-9. --------------------------------------------------------------------------Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Member 1 of 2 Command ===> Scroll ===> CSR A=Account V=View M=Map C=Build B=Browse P=Promote D=Delete U=Update E=Edit T=Transfer
Member Status Text Chg Date Chg Time Account Bld Map PRINTAPP *EDITED DEV1 2006/11/15 07:42:13 DEV1 PROD STARTAPP PROD 2006/11/15 05:33:15 PROD PROD ******************************* Bottom of data ********************************
Figure 6-9 Status updated once a member has been edited
The build map is still shown as being at PROD, as you have not built the member yet to reflect your changes. Information on the build process is covered in Building members in SCLM on page 167.
160
This list of dependencies is used by SCLM at build time. If you change a copybook and then build an architecture definition that includes all of your applications, SCLM will know all of the source members that include that copybook and will therefore build them. The build process is discussed in more depth in Building members in SCLM on page 167.
SPROF command
The SPROF command is mostly used to change the language of a member. For example, you may have added some CICS or DB2 calls to a certain member, so the language will need to change to ensure that the required compile processes are called. It is also possible to add a member description that is then associated with the member. When the SPROF command is entered, the SPROF panel shown in Figure 6-4 is displayed. Utilizing member description is discussed in the following sections.
SCREATE command
The SCREATE command is similar to the ISPF create command. SCLM will create a copy of the member with the new name specified in the development group you are working in. SCLM creates the account information for the member also, so the member will have the same language assigned to it as the member it was created from. To use the SCREATE command, you do not need to specify the CC line commands as you do in ISPF create.
SMOVE command
The SMOVE command is similar to the ISPF move command. It will move an existing SCLM controlled member into the current member and then delete the existing member and its accounting information from SCLM.
SREPLACE command
The SREPLACE is similar to the ISPF replace command. It allows you to replace an existing SCLM member in the current development group. If the member you are replacing does not exist in the development group, but exists higher in the hierarchy, then SCLM will not create a development version of the member.
161
3. Enter a valid COMPARE command on the command line: Enter COMPARE with no operands to set options for the COMPARE command. The Edit Compare Settings panel is displayed. This panel enables you to customize the comparison by selecting the relevant SuperC options to use. Enter COMPARE SESSION or COMPARE * to compare the changes you have made to the edit data since the beginning of the edit session or since the last SAVE command. Enter COMPARE NEXT to compare this member to the next same named member higher in the hierarchy. Enter COMPARE pdsname to compare against a member that exists in another PDS (in or out of SCLM). Replace pdsname with the actual data set name. This command can be very useful when you want to compare your member to a member from a separate leg of the SCLM hierarchy. In this case the pdsname would be the fully qualified SCLM data set in the other leg. Enter COMPARE pdsname X to show only lines that are different between the two members. 4. Merge the lines from the two compared members as needed: Edit/Compare colors all lines in white that exist in the compare target member but do not exist in the member being edited. These lines can be merged into the member being edited with the MD (Make Data) line command. Just type MD next to lines you want to merge into your edit session. Use MDD to block several lines to merge. Use MD9999 on the first line to merge all lines in the member. Enter the locate command L SPECIAL NEXT to locate the next line for merge consideration. These are the lines colored in white. 5. Locate the lines in your member that are not in the compared to member: All blue lines represent lines in the member being edited that do not exist in the compare target member. Enter the locate command L LABEL to locate the next line in blue not found in the compare target member.
Each character can only be used once. The order of the characters determines the order of the data on the member list. This option limits the type of data that appears with each member on the list, and only members that have the types of data specified will appear. For example, a member that only has text will not appear if the string AM is specified. All types of data that exist for a member at a particular level are subject to processing by library utility commands. 162
A Practical Guide to Setting Up and Using SCLM
If only two types of data are specified and one of those is A (accounting), the language associated with the member will also be displayed. If only A is specified, both the language and authorization code will be displayed. Seeing the language at a glance can be a desirable option. In the previous examples of this panel we have used TAM to display Text, Accounting, and Build Map locations. Figure 6-10 shows the member list when only the A (Accounting) and T (Text) options are used. -----------------------------------------------------------------------------Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Member 1 of 12 Command ===> Scroll ===> CSR A=Account V=View M=Map C=Build B=Browse P=Promote D=Delete U=Update E=Edit T=Transfer
Member Status Account Language Text Chg Date Chg Time BILLINGP PROD COBE PROD 2007/01/13 16:17:33 CBLDBGEX PROD COBE PROD 2007/01/13 16:25:38 ENTCOB1 DEV1 COBE DEV1 2007/01/14 20:08:18 PETER1 DEV1 COBE DEV1 2007/01/11 21:49:40 PETER2 DEV1 CBCID2DT DEV1 2007/01/03 01:20:39 PRINTAPP PROD COBEDT PROD 2007/01/13 16:17:19 RDBKC01 DEV1 CBCID2DT DEV1 2007/01/28 16:22:28 RDBKC02 DEV1 COBCICD2 DEV1 2006/11/23 01:38:53 SCLMTST1 DEV1 CBCID2DT DEV1 2007/01/11 05:08:30 SCLMTST2 DEV1 CBCID2DT DEV1 2007/01/11 05:08:46 STARTAPP DEV1 COBEDT DEV1 2007/01/20 13:30:20 VCMSCLM DEV1 COBE DEV1 2006/12/23 06:01:59 ******************************* Bottom of data ********************************
Figure 6-10 Member list when AT options used
Hierarchy view
If this option is not selected, then only members from the group you have specified on the panel will be listed. If you are going to be editing members, and they reside further up the hierarchy then you should select this option so that SCLM selects as input the library entered on the panel, as well as all the libraries in its hierarchy view. The hierarchy is searched from the bottom up for the first occurrence of the specified member(s) matching the pattern you have specified.
163
To see this member description when you are listing members in a certain type, there is an option on the SCLM Library Utility Entry Panel shown in Figure 6-7 on page 159, which is the Show Member Description option. By entering a / next to this option, when the member list is displayed, the member descriptions will also be shown. This can be seen in Figure 6-12. -----------------------------------------------------------------------------Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Member 1 of 2 Command ===> Scroll ===> CSR A=Account V=View Member M=Map C=Build Status B=Browse P=Promote Account Language D=Delete U=Update Text E=Edit T=Transfer Chg Date Chg Time
RDBKC01 DEV1 CBCID2DT DEV1 2007/01/28 16:22:28 Display book number and description RDBKC02 DEV1 COBCICD2 DEV1 2006/11/23 01:38:53 Program to list available manuals ******************************* Bottom of data ********************************
Figure 6-12 Member list showing member description
164
The second use of changing a authorization code is if the member has been edited using a alternate authorization code and the alternate authorization code is non-promotable. You can then change the members authorization code to the default authorization code so that it will be promotable. In Figure 6-14 is the message you will get if you try to promote the member without updating its authorization code to the promotable one. FLM05001 - EXISTING MEMBER'S AUTHORIZATION CODE IS NOT DEFINED TO THE GROUP GROUP: TEST TYPE: COBOL MEMBER: PETER1 ERROR GROUP: TEST AUTHORIZATION CODE: D
Figure 6-14 Authorization code promote error
165
This means that the authorization code, D, is not defined for the to group, TEST. SCLM will stop the promote. The Update Authorization code function of the library utility will need to be used to update the authorization code to match the authorization code of the to group. In our example that would be from D to P, which is defined for the TEST group. An error could occur when you try to update the authorization code. You might get a predecessor verification error as shown in Figure 6-15. Basically, this error means that the member in the TEST group has changes that need to be merged into the version that you are trying to change the authorization code for. SCLM keeps track of change dates and times so that it knows if a member has been changed elsewhere in the hierarchy. It does this so that if a member is moved ahead of a same named member in the hierarchy it can inform the user of the same named member to merge the code changes between the two versions of the members. In the example, two developers were working on the same program, one in DEV1 using the D authorization code and one in DEV2 using the promotable, P, authorization code. They made independent changes to the program and the DEV2 version was promoted to the TEST group. Now, when the user attempts to update the DEV1 programs authorization code to P, they get the predecessor error. FLM05002 - PREDECESSOR VERIFICATION FAILED INPUT GROUP : DEV1 TYPE: COBOL MEMBER: PETER1 ERROR GROUP1: DEV1 DATE: 2006/12/14 TIME: 03:42:06 ERROR GROUP2: TEST DATE: 2007/01/11 TIME: 20:52:56
Figure 6-15 Predecessor Verification error when attempting to change a authorization code
To fix this problem, the user needs to: 1. Use the Edit Compare function to merge the changes from the TEST version into the DEV1 version. 2. Perform a force migration on the member to synchronize the accounting records. Use the SCLM Migration Utility to perform this function. This utility is the third option on the SCLM utilities panel. Do not use a wildcard for the member name. No language needs to be specified. Select Mode 3 to force the migration. Figure 6-16 shows the messages you will receive when you perform the forced migration. FLM32501 - INVOKING MIGRATION UTILITY FLM32101 - MIGRATION UTILITY INITIATED - 14:21:41 ON 2001/11/07 FLM32304 - WARNING, A NEW ACCOUNTING RECORD WILL BE GENERATED FOR MEMBER: PETER1 GROUP: DEV1 TYPE: COBOL BASED ON THE ACCOUNTING RECORD AT GROUP: TEST. CHANGES MAY NEED TO BE MERGED BEFORE PROMOTING THE MEMBER. FLM06501 - TRANSLATOR RETURN CODE FROM ===> SCLM COBOL PARSE ===> 0 FLM87107 - SAVE WARNINGS FOR MEMBER PETER1 AT 14:21:43, CODE: 4 FLM32401 - MIGRATION UTILITY COMPLETED - 14:21:43 ON 2001/11/07 FLM09008 - RETURN CODE = 4
Figure 6-16 Output of migration utility for a forced migration
166
Chapter 7.
167
: . . .
Enter "/" to select option / Error Listings only Workstation Build Scope . . . 2 1. 2. 3. 4. Limited Normal Subunit Extended
Mode
. . 1
1. 2. 3. 4.
Output control: Ex Messages . . 1 Report . . . 3 Listings . . 3 Process . . 2 1. 2. 3. 4. Terminal Printer Data set None 1. Execute 2. Submit
Printer . . H Volume . .
The build process can be run foreground or background, although your installation may have disabled the foreground capabilities due to site standards. For a build, you as a developer will not have to specify any compiler options. These will all have been defined by your SCLM Administrator in the language translators. There is a possibility for overriding compiler option through what is called a CC (compilation control) architecture definition, but for most installations these are not required. The build options should not need to be modified; however, you might want to change where the output is sent. There are three types of output from the build: Build messages: These messages give you a status as SCLM processes through the build. It will contain messages indicating the time the build starts and finishes. Additionally, each build step that is in the language definition will be listed in the messages with a return code from that step. Your SCLM Administrator might have given each of these steps a meaningful name to help you identify what processing is being performed.
168
Build report: The Build report contains a list of the outputs that were generated as part of the build. The report also lists as build map entries updated. Additionally the build report will give the reason for rebuild. This can be very important if you start a build of an architecture definition and SCLM starts building something you did not expect. If you check the reason for rebuild, there will probably be a copybook or include listed that someone else has changed, but your program uses. Build listing: The build listing is the output from the compiler or build process you are running. Default behavior is not to create the build listing file if there are no errors. However, this does not mean that the listing is not created and stored in SCLM. For example, if there is a compile error and you run the build in foreground, SCLM will automatically place you in browse on the listing detailing the errors. If you would like to see the compile output directly after the build, you can by removing the / on Error Listings only on the build entry panel shown previously. Additionally, the mode of build is very important. The build defaults to conditional and as such, for normal operation this is what you should use. However, you need to be aware of all the build modes and what implications they have: Conditional: The build will stop once the first error is encountered. This is the default behavior. Unconditional: This option will work the same way as conditional if a single source is being built. However, if a high level ARCHDEF is being built that is going to involve the compilation of multiple members then unconditional continues to build all the members even when errors are found. This option is useful when migrating many modules into SCLM and you know that most are going to compile OK. Rather than stopping after each and every error, you can see what all the compile errors are in one go. For example, many modules may have a common copybook missing. With SCLM you just need to invoke the build of the ARCHDEF again and SCLM will only do what has to be retried. Any previously successfully built modules will not be attempted again. Forced: Be careful using forced build. SCLM will rebuild everything in the scope of the member selected for build. This is not a problem if a source member is force built as the behavior will be the same as for conditional or unconditional. However, if a high level ARCHDEF is selected to be force built, every single piece of source in the scope of that high level ARCHDEF will be recompiled. There may be times when a force build is necessary, however. If, for example, there are some external includes (external to the SCLM project) that have changed that you need to pick up, then a forced build could be what you need. Note: If there is an external product that has includes that all your programs need to pick up, then you can approach this situation in one of two ways. Force build a high level ARCHDEF that encompasses the scope of all the modules you need to rebuild Get your SCLM administrator to change the version on the FLMLANGL for all language definitions that include the common includes. Then conditionally build a high level ARCHDEF that encompasses the scope of all the modules you need to rebuild. Any modules with a language that relates to the language definition that has had its version changed will be rebuilt.
Chapter 7. Building members in SCLM
169
Report: Report mode build will run through SCLMs build verification to work out what is going to be built based on the scope of the member selected for build. You can see if you are going to rebuild the whole project because someone has changed a common copybook used by every module in the project. This is a useful reporting tool if you are unsure of the implications of a change you have made to a copybook or common subroutine. If you are running build foreground, it is preferable to have the messages return to the terminal while sending the report and listing to data set. When running in batch you can chose to have the output go to data sets or be returned in the job output. Pressing Enter will invoke the build. If running the build in foreground you can see the progress via the build messages as shown in Figure 7-2. If running in batch, this is also produced in the BLDMSGS DD. FLM49000 FLM09002 FLM09006 FLM42000 FLM44500 FLM06501 FLM06501 FLM06501 FLM46000 FLM09008 INVOKING BUILD PROCESSOR THE BUILD REPORT WILL APPEAR IN DOHERTL.BUILD.REPORT23 THE BUILD LISTING WILL APPEAR IN DOHERTL.BUILD.LIST23 BUILD PROCESSOR INITIATED - 03:38:57 ON 2006/11/18 >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: COBOL MEMBER: TRANSLATOR RETURN CODE FROM ===> ALLOC SYSDEBUG ===> TRANSLATOR RETURN CODE FROM ===> COBOL II COMPILE ===> TRANSLATOR RETURN CODE FROM ===> COPY SYSDEBUG ===> BUILD PROCESSOR COMPLETED - 03:38:59 ON 2006/11/18 RETURN CODE = 0
STARTAPP 0 0 0
The Build report, whether you have directed it to a data set, to the terminal or to the batch job output, will contain information on what was created and why the build occurred. This can be seen in Figure 7-3. This build of this COBOL program created an OBJ, a listing, and a Debug Tool sidefile. The reason the rebuild occurred was because a change was made to the STARTCPY member in the COPYBOOK library. ******************************************************************************* ******* B U I L D O U T P U T S G E N E R A T E D ******* Page 1 MEMBER -----STARTAPP STARTAPP STARTAPP TYPE VERSION KEYWORD ---------------OBJ 5 OBJ LIST 5 LIST SYSDEBUG 5 OUTX ******* B U I L D M A P S G E N E R A T E D ******* (REASON FOR MEMBER ------STARTCPY REBUILD) TYPE ---COPYBOOK
Page 2
MEMBER -----STARTAPP
TYPE ---COBOL
VERSION ------5
170
File Edit Edit_Settings Menu Build SCLM Utilities Test Help -------------------------------- .-------------------------------------. -----EDIT SCLM07.DEV1.COBOL(STA | 1 1. Save and Build Current Member | 00072 Command ===> | 2. Build Current Member | CSR ****** ************************* | 3. Save and Display Build Panel | ****** 000100 000100* ----------------- | 4. Display Build Panel | 000200 000200* IDE Sample Pro '-------------------------------------' 000300 000300* --------------------------------------------------000400 000400 Identification Division. 000500 000500 Program-ID. StartApp. 000600 000600 000700 000700 Data Division. 000800 000800 Working-Storage Section.
Figure 7-4 Build invocation from within edit
Note: Be careful when building from within edit, or directly building a source member. The build may have unintended consequences, as it will run any build exits that are defined to the project something that you might not want to occur. For example, if you have a user exit that does a bind when a new DBRMLIB is created, a build of a COBOL source member that contains DB2 statements will create the DBRM, and the user exit will then do a bind. But as you are not building a large enough scope, in this case the linkedit control ARCHDEF, the linkedit is not performed, so the existing load module cannot be run, because it will get a DB2 -805 or -818 error.
171
* * Include statement for STARTAPP application * INCLD STARTAPP COBOL * Include COBOL member STARTAPP INCLD PRINTAPP COBOL * Include COBOL member PRINTAPP * * LOAD statements * LOAD STARTAPP LOAD * Load module name STARTAPP LMAP STARTAPP LMAP * Linkedit listing stored in type LMAP
Figure 7-5 LEC architecture definition
This architecture definition will build your load module using the default options in the linkage editor translator your SCLM administrator has set up. But any standard linkage editor options can be incorporated into a LEC ARCHDEF by using SCLMs supplied parameters. For example, a slightly more complicated LEC ARCHDEF can be seen in Figure 7-6. * * Include statement for BWBBLD executable module * INCLD BWBBLD SOURCE * Include source member BWBBLD INCLD BWBCOPYR SOURCE * Include copyright source member BWBCOPYR * * Linkedit command statements * CMD ORDER BWBCOPYR * Place BWBCOPYR at front of load module CMD ENTRY BWBBLD * Set entry point to BWBBLD * * LOAD statements * LOAD BWBBLD LOAD * Load module name BWBBLD LMAP BWBBLD LMAP * Linkedit listing stored in type LMAP
Figure 7-6 LEC ARCHDEF incorporating standard linkage editor statements
In the above example, the load module consists of two modules. The copyright module BWBCOPYR must come first, however, the entry point must be BWBBLD. Additionally, linkage options such as AMODE and RMODE can be overridden. This is shown in Figure 7-7.
172
* * Use LE370X language translator rather than default LE370 * LKED LE370X * * Include statement for JCOBPGM executable module * INCLD JCOBPGM2 COBOL * Include COBOL member JCOBPGM2 INCLD JCOBPGM COBOL * Include COBOL member JCOBPGM * * External Includes for JCOBPGM executable module * CMD INCLUDE SYSLIB(DFHELII) * External Include for CICS stub DFHELII CMD INCLUDE SYSLIB(EZACICAL) * External Include for EZACICAL * * LOAD statements * LOAD JCOBPGM LOAD * Load module name JCOBPGM LMAP JCOBPGM LMAP * Linkedit listing stored in type LMAP * * Linkedit statements to override language translator defaults * PARM MAP,RENT,AMODE=31,RMODE=ANY
Figure 7-7 LEC ARCHDEF incorporating linkage editor options override statements
In the foregoing example there are two modules not under SCLM control that are being included, DFHELII and EZACICAL. These two modules will be included from the SYSLIB concatenation that is defined in the language translator. Two modules are included from the SCLM hierarchy, JCOBPGM2 and JCOBPGM. The standard linkage editor statements are overridden with the PARM statement. Finally the LKED statement is used to tell SCLM to use a different language translator, in this case LE370X, instead of the standard default language translator for link-editing, LE370. Your SCLM Administrator will have set this up. When an architecture member is built the process is the same as though you are building a source member. SCLM uses its dependency checking along with the ARCHDEF to decide what needs to be built. For example, if we take the previous example of just changing a copybook and then building the ARCHDEF we see, through the SCLM messages shown in Figure 7-8, that SCLM knows to recompile the program containing the copybook and then relink the load module containing the program.
173
FLM49000 FLM09002 FLM09006 FLM42000 FLM44500 FLM06501 FLM06501 FLM06501 FLM44500 FLM06501 FLM46000 FLM09008
INVOKING BUILD PROCESSOR THE BUILD REPORT WILL APPEAR IN DOHERTL.BUILD.REPORT30 THE BUILD LISTING WILL APPEAR IN DOHERTL.BUILD.LIST30 BUILD PROCESSOR INITIATED - 06:07:56 ON 2006/11/18 >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: COBOL MEMBER: STARTAPP TRANSLATOR RETURN CODE FROM ===> ALLOC SYSDEBUG ===> 0 TRANSLATOR RETURN CODE FROM ===> COBOL II COMPILE ===> 0 TRANSLATOR RETURN CODE FROM ===> COPY SYSDEBUG ===> 0 >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: ARCHLEC MEMBER: STARTAPP TRANSLATOR RETURN CODE FROM ===> LKED/370 ===> 0 BUILD PROCESSOR COMPLETED - 06:07:59 ON 2006/11/18 RETURN CODE = 0
Once again, the build report will tell you what has been generated as part of this build and what was the reason for rebuild. This is shown in Figure 7-9, where you see that this time as well as the OBJ, listing, and debug sidefile, that the load and the LMAP are also created. The reason for rebuild shows us that the STARTAPP COBOL program was rebuilt because the STARTCPY COPYBOOK was changed. Then the STARTAPP ARCHLEC was built because the STARTAPP COBOL member was rebuilt. **************************************************************************** ******* B U I L D O U T P U T S G E N E R A T E D ******* Page 1 MEMBER -----STARTAPP STARTAPP STARTAPP STARTAPP STARTAPP TYPE VERSION KEYWORD ---------------OBJ 7 OBJ LIST 7 LIST SYSDEBUG 7 OUTX LOAD 3 LOAD LMAP 3 LMAP ******* B U I L D M A P S G E N E R A T E D ******* REBUILD) TYPE ---COBOL COPYBOOK L E T E D
Page 2
(REASON FOR MEMBER TYPE VERSION MEMBER --------------------STARTAPP ARCHLEC 3 STARTAPP STARTAPP COBOL 7 STARTCPY ******* B U I L D O U T P U T S D E
Figure 7-9 Build report from ARCHDEF build
*******
Page 3
For more information on architecture definition members, see Chapter 5, SCLM architecture definition considerations on page 135.
174
* CONSTANT NAME VALUE TABLE GENERATOR * SCLM CODE * SCLM NLS - ENGLISH
Again, building these high level architecture definitions is no different than building LEC ARCHDEFs or source. All you are doing is increasing the scope that SCLM will check for what it needs to build. Of course you should realize that the greater the scope, the longer SCLM will take to start performing the builds. SCLM is intelligent enough to know that even if you have only changed one module, and you make the scope the highest possible ARCHDEF, then that is the only module that will need to be recompiled and relinked. Here, we take our application used previously and create a high level ARCHDEF called ALLAPPL that pulls together the STARTAPP program and the BILLING program as shown in Figure 7-12. High level ARCHDEFs are identified by the fact that they use the INCL statement to include other high level ARCHDEFs. INCL INCL STARTAPP ARCHDEF BILLING ARCHDEF * Include STARTAPP ARCHDEF member * Include BILLING ARCHDEF member
Modifying the same copybook again, which is included in both of these applications, we see the result of the build of this high level ARCHDEF in Figure 7-13.
175
FLM49000 FLM09002 FLM09006 FLM42000 FLM44500 FLM06501 FLM06501 FLM06501 FLM44500 FLM06501 FLM06501 FLM06501 FLM44500 FLM06501 FLM44500 FLM06501 FLM46000 FLM09008
- INVOKING BUILD PROCESSOR - THE BUILD REPORT WILL APPEAR IN DOHERTL.BUILD.REPORT32 - THE BUILD LISTING WILL APPEAR IN DOHERTL.BUILD.LIST32 - BUILD PROCESSOR INITIATED - 07:28:59 ON 2006/11/18 - >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: COBOL MEMBER: STARTAPP - TRANSLATOR RETURN CODE FROM ===> ALLOC SYSDEBUG ===> 0 - TRANSLATOR RETURN CODE FROM ===> COBOL II COMPILE ===> 0 - TRANSLATOR RETURN CODE FROM ===> COPY SYSDEBUG ===> 0 - >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: COBOL MEMBER: BILLINGP - TRANSLATOR RETURN CODE FROM ===> ALLOC SYSDEBUG ===> 0 - TRANSLATOR RETURN CODE FROM ===> COBOL II COMPILE ===> 0 - TRANSLATOR RETURN CODE FROM ===> COPY SYSDEBUG ===> 0 - >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: ARCHLEC MEMBER: STARTAPP - TRANSLATOR RETURN CODE FROM ===> LKED/370 ===> 0 - >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: ARCHLEC MEMBER: BILLING - TRANSLATOR RETURN CODE FROM ===> LKED/370 ===> 0 - BUILD PROCESSOR COMPLETED - 07:29:04 ON 2006/11/18 - RETURN CODE = 0
SCLM knows that COPYBOOK STARTCPY is included in both the STARTAPP COBOL program and the BILLINGP COBOL program. By increasing the scope to a high level ARCHDEF, we let SCLM work out what needs to be rebuilt based on the changes made. So in this example, SCLM compiles both source members that include the copybook and link-edits both load modules. The build report is now more extensive as well, as shown in Figure 7-14. For more information on architecture definition members, see Chapter 5, SCLM architecture definition considerations on page 135.
176
*************************************************************************** ******* B U I L D O U T P U T S G E N E R A T E D ******* Page 1 MEMBER -----BILLINGP STARTAPP BILLINGP STARTAPP BILLINGP STARTAPP BILLING STARTAPP BILLING STARTAPP TYPE VERSION KEYWORD ---------------OBJ 2 OBJ OBJ 8 LIST 2 LIST LIST 8 SYSDEBUG 2 OUTX SYSDEBUG 8 LOAD 2 LOAD LOAD 4 LMAP 2 LMAP LMAP 4 ******* B U I L D M A P S G E N E R A T E D ******* (REASON FOR MEMBER ------STARTAPP BILLING BILLINGP STARTAPP STARTCPY STARTCPY REBUILD) TYPE ---ARCHLEC ARCHLEC COBOL COBOL COPYBOOK COPYBOOK
Page 2
VERSION ------2 2 4 2 8
As well as the list of outputs generated, we see the reason for rebuild. Both BILLINGP and STARTAPP COBOL members were recompiled because of the change to the STARTCPY COPYBOOK. This in turn caused the BILLING and STARTAPP ARCHLECs to be rebuilt in order to generate the load modules. Finally, this caused the ALLAPPL build map to be updated as both the BILLING and STARTAPP ARCHLECs were rebuilt.
177
iii. Copy the members over from the old renamed data set. Note: It is safest to use an IEBCOPY job to perform this copy. If you use the ISPF 3.3 Copy, you must change the SCLM Setting from its default value Non-SCLM(2) to SCLM(1). This will ensure that the SCLM control bit is maintained after the copy. Failure to maintain this bit will cause accounting errors for all members copied. 2. A temporary data set created during a build can be allocated too small and the build can abend with a B37 error when the temporary data set fills up. Perform the following steps to fix this problem: a. Find the language of the member that the build is failing on. The BLDMSGS will tell you which member was being built when the build failed. You can then use the Library Utility to find the language of the member. b. Next check BLDMSGS to determine which step (precompile step, compile step, and so on) of the language definition that the build is failing on. The FLM06501 messages will indicate the last good step completed. For example, in Figure 7-15, the DB2 PREPROCESS step completed successfully and the abend occurred in the COBOL FOR MVS step. FLM49000 - INVOKING BUILD PROCESSOR FLM09006 - THE BUILD LISTING WILL APPEAR IN PCECK.BUILD.LIST02 FLM42000 - BUILD PROCESSOR INITIATED - 12:36:39 ON 2007/01/02 FLM44500 - >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: SOURCE MEMBER: PETER1 FLM06501 - TRANSLATOR RETURN CODE FROM ===> DB2 PREPROCESS ===> 4 IEC030I B37-04,IFG0554A,PCECK,SERPROC,SYSPRINT,VIO , ,SYS07002.T123641.RA0 00.PCECK.SYSPRINT.H01 FLM06501 - TRANSLATOR RETURN CODE FROM ===> COBOL FOR MVS ===> 11759616 FLM06503 - PROBABLE SYSTEM/USER ABEND FOR TRANSLATOR: COBOL FOR MVS HEXADECIMAL VALUE OF RETURN CODE: 00B37000 FLM44513 - TRANSLATOR ERROR FOR MEMBER: PETER1 TYPE: SOURCE
Figure 7-15 BLDMSGS showing a B37 space problem from an SCLM Build
c. Next look in the language definition (in projid.PROJDEFS.SOURCE) for the failing step and in that step look for the FLMALLOC of the DDNAME that was associated with the B37 error. In the example above (Figure 7-15) the DDNAME is SYSPRINT. Note that this example is from a foreground build. For a submitted build the B37 error message would be in the JES messages. Here is the FLMALLOC for the failing SYSPRINT allocation for this language: FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=FBA,LRECL=133, RECNUM=1000,PRINT=Y,DFLTTYP=SRCLIST,DDNAME=SYSPRINT C
If the DDNAME is similar to SLxxxx and appears to be system-generated by SCLM, then check the temporary files under FLMALLOC where the IOTYPE is equal to W. For example, here is a FLMALLOC for SYSUT1 in the language above: FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=100000,DDNAME=SYSUT1 d. Finally increase the RECNUM (for the example above from 1000 to 10000), reassemble and link the project definition and try your build again.
178
179
When the change has been tested, the package with the CCODE statement can be used to promote the code while ensuring that the copybook that was changed with CC000002 has been left behind.
normal or build by change code for a development group will store their output in a common dataset, and this can have unintended consequences as we describe next.
Suppose a second developer was working on the changes for CC000002 in the above example and they had just built SCLMTST1 and SCLMTST2 including CC000002 changes and had began testing them in the development load library and then the first developer had built the packages above that only included CC000001 and thus had eliminated all of the output of the members that they had changed with CC000002 from the development group. Now the second developer would be either very upset or very confused when they tried to test their members and discovered that their changes were no longer present. They might then try to build their package that just includes CC000002 and then they would be able to test while the other developer would now be prevented from testing.
This illustrates that to use Build and Promote by Change Code successfully you will either need to coordinate your work with the developers that your build can overlap with or ensure that an overlap can never occur. The only way to ensure that overlap of builds can never
occur is for the developers to work in private SCLM development groups. Then and only then can they control all their build outputs. If private development groups cannot be used, then builds and promotes using CCODEs will need to be carefully coordinated. In a large team that is spread out, this might not be convenient. This is not to say that build and promote by change code should not be used, but rather that it should only be used when it is most advantageous or when it is most needed, and then you can take the proper precautions to use it safely. For example: If a small team is sharing a SCLM development group and they all sit near each other, they could coordinate the use of build by change code. If a developer is using build by change code without coordination, they can immediately copy the load modules they created to private datasets and test there. This way they do not have to worry that their builds will be overwritten. However they still will need to be concerned that simultaneous builds can overwrite each other. If they do another conditional build of their package right after they do their copy and no outputs are created, then they can be sure that programs they just copied are still valid. A copybook that is common to many programs is being enhanced over several days or weeks and during this time one of the programs that includes this unfinished copybook needs to be built and promoted without the unfinished code because it is part of a emergency fix that needs to be promoted immediately or it needs to be tested immediately in the TEST group. In this case build by change code with the EXCLUDE option can be used to exclude the copybook from the build. However the code would need to be immediately promoted out of the development group. It will be mandatory that during the short time of the build and promote that all other developers are notified to not do any builds or promotes. In summary, build and promote by change can be very useful, but it must be used with care by using it in isolation according to one of the techniques discussed above.
180
Chapter 8.
181
: . . .
Enter "/" to select option Workstation Promote Scope . . . 1 1. Normal 2. Subunit 3. Extended
Output control: Ex Sub Messages . . 1 2 Report . . . 3 2 Process . . 1 1. 2. 3. 4. Terminal Printer Data set None 1. Execute 2. Submit
Printer . . H Volume . .
Note: The group on the promote panel always defaults to the group as specified on the hierarchy view panel, or if using option 5 for promote, the specified development group. This prevents accidental promotion from intermediate groups. If you wish to promote from an intermediate group, TEST for example, then you need to overtype the group on the promote panel to the required intermediate group.
182
The promote messages as shown in Figure 8-2 tell you the progress of the promote. SCLM goes through three phases, Verification as discussed above, Copy, and Purge. Copy will copy all of the promotable parts up to the next level of the hierarchy. Once the copy phase is complete, the purge will remove all of the parts from the level being promoted from. FLM59001 FLM09002 FLM51000 FLM52000 FLM55000 FLM57000 FLM57001 FLM58000 FLM09008 INVOKING PROMOTE PROCESSOR THE PROMOTE REPORT WILL APPEAR IN DOHERTL.PROMOTE.REPORT90 PROMOTE PROCESSOR INITIATED - 06:27:19 ON 2006/11/21 INITIATING VERIFICATION PHASE - 06:27:20 ON 2006/11/21 INITIATING COPY PHASE - 06:27:21 ON 2006/11/21 INITIATING PURGE PHASE - 06:27:23 ON 2006/11/21 INITIATING PURGE FROM GROUP: DEV1 PROMOTE PROCESSOR COMPLETED - 06:27:25 ON 2006/11/21 RETURN CODE = 0
The promote report as shown in Figure 8-3 gives you a list of all the parts that have been promoted, with the group they came from and the group they are going to. TYPE: ARCHDEF COPIED TO TEST _________ X PURGED FROM DEV1 ___________ X PAGE TYPE: ARCHLEC COPIED TO TEST _________ X X PURGED FROM DEV1 ___________ X X PAGE TYPE: COBOL COPIED TO TEST _________ X X X PURGED FROM DEV1 ___________ X X X 4 3
MESSAGE ________
MESSAGE ________
MESSAGE ________
183
The mode of the promote can be conditional, unconditional, or report. Report mode is very useful to tell you what is going to be promoted. Additionally, running a promote in report mode prior to the actual promote will inform you if anything has changed in the scope of the object you are promoting, since it was built. For example, one of the objects in the original scope of the promote might have either been edited, or built, thus invalidating the current promote. Unconditional promote should not be used however, as it does not guarantee application integrity. If there are some verification errors in the promote, then you will get a partial promote, so some parts of the application will be promoted while those with verification errors will not. To this end, it is not advisable to use unconditional promote.
184
Chapter 9.
SCLM utilities
In this chapter we describe how you can use some of the utilities that are available in SCLM option 3.
185
(Must contain Architecture Definitions only) (Blank or pattern for member selection list)
Enter "/" to select option / Hierarchy view / Confirm delete Show Member Description / View processing options for Edit / List include members
Figure 9-1 SCLM Unit of Work
Processing mode for build and promote 3 1. Execute 2. Submit 3. View options
Many of the options available are the same as with option 3.1. The main difference is that you have to begin with an architecture definition. This does not mean a data set type of ARCHDEF what this means is that the part you start with must be an architecture definition. An architecture definition is defined by having the macro keyword ARCH=Y on the FLMLANGL macro for the language definition. By default, SCLM uses ARCHDEF as the architecture definition language, but you can, if you wish, define your own. For example, in ISPF/SCLM development there is an SCLM type defined called APARDEF. This is a library that contains the ARCHDEFs that will define what parts are being changed as part of an APAR to fix a problem. The type is APARDEF, but the members contained in this data set all have a language of ARCHDEF. So, to use the example we have been using throughout this chapter, we enter the member name of an architecture definition or select a architecture definition member from a list. In Figure 9-2, selecting an ARCHDEF with an S will cause another list to be built with the contents of that ARCHDEF. Typing E next to an ARCHDEF allows you to edit the ARCHDEF. So you should start your unit of work processing beginning at the highest level ARCHDEF that defines your unit of work.
186
--------------------------------------------------------------------------Work Element List for UOW ALLAPPL in SCLM07 Member 1 of 2 Command ===> Scroll ===> CSR S=Sel/edit E=Edit V=View P=Prom C=Build U=Upd A=Acct M=Map D=Del B=Brws Z=Versions Member Type Status Account Language Chg Date User ALLAPPL ARCHDEF (Current UOW ARCHDEF) BILLING ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL s STARTAPP ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL ******************************* Bottom of data ********************************
Figure 9-2 SCLM UOW - Work element list
The first entry in the list is the current UOW ARCHDEF. The usefulness of this is evident once we drill down to the next level. We select the STARTAPP ARCHLEC, which is the ARCHDEF library we defined to contain the LEC ARCHDEFs for each load module. Now we see the contents of the STARTAPP ARCHLEC which includes all the COBOL source members and the copybooks, as shown in Figure 9-3. Note: One restriction is that the copybooks are not shown if the application has not yet been built. This is because UOW uses the build maps to determine what is in the UOW. If there is no build map, then SCLM will parse the ARCHDEF for the contents, but as there are generally no copybooks listed in the ARCHDEFs, they will not be in the member list is there is no build map.
--------------------------------------------------------------------------Work Element List for UOW STARTAPP in SCLM07 Member 1 of 3 Command ===> Scroll ===> CSR S=Sel/edit E=Edit V=View P=Prom C=Build U=Upd A=Acct M=Map D=Del B=Brws Z=Versions Member Type Status Account Language Chg Date User STARTAPP ARCHLEC (Current UOW ARCHDEF) E PRINTAPP COBOL TEST COBDT 2006/11/15 08:23 DOHERTL STARTAPP COBOL TEST COBDT 2006/11/18 03:44 DOHERTL STARTCPY COPYBOOK TEST TEXT 2006/11/18 07:28 DOHERTL ******************************* Bottom of data ********************************
Figure 9-3 SCLM UOW - Work element list for STARTAPP
At this point we can select or edit the members in the unit of work and make changes to them. This process behaves in the same way as SCLM 3.1. So placing an E next to the PRINTAPP COBOL member will take us into SCLM edit for that member. In option 3.1 of SCLM, when you change a COBOL source, you must go back out to the SCLM Library Utility panel to change the type to ARCHLEC to build the load module to incorporate your changes. That is not necessary from the unit of work panel. As the LEC ARCHDEF is listed as the current UOW on the same panel as the source you can issue the build directly from this panel by placing a C next to the STARTAPP ARCHLEC as shown in Figure 9-4 on page 188.
187
--------------------------------------------------------------------------Work Element List for UOW STARTAPP in SCLM07 Member 1 of 3 Command ===> Scroll ===> CSR S=Sel/edit E=Edit V=View P=Prom C=Build U=Upd A=Acct M=Map D=Del B=Brws Z=Versions Member Type Status Account Language Chg Date User C STARTAPP ARCHLEC (Current UOW ARCHDEF) PRINTAPP COBOL *EDITED DEV1 COBDT 2006/11/21 07:45 DOHERTL STARTAPP COBOL TEST COBDT 2006/11/18 03:44 DOHERTL STARTCPY COPYBOOK TEST TEXT 2006/11/18 07:28 DOHERTL ******************************* Bottom of data ********************************
Figure 9-4 Building an ARCHDEF through UOW work element list
This invokes the standard SCLM build process for the LEC ARCHDEF. So any changes you have made to multiple modules included in the scope of the ARCHDEF are picked up by SCLM and builds are performed for those source modules prior to the build for the load module itself. As you use PF3 to go back through the panels, you can issue builds against the higher level ARCHDEFs if you have them thus ensuring that all the build maps are current prior to issuing a promote. Issuing the promote follows the same process, you select the object you want to promote with a P and the standard SCLM promote process is invoked as shown in Figure 9-5. --------------------------------------------------------------------------Work Element List for UOW ALLAPPL in SCLM07 Member 1 of 2 Command ===> Scroll ===> CSR S=Sel/edit E=Edit V=View P=Prom C=Build U=Upd A=Acct M=Map D=Del B=Brws Z=Versions Member Type Status Account Language Chg Date User P ALLAPPL ARCHDEF (Current UOW ARCHDEF) BILLING ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL STARTAPP ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL ******************************* Bottom of data ********************************
Figure 9-5 Issuing a promote from UOW work element list
188
Adding a deploy facility for when you have created some HTML or REXX that you want to deploy to the HFS. First of all, you have to write the functions that you will want to call from the UOW member list. The first thing to note is the parameters that are passed through to any execs or programs that you write. SCLM will pass through the following parameters: Project name Alternate project name Group of member selected Type of member selected Member name The first of the example options above is to provide a facility to look at the listing that is associated with a source member. This facility is not provided by base SCLM processing, as it is in other SCM products, so to look at a listing you have to select the listing type in option 3.1 and then view the listing. However, the process of getting this information and creating an option in UOW to perform the action is quite straightforward. The REXX code to do this is show in Example 9-1.
Example 9-1 Sample REXX to view listing associated with a source member
/* REXX */ Arg PARM Parse var PARM Proj "," Alt "," Group "," Type "," Member /*--------------------------------------------------------------------*/ /* This exit will get the appropriate listing for the member selected */ /*--------------------------------------------------------------------*/ address ispexec 'CONTROL ERRORS RETURN' 'TBEND BMAPTABL' 'CONTROL ERRORS CANCEL' tbnames = 'NAMES(ZSBKWRD ZSBMEM ZSBTYPE ZSBDATE ZSBTIME ZSBVER ZSBLINE)' 'TBCREATE BMAPTABL' tbnames 'NOWRITE' 'TBVCLEAR BMAPTABL' 'SELECT CMD(FLMCMD GETBLDMP,'||PARM||',BMAPTABL)' If RC = 0 Then Do 'TBTOP BMAPTABL' 'TBSKIP BMAPTABL' Do While (RC = 0) /*-------------------------------------------------------*/ /* If the buildmap keyword is LMAP then the listing is a */ /* link-edit listing, otherwise it is a compile listing */ /*-------------------------------------------------------*/ If ZSBKWRD = 'LMAP' | ZSBKWRD = 'LIST' Then Do Acctparm = Proj","Alt","Group","ZSBTYPE","ZSBMEM Address TSO 'FLMCMD ACCTINFO,'Acctparm If RC = 0 Then Do
Chapter 9. SCLM utilities
189
Address ispexec 'vget (ZSADSN)' REALDSN = Strip(ZSADSN) Address ISPEXEC 'VIEW DATASET('REALDSN'('Strip(ZSBMEM)'))' End Else Say 'ACCTINFO called failed. RC='RC Leave End Else 'TBSKIP BMAPTABL' End 'TBEND BMAPTABL' End Exit The second example above is to provide a means to test the code you have created or changed. For example, if you are creating ISPF panels or REXX execs to test them, you have to split panels and go to option 7 (Dialog Test). It would be easier to edit the member, such as an ISPF panel, and then just run it with a different line command so that it displays so you can verify your changes. Additionally, if the panel is a stand-alone panel where all the processing is done with panel REXX, you can fully test the panel directly from within SCLM. Some sample REXX code to do this is shown in Example 9-2.
Example 9-2 Sample REXX to test the member being worked on
/* REXX */ Arg PARM Parse var PARM Proj "," Alt "," Group "," Type "," Member /*-----------------------------------------------------------------*/ /* This exit will run the required member in the appropriate way */ /*-----------------------------------------------------------------*/ Select /*-----------------------------------------------------------------*/ /* If an ARCHLEC is selected then we need to get the name of the */ /* load module that we will run and run that */ /*-----------------------------------------------------------------*/ When (Type = 'ARCHLEC') Then Do address ispexec 'CONTROL ERRORS RETURN' 'TBEND BMAPTABL' 'CONTROL ERRORS CANCEL' tbnames = 'NAMES(ZSBKWRD ZSBMEM ZSBTYPE ZSBDATE ZSBTIME ZSBVER ZSBLINE)' 'TBCREATE BMAPTABL' tbnames 'NOWRITE' 'TBVCLEAR BMAPTABL' 'SELECT CMD(FLMCMD GETBLDMP,'||PARM||',BMAPTABL)' If RC = 0 Then Do 'TBTOP BMAPTABL' 190
A Practical Guide to Setting Up and Using SCLM
'TBSKIP BMAPTABL' Do While (RC = 0) If ZSBKWRD = 'LOAD' Then Do Acctparm = Proj","Alt","Group","ZSBTYPE","ZSBMEM Address TSO 'FLMCMD ACCTINFO,'Acctparm If RC = 0 Then Do Address ispexec 'vget (ZSADSN)' REALDSN = Strip(ZSADSN) Address TSO 'CALL 'REALDSN'('Strip(ZSBMEM)')' End Else Say 'ACCTINFO called failed. RC='RC Leave End Else 'TBSKIP BMAPTABL' End 'TBEND BMAPTABL' End End /*-----------------------------------------------------------------*/ /* Display the panel. Saves going to Dialog test */ /*-----------------------------------------------------------------*/ When (Type = 'PANELS') Then Do Acctparm = PARM Address TSO 'FLMCMD ACCTINFO,'Acctparm If RC = 0 Then Do Address ispexec 'vget (ZSADSN)' REALDSN = Strip(ZSADSN) Address ISPEXEC "LIBDEF ISPPLIB DATASET ID('"REALDSN"')" Address ISPEXEC 'DISPLAY PANEL('Member')' Do While (RC < 8) Address ISPEXEC 'DISPLAY PANEL('Member')' End If RC > 8 then Do Say ZERRSM Say ZERRLM End Address ISPEXEC "LIBDEF ISPPLIB" End Else Say 'ACCTINFO called failed. RC='RC End /*-----------------------------------------------------------------*/ /* Run a REXX exec */ /*-----------------------------------------------------------------*/ When (Type = 'REXX') then Do Acctparm = PARM Address TSO 'FLMCMD ACCTINFO,'Acctparm
191
If RC = 0 Then Do Address ispexec 'vget (ZSADSN)' REALDSN = Strip(ZSADSN) "ALTLIB ACTIVATE APPLICATION(CLIST) DATASET('"REALDSN"')" Address ISPEXEC 'SELECT CMD('Member')' "ALTLIB DEACTIVATE APPLICATION(CLIST)" End Else Say 'ACCTINFO called failed. RC='RC End Otherwise Say 'No run processing for type 'Type' defined' End Exit The foregoing example only gives the coding for PANELS, REXX, and for running a load module using the CALL statement with no parameters. An example of how this can be expanded would be to provide, for the load module processing, a means to allocate data sets, pass parameters, and submit the test as a batch job. Once we have our processes written, we now add them to our unit of work options list. From the primary UOW entry panel, there is a menu bar pull-down option as shown in Figure 9-6. Menu SCLM Utilities Options Help ---------------------- .--------------------------------. ------------------SCLM U | 3 1. Set UOW Data Set Prefix | Option ===> | 2. Modify SCLM Job Card | | 3. Define UOW List Commands | '--------------------------------' SCLM Library: Project . : SCLM07 Group . . . DEV1 Type . . . . ARCHDEF (Must contain Architecture Definitions only) Member . . . (Blank or pattern for member selection list)
Enter "/" to select option / Hierarchy view / Confirm delete Show Member Description / View processing options for Edit / List include members
Processing mode for build and promote 1 1. Execute 2. Submit 3. View options
192
Select option 3 and you are presented with the panel to enter the commands. You enter the single character command, plus the long name for the command. These will be displayed on the panel. You also enter the name of the function to be called and what type of function it is, such as CMD, PANEL, or PGM. The reason for this is that SCLM issues an ISPF SELECT service call to invoke the function. So the required function must be allocated to the ISPF datasets so that it is found. For example, a CMD must be allocated to SYSPROC or SYSEXEC. The last column you enter is the Status. This is the literal that will be displayed on the panel once the command has been executed. The completed panel for both of our new options is shown in Figure 9-7. Menu SCLM Utilities Options Help -----------------------------------------------------------------------------SCLM Unit Of Work processing - Entry Panel Option ===> SCLMLCL
Enter "/" t / Hierarch / Confirm Show Mem / View pro / List inc
.--------------------------------------------------------. | SCLM Unit of Work List Commands Row 1 to 8 of 8 | | Command ===> | | | | Enter/verify the following line commands | | LC Descr. Function Type Status | | | | Z Versions FLMUOWVC CMD *VERSIONS | omote | R Run-it UOWRUNIT CMD *RAN | | L Listing UOWLIST CMD *LISTED | | | | | | | | | | | | ******************* Bottom of data ******************* | '--------------------------------------------------------'
We now go to the member list panel for an architecture definition member to display the contents of it as shown in Figure 9-8. You now see the two new options in the list of available commands at the top of the panel. These commands will be available for any member selected in the list. Note: In Figure 9-8, the message, Archdef not current, can be seen in the top right part of the panel. In this case SCLM is telling us that the ARCHDEF member has been saved but not built. UOW processing uses the build maps whenever possible, but when a valid build map is not available, UOW will read and parse the ARCHDEF source. This could have performance implications. Also, you have to build the ARCHDEF before you can promote it.
193
Menu SCLM Functions Utilities Options Help --------------------------------------------------------------------------Work Element List for UOW ALLAPPL in SCLM07 Archdef not current Command ===> Scroll ===> CSR S=Sel/edit E=Edit V=View P=Prom C=Build U=Upd A=Acct M=Map D=Del B=Brws Z=Versions R=Run-it L=Listing Member Type Status Account Language Chg Date User ALLAPPL ARCHDEF (Current UOW ARCHDEF) BILLING ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL RATIO PANELS DEV1 TEXT 2006/11/22 04:58 DOHERTL REXXTEST REXX DEV1 TEXT 2006/11/22 06:11 DOHERTL STARTAPP ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL ******************************* Bottom of data ********************************
Figure 9-8 Work Element list panel showing new commands
So now if we edit the panel RATIO and make some changes we can test these changes by entering an R next to the member as shown in Figure 9-9. --------------------------------------------------------------------------Work Element List for UOW ALLAPPL in SCLM07 Member 1 of 4 Command ===> Scroll ===> CSR S=Sel/edit E=Edit V=View P=Prom C=Build U=Upd A=Acct M=Map D=Del B=Brws Z=Versions R=Run-it L=Listing Member Type Status Account Language Chg Date User ALLAPPL ARCHDEF (Current UOW ARCHDEF) BILLING ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL r RATIO PANELS *EDITED DEV1 TEXT 2006/11/22 08:31 DOHERTL REXXTEST REXX DEV1 TEXT 2006/11/22 06:11 DOHERTL STARTAPP ARCHLEC TEST ARCHDEF 2006/11/20 08:07 DOHERTL ******************************* Bottom of data ********************************
Figure 9-9 Entering the R(Run-it) command next to a panel member
Based on the code in the option we have created ISPF now displays the panel as shown in Figure 9-10. In the case of this example all of the panel processing is contained in the panel as panel REXX, so we can actually perform unit testing of the panel directly from SCLM.
194
---------------------------------------------------------------------------Gear Ratio Calculator ---------------------------------------------------------------------------Calculates the "inch" gear of a combination of cranks/sprockets Wheel size 27
Sprocket Size ---------------------------------------------------------------------------. | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 23 | ----- ------ ------ ------ ------ ------ ------ ------ ------ ------ ------| Crank| | | | | | | | | | | 48 |108.0 | 99.7 | 92.6 | 86.4 | 81.0 | 76.2 | 72.0 | 68.2 | 61.7 | 56.3 | 34 | 76.5 | 70.6 | 65.6 | 61.2 | 57.4 | 54.0 | 51.0 | 48.3 | 43.7 | 39.9 | ---------------------------------------------------------------------------'
Figure 9-10 Running the Gear Ration calculator directly from SCLM UOW
Or if we drill own to the next level ARCHDEF, STARTAPP and enter an L next to the source member, as shown in Figure 9-11, we are put into view on the compiler listing for that source member as shown in Figure 9-12. ------------------------------------------------------------------------------Work Element List for UOW STARTAPP in SCLM07 Member 1 of 3 Command ===> Scroll ===> CSR S=Sel/edit E=Edit V=View P=Prom C=Build U=Upd A=Acct M=Map D=Del B=Brws Z=Versions R=Run-it L=Listing Member Type Status Account Language Chg Date User STARTAPP ARCHLEC (Current UOW ARCHDEF) l PRINTAPP COBOL DEV1 COBDT 2006/11/21 07:45 DOHERTL STARTAPP COBOL TEST COBDT 2006/11/18 03:44 DOHERTL STARTCPY COPYBOOK TEST TEXT 2006/11/18 07:28 DOHERTL ******************************* Bottom of data ********************************
Figure 9-11 Entering the L(List) command next to a source member
195
--------------------------------------------------------------------------VIEW SCLM07.DEV1.LIST(PRINTAPP) - 01.00 Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ****************************** 000001 1PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1 000002 0Invocation parameters: 000003 NONUM,LIB,XREF(FULL),MAP,OFFSET,NOOPTIMIZE,TEST(ALL,SYM,SEPARATE) 000004 0Options in effect: 000005 NOADATA 000006 ADV 000007 QUOTE 000008 ARITH(COMPAT) 000009 NOAWO 000010 BUFSIZE(4096) 000011 NOCICS 000012 CODEPAGE(1140) 000013 NOCOMPILE(S) 000014 NOCURRENCY
Figure 9-12 L(Listing) command places you into view on the listing for the selected source
So unit of work processing can be extended very easily to provide additional processes other than the standard SCLM provided functions.
196
The Audit and Version Utility is Option 8, from the SCLM Utilities panel. Figure 9-13 shows the panel that appears when you select this option.
SCLM Audit and Version Utility - Entry Panel Command ===> Option . . 1 1. Versioning and Audit Tracking 2. Versioning only
SCLM Library: Project . : SCLM07 Group . . . DEV1 Type . . . . COBOL Member . . . Selection date range: Date from . . Date to . . .
(Blank or start date for member list) (Blank or end date for member list)
The fields on the SCLM Audit and Version Utility - Entry panel are: Option Versioning and Audit Tracking shows all audited actions for the selected members and date range. Versioning only: shows only those entries that have version data associated with them. Project The project that you specified on the SCLM Main Menu. An Alternate field also appears if you specified an alternate project definition. These fields can not be changed on this panel. The group for which you want audit and versioning information. The specified group must be defined for auditing. Specify up to four types of member for which you want the version and audit information displayed. The types must be defined for auditing. The member for which you are requesting information. If you leave this field blank all members are displayed. A trailing * may be entered in this field to request a selection list according to a pattern match. The starting date of the range of dates to search for the specified member. The date must be in the form YYYY/MM/DD. If you leave this field blank, SCLM searches from the beginning of the file to the to date. The ending date of the range of dates to search for the specified member. The date must be in the form YYYY/MM/DD. If you leave this field blank, SCLM uses the current date as the end date for the search. When this option is selected, SCLM searches for audit/versioning records for the current group and for all groups above it in the hierarchy. The current group is determined by the value in the Group field on this panel.
Date from
Date to
Hierarchy view
197
SCLM Audit and Version Utility - Selection Panel Member 1 of 11 Scroll ===> CSR
. . . : SCLM07 A Audit Info H History C Compare R Retrieve Action Reason -------PROMOTE PROMOTE PROMOTE PROMOTE PROMOTE PROMOTE PROMOTE PROMOTE DELETE PROMOTE PROMOTE D Delete V View Action Time -------02:47:00 12:18:28 02:47:00 02:46:36 02:43:53 05:47:33 05:46:18 05:36:23 02:38:46 06:01:35 02:46:37 X External Compare
Line Commands:
S Member - -------BILLINGP CBLDBGEX PRINTAPP PRINTAPP RDBKC01 STARTAPP STARTAPP STARTAPP STARTAPP STARTAPP STARTAPP
Group -------TEST TEST TEST TEST TEST PROD TEST TEST TEST TEST TEST
Type -------COBOL COBOL COBOL COBOL COBOL COBOL COBOL COBOL COBOL COBOL COBOL
Action Date ---------2006/12/16 2007/01/05 2006/12/16 2006/12/16 2006/12/23 2007/01/10 2007/01/10 2007/01/10 2006/12/23 2006/12/19 2006/12/16
Userid -------DOHERTL DOHERTL DOHERTL DOHERTL DOHERTL PCECK PCECK PCECK DOHERTL DOHERTL DOHERTL
V Status - -------# # # # # # #
198
The fields for the Version Selection panel, shown in Figure 9-14, are: Member Group Type Action Reason The names of the members matching the selection criteria on the entry panel that have audit and version information. The group the members matching the selection criteria are stored in. The type the members matching the selection criteria are stored in. The SCLM action that was performed against the specified member that resulted in the audit record. Valid values include: BUILD, BLDDEL, DELETE, EXT LIB, FREE, IMPORT, LOCK, PROMOTE, STORE, UNLOCK, UPTATHCD (update authorization code), UPTCHGCD (update change code), UPTUENTY (update user entry) Action Date Action Time Userid V Status The date the action listed in the Action Reason field occurred. The time the action listed in the Action Reason field occurred. The user ID of the person who performed the action. Indicates, using a hash symbol (#), whether a version of the member exists. Indicates the status of the line command. Otherwise it is blank. Possible values are: *SELECT, *DELETED, *FAILED, *ERROR, RETRVOLD, and RETRVNEW To the left of each member listed is a space for entering a line command. You can enter multiple commands on the panel as long as the commands do not conflict. The available line commands are as follows: A Displays the audit information for the member. The audit information is displayed on a panel. On this panel you can call an additional panel to display the members accounting information. Displays the Compare panel where another version of the member can be selected to compare the selected member to. The C command can only be entered for member versions (not audit records). Deletes the audit record in the VSAM audit data set and deletes the versioned member in the partitioned data set. Displays the External Compare panel in which you can specify a member in an external data to compare the selected member to. The X command can only be entered for member versions (not audit records). Displays the history of editing changes made between the selected version and the current version. The H command can only be entered for member versions (not audit records). Displays the SCLM Audit Retrieve panel in which you can specify a data set into which the version will be retrieved. The R command can only be entered for member versions (not audit records). Displays the current contents of the selected member version. The V command can only be entered for member versions (not audit records).
D X
199
SCLM - Audit/Version Record Command ===> Project . : SCLM07 Audit data: Group . . . . . . Type . . . . . . . Member . . . . . . Audit Date . . . . Audit Time . . . . Userid . . . . . . SCLM Change Date . SCLM Change Time . Version data: Data Set . . . . . Member . . . . . . Change Date . . . Change Time . . .
: : : : : : : : : : : :
. . . .
. . . .
. . : DELTA . . : DELTA
200
If you enter a / in the Display Accounting Information field, another panel will be displayed to show the accounting information for the member as shown in Figure 9-16.
SCLM07.DEV1.COBOL(STARTAPP): Accounting Record Command ===> Physical Data Set Accounting Status Change User ID . Member Version . Language . . . . Creation Date . . Creation Time . . Promote User ID . Promote Date . . Promote Time . . Predecessor Date Predecessor Time . . . . . . . . . . . . : : : : : : : : : : : : SCLM07.DEV1.COBOL EDITABLE Change Group . . . DOHERTL Authorization Code 8 Auth. Code Change COBEDT1L Translator Version 2006/11/15 Change Date . . . 08:23:38 Change Time . . . DOHERTL Access Key . . . . 2006/12/19 Build Map Name . . 06:01:35 Build Map Type . . 2006/12/07 Build Map Date . . 16:05:58 Build Map Time . .
. . . . . . . . . . .
: : : : : : : : : : :
DEV1 P
2006/12/19 06:00:46
2006/12/19 06:00:46
Enter "/" to select option Display Statistics Number of Change Codes Number of Includes Number of Compilation Units Number of User Entries
: : : :
0 1 0 0
201
SCLM Audit and Version Utility - Compare Panel Command ===> SCLM Library: Version . . . : SCLM07.TEST.COBOL(STARTAPP) Version Date . : 2006/12/16 Version Time . : 02:46:37
V # #
The bottom section of the panel lists all the matching versions of the member that were included in the initial version selection results. If the Hierarchy View option was selected on the SCLM Audit and Version Utility - Entry Panel, member versions in different groups appear on this list and can be compared. To the left of each version listed is a space for entering the S line command. This command selects the version against which you want to compare the currently selected member version. You can only select one of the listed versions. You can control the compare processing using the following fields: Compare Type Specifies the granularity of the comparison, ranging from entire member to member (File) comparison down to single Byte differences. Line compare is useful for source data. Word compare is most useful for text data. Specifies the context scope of the listing report. You can get a listing with summary information only (OVSUM), single line differences between files (Delta), differences plus or minus the five unchanged lines before and after changed lines (CHNG), or a listing that includes all of the lines in both files (Long).
Listing Type
Sequence numbers Specifies whether sequence numbers in the compared files are to be ignored or treated as data. Choose SEQ to ignore differences in standard sequence number columns 72 through 80 for FB LRECL 80 members. Choose NOSEQ to treat all columns in the files as data. Choose COBOL to ignore differences in columns 1 through 8 of the data. Choose Blank to cause SuperC to ignore standard sequence number columns if the data set is FB 80 or VB 255. Otherwise, the comparison processes these columns as data.
202
Listing DS Name
The data set into which the compare listing is written. You can preallocate this data set, or let ISPF create one for you. If this data set is partitioned, you must specify a member name.
Member
Note: The SCLM Group and ISPF Data Set options are mutually exclusive, that is, you can only choose one of these options. If a / is placed in both options, a message will state that the ISPF Data Set option is invalid.
SCLM Audit and Version Utility - External Compare Command ===> SCLM Library: Version . . . . : SCLM07.TEST.COBOL(STARTAPP) Version Date . : 2006/12/16 Version Time . : 02:46:37 Compare Version with: SCLM Group . . ISPF Data Set Member Compare Type 1. File 2. Line 3. Word 4. Byte Listing DS Name . .
Figure 9-18 SCLM Audit and Version Utility - External Compare
203
You can control the compare processing using the following fields: Compare Type Specifies the granularity of the comparison, ranging from entire member to member (File) comparison down to single Byte differences. Line compare is useful for source data. Word compare is most useful for text data. Specifies the context scope of the listing report. You can get a listing with summary information only (OVSUM), single line differences between files (Delta), differences plus or minus the five unchanged lines before and after changed lines (CHNG), or a listing that includes all of the lines in both files (Long).
Listing Type
Sequence numbers Specifies whether sequence numbers in the compared files are to be ignored or treated as data. Choose SEQ to ignore differences in standard sequence number columns 72 through 80 for FB LRECL 80 members. Choose NOSEQ to treat all columns in the files as data. Choose COBOL to ignore differences in columns 1 through 8 of the data. Choose Blank to cause SuperC to ignore standard sequence number columns if the data set is FB 80 or VB 255. Otherwise, the comparison processes these columns as data. Listing DS Name The data set into which the compare listing is written. You can preallocate this data set, or let ISPF create one for you. If this data set is partitioned, you must specify a member name
204
SCLM Audit and Version Utility - Retrieve Panel Command ===> SCLM Library: Version . . . : SCLM07.TEST.COBOL(STARTAPP) Version Date . : 2006/12/16 Version Time . : 02:46:37 SCLM retrieve group and type: To Group . . . . To Type . . . . Other Data set: Data Set Name
Figure 9-19 SCLM Audit and Version Utility - Retrieve
205
206
/* REXX */ /**********************************************************************/ /* This exec will extract audit records based upon a project, group */ /* and type specified and will write them to SYSOUT */ /**********************************************************************/ trace o PARSE UPPER ARG proj grp type x = time('R') prj = STRIP(proj) grp = STRIP(grp) type = STRIP(type) say 'Project: ' proj say 'Group: ' grp say 'Type: ' type IF type = '*' THEN tp = '' ELSE tp = type ADDRESS "TSO" l = 0 w = 0 z = 0 "FLMCMD VERINFO,"prj",,"grp","tp",,,,,,,,FORWARD,MSGS" saverc = rc /* variable l is used to exit if a infinite loop occurs; the method */ /* used to increment time and thus to move to the next record may */ /* not be fool proof. A time of 60.00 (59.99 incremented by one) */
207
/* /* /* /* DO
may not move the record forward. It may move it to a previous */ 00.00 record and thus create a infinite loop situation. You */ will need to adjust the constant 30000 when the number of */ your audit records exceed 30000. */ WHILE ((saverc = 0) & (l < 30000)) /* if reporting on specific type and the next record read is not */ /* that type then LEAVE because all records for the type have */ /* been read */ IF type <> '*' THEN IF type <> zsvtype THEN LEAVE l = l + 1 w = w + 1 if w = 100 THEN do say 'records processed is: ' l say 'Elapsed time: ' time('E') w = 0 end
/* if audit record is a good audit record then save */ IF STRIP(zsvreslt) = 'COMPLETE' THEN DO z = z + 1 /* write out audit member, audit type, audit date, audit time, audit userid,*/ /* change group, change date, change time, change userid and audit event. */ inputline.z = zsvambr zsvtype zsvdate zsvtime zsvuser zsalgrp inputline.z = inputline.z zsaldate zsaltime zsaluser zsvserv END /* set variables up to read in next record mbr = zsvambr dt = zsvdate tp = zsvtype newtime = RIGHT((RIGHT(zsvtime,5) + 0.01),5,0) */
tm = LEFT(zsvtime,6)||newtime "FLMCMD VERINFO,"prj",,"grp","tp","mbr","dt","tm",,,,,FORWARD,MSGS" saverc = rc END inputline.0 = z /* records read */ say 'l is: ' l /* write out audit records */ "EXECIO * DISKW "sysout" (STEM inputline. FINIS)" say 'Elapsed time after verinfo: ' time('E') EXIT rc
208
Example 9-4 is JCL that can be used to execute the VERINFO program. You will need to add a job card and adjust the ISPF and SYSPROC datasets according to your environment. You will also need to change the call to VERINFO in the last line of the program to pass in your project and the group you want the audit info extracted for. Also adjust the last argument, which is for TYPE, if you only want a specific type reported.
Example 9-4 VERINFO JCL
//VERINFO EXEC PGM=IKJEFT01,REGION=4096K //ISPMLIB DD DSN=ISPF.ZOSR8.SISPMENU,DISP=SHR //ISPSLIB DD DSN=ISPF.ZOSR8.SISPSENU,DISP=SHR //ISPPLIB DD DSN=ISPF.ZOSR8.SISPPENU,DISP=SHR //ISPLLIB DD DSN=ISPFLPA.ZOSR8.SISPLPA,DISP=SHR // DD DSN=ISPFLNK.ZOSR8.SISPLOAD,DISP=SHR //ISPTLIB DD DSN=ISPF.ZOSR8.SISPTENU,DISP=SHR //SYSPROC DD DSN=SCLM.PROJDEFS.REXX,DISP=SHR //ISPTABL DD UNIT=SYSDA,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN=&TABLE1 TEMPORARY TABLE LIBRARY //ISPPROF DD UNIT=SYSDA,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN=&TABLE1 TEMPORARY TABLE LIBRARY //ISPLOG DD SYSOUT=*, // DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB) //FLMMSGS DD DUMMY //MSGS DD SYSOUT=* //LISTING DD SYSOUT=* //SYSOUT DD SYSOUT=* //*YSOUT DD DSN=PCECK.VERINFO.OUTPUT, //* UNIT=SYSDA,SPACE=(TRK,(20,20)),DISP=(NEW,KEEP,KEEP), //* DCB=(LRECL=80,RECFM=FB,BLKSIZE=14960) //SYSTSPRT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //* THE PROJECT, GROUP AND TYPE ARE PASSED TO VERINFO //SYSTSIN DD * ISPSTART CMD(%VERINFO SCLM01 PROD *) /* //* Example 9-5 shows some sample output from the job. The first set of dates / times is when the audit event (PROMOTE) occurred followed by the userid who initiated the PROMOTE. The second set of dates / times is the userid who last changed the member and in which development group it was changed in. The type of audit event comes last.
Example 9-5 Sample Output from the VERINO job SCLMTST1 SOURCE SCLMTST2 SOURCE 07/01/07 14:53:00.35 PCECK 07/01/07 14:53:00.41 PCECK DEV1 DEV1 07/01/07 14:15:07 DOHERTL PROMOTE 07/01/07 14:15:27 DOHERTL PROMOTE
209
210
Part 3
Part
211
212
10
Chapter 10.
213
C C C C C C C
214
Control Information: . . . SCLM07 (Project high-level qualifier) . . . (Project definition: defaults to project) . . . DEV1 (Defaults to TSO prefix)
When you select the A option for the first time, the list of administrator ids is empty. The default userid specified in the project definition is not listed, only those added to the control file via the SCLM Admin option. Figure 10.3 shows the SCLM Admin panel when it is first invoked. -----------------------------------------------------------------------------Maintain Administrators Command ===> Scroll ===> CSR A=Add D=Delete
215
To add a user, enter an A command on the command line, and the Add Administrator Userids panel shown in Figure 10-4 is displayed. Enter the userid of the SCLM administrator and their name and press Enter to add the userid. -----------------------------------------------------------------------------Add Administrator Userids Command ===> USER DETAILS User ID . . PCECK User Name Peter Eck
Figure 10-4 Add Administrator Userids panel
If you wish to add any additional userids, you can use the A command either on the command line or as a line command. The D command only functions as a line command and deletes the selected userid. Once you have added all the required administrators for the SCLM project, the Maintain Administrator panel will be populated with all the userids, as shown in Figure 10-5. -----------------------------------------------------------------------------Maintain Administrators Row 1 to 2 of 2 Command ===> Scroll ===> CSR A=Add D=Delete
Userid Name Created by PCECK Peter Eck DOHERTL JMEHTA Jyotindra Mehta DOHERTL ******************************* Bottom of data ********************************
Figure 10-5 List of administrators
216
If one of the above conditions is not met and you try to edit a member that is already in the development group, you receive a message from SCLM telling you that you are not allowed to edit the specified member. Figure 10-6 shows the SCLM Edit panel when the error message is issued. -----------------------------------------------------------------------------SCLM Edit - Entry Panel Command ===> SCLM Library: Project . . Group . . . Type . . . Member . .
: : . .
. . . TEST
. . . PROD
. . .
Initial Macro . . Profile Name . . . Options / Confirm Cancel/Move/Replace Mixed Mode Edit on Workstation Preserve VB record length
.----------------------------------------------------------------------------. | An error has occurred. Enter HELP for a detailed description of the error. | '----------------------------------------------------------------------------'
Figure 10-6 SCLM Edit panel when edit is denied
Pressing PF1 for additional help shows the more detailed message that SCLM has issued, as shown in Figure 10-7. TUTORIAL --------------------- Message Display ----------------------- TUTORIAL Command ===> FLM20003 - MEMBER LEVEL LOCKING IS IN FORCE AND USER: DOHERTL HAS THE MEMBER LOCKED. PLEASE CONTACT THE SCLM ADMINISTRATOR TO UNLOCK THE MEMBER: RDBKC01
Figure 10-7 Member level locking error message
You are not allowed to edit this member until the user, in this case DOHERTL, has finished editing the member and either promotes it to the next level of the hierarchy, or deletes the version they are editing in the development group. If you are the developer who has your userid assigned to the member in the development group, or you are an administrator, then you will be able to edit the member, and SCLM behavior will be as it normally is when editing a member.
217
Member Status Account Language Text Chg Date Chg Time _ BILLINGP PROD COBE PROD 2007/01/13 16:17:33 _ CBLDBGEX PROD COBE PROD 2007/01/13 16:25:38 _ ENTCOB1 DEV1 COBE DEV1 2007/01/14 20:08:18 _ PETER1 DEV1 COBE DEV1 2007/01/11 21:49:40 _ PETER2 DEV1 CBCID2DT DEV1 2007/01/03 01:20:39 _ PRINTAPP PROD COBEDT PROD 2007/01/13 16:17:19 _ RDBKC01 DEV1 CBCID2DT DEV1 2007/01/15 13:04:04 t RDBKC02 DEV1 COBCICD2 DEV1 2006/11/23 01:38:53 _ SCLMTST1 DEV1 CBCID2DT DEV1 2007/01/11 05:08:30 _ SCLMTST2 DEV1 CBCID2DT DEV1 2007/01/11 05:08:46 _ STARTAPP DEV1 COBEDT DEV1 2007/01/20 13:30:20 _ VCMSCLM DEV1 COBE DEV1 2006/12/23 06:01:59 ******************************* Bottom of data ********************************
Figure 10-8 Entering the T (Transfer) command next to a member
You are presented with the transfer ownership panel as shown in Figure 10-9, where you enter the userid of the person you wish to transfer ownership to. -----------------------------------------------------------------------Transfer Of Member Locking Ownership Command ===> Member to be updated . . . . : SCLM07.DEV1.COBOL(RDBKC02) Old Member Userid New Member Userid . . . . . : DOHERTL . . . . . . pceck
218
The member list panel will be updated with a message to reflect that the member has been transferred as shown in Figure 10-10. -----------------------------------------------------------------------------Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Member 1 of 12 Command ===> Scroll ===> CSR A=Account V=View M=Map C=Build B=Browse P=Promote D=Delete U=Update E=Edit T=Transfer
Member Status Account Language Text Chg Date Chg Time _ BILLINGP PROD COBE PROD 2007/01/13 16:17:33 _ CBLDBGEX PROD COBE PROD 2007/01/13 16:25:38 _ ENTCOB1 DEV1 COBE DEV1 2007/01/14 20:08:18 _ PETER1 DEV1 COBE DEV1 2007/01/11 21:49:40 _ PETER2 DEV1 CBCID2DT DEV1 2007/01/03 01:20:39 _ PRINTAPP PROD COBEDT PROD 2007/01/13 16:17:19 _ RDBKC01 DEV1 CBCID2DT DEV1 2007/01/15 13:04:04 _ RDBKC02 *TRANSFRD DEV1 COBCICD2 DEV1 2006/11/23 01:38:53 _ SCLMTST1 DEV1 CBCID2DT DEV1 2007/01/11 05:08:30 _ SCLMTST2 DEV1 CBCID2DT DEV1 2007/01/11 05:08:46 _ STARTAPP DEV1 COBEDT DEV1 2007/01/20 13:30:20 _ VCMSCLM DEV1 COBE DEV1 2006/12/23 06:01:59 ******************************* Bottom of data ********************************
Figure 10-10 Ownership transferred message
If you are not the owner of the member or are not an administrator, then you will receive the message shown below in Figure 10-11 if you try to transfer ownership of the member. -----------------------------------------------------------------------------Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Option not available Command ===> Scroll ===> PAGE A=Account V=View M=Map C=Build B=Browse P=Promote D=Delete U=Update E=Edit T=Transfer
Member Status Text Chg Date Chg Time Account Bld Map _ BILLINGP PROD 2007/01/13 16:17:33 PROD PROD _ CBLDBGEX PROD 2007/01/13 16:25:38 PROD PROD _ ENTCOB1 DEV1 2007/01/14 20:08:18 DEV1 _ PETER1 DEV1 2007/01/11 21:49:40 DEV1 DEV1 _ PETER2 DEV1 2007/01/03 01:20:39 DEV1 DEV1 _ PRINTAPP PROD 2007/01/13 16:17:19 PROD PROD _ RDBKC01 DEV1 2007/01/15 13:04:04 DEV1 DEV1 _ RDBKC02 DEV1 2006/11/23 01:38:53 DEV1 DEV1 _ SCLMTST1 DEV1 2007/01/11 05:08:30 DEV1 _ SCLMTST2 DEV1 2007/01/11 05:08:46 DEV1 .-----------------------------------------------------------------------------. | The Transfer option is only available to SCLM administrators or the user who| | has the member locked. | '-----------------------------------------------------------------------------'
Figure 10-11 User is not allowed to transfer ownership
219
220
11
Chapter 11.
NOPROM function
In this chapter we describe a new feature in Software Configuration Library manager (SCLM), called the NOPROM function, which was introduced via APAR OA18614. This function allows a member to be left behind during promotion. Prior to this, SCLM would copy all the required components to the next level.
221
11.1 Introduction
You can specify whether an EDITABLE member and its accounting record are promoted to the next level or not. During promotion, the outputs (load modules) built using the non-promoted EDITABLE member are either: Rebuilt at the next level (REBUILD) Not rebuilt at the next level Next we describe sample scenarios for each of these possibilities: Load modules rebuilt at the next level (REBUILD): Scenario: There are DB2 table changes in the development group required for the updating of the DB2 DCLGEN copybooks, but these DB2 DCLGEN copybooks are not to be promoted until the DB2 changes are complete. At this stage, you create a fix for a program that uses one of the DB2 DCLGEN copybooks but does not require the other DB2 development changes. This fix needs to be promoted to production. When building at the development level, the DB2 copybook is used so the program can be tested. But when promoting the program fix, you want the DB2 copybook not to be promoted and the program to be rebuilt at the next level using the version of the DB2 DCLGEN copybook at that level or above. Load modules not rebuilt at the next level: Scenario: A copybook is being modified in development and a fix for a single program which uses the copybook needs to be promoted to production. However, promoting this copybook would cause problems when building other programs using the copybook after promotion. You want to build using the development version of the copybook but, when promoting the program fix, wants the copybook not to be promoted and the program source, load and so on, promoted as is. Note: By promoting everything except the copybook and its accounting record, the build map containing the non-promoted member is in a broken state. This is because the build map date and time for the non-promoted member does not match the member account record and member statistics date and time.
222
The accounting status of NOPROM-R is used during build and promote to tell SCLM not to promote the member and ensure that the build maps containing the member are rebuilt. Not-promotable, and the build maps containing the not-promoted member will not be rebuilt after promotion: For the N line command, you specify No promote (No Rebuild) on the SCLM Not Promoted Member Update panel or, if using the FLMCMD/FLMLNK NOPROM service, you specify the NOREBUILD parameter. This sets the Account Status field in the accounting record to NOPROM-N. The accounting status of NOPROM-N is used during build and promote to tell SCLM not to promote the member and ensure the build maps containing the member are copied as is. Promotable: For the N line command, you specify Remove no promote status on the SCLM Not Promoted Member Update panel or, if using the FLMCMD/FLMLNK NOPROM service, you specify the REMOVE parameter. This sets the Account Status field in the accounting record to EDITABLE. You can only issue this option against a member with an Account Status of NOPROM-R or NOPROM-N.
11.2.1 Using the N line command in Library Utilities (Option 3.1) or Unit of Work (Option 3.11)
You can only issue the N line command in the Library Utilities (option 3.1) or Unit of Work (option 3.11) against a member with an accounting record that has an accounting status of EDITABLE, NOPROM-N, or NOPROM-R. The N line command displays the SCLM Not Promoted Member Update panel as shown in Figure 11-1.
SCLM Not Promoted Member Update Command ===> SCLM Library: PROJECT . . . GROUP . . . . TYPE . . . . . MEMBER . . . . Options NOPROM:
. . . .
: : : :
When you press Enter, SCLM changes the Account Status field to one of these possibilities: NOPROM-R, if you specify the No promote (Rebuild) option NOPROM-N, if you specify the No promote (No Rebuild) option EDITABLE, if you specify the Remove no promote status option and the account status is currently NOPROM-N or NOPROM-R
Chapter 11. NOPROM function
223
The format of the FLMLNK NOPROM service call is shown in Figure 11-3. lastrc := FLMLNK('NOPROM', sclm_id, group, type, member, accesskey, [REBUILD|REMOVE|NOREBUILD], msg_line);
Figure 11-3 Format of the NOPROM service - FLMLNK invocation
Parameters
The parameters for the FLMLNK NOPROM service are as follows: project prj_def sclm_id The project name. The maximum parameter length is 8 characters. The project definition name. It defaults to the project name. The maximum parameter length is 8 characters. An SCLM ID associated with a given project and project definition. The INIT service generates the SCLM ID. The maximum parameter length is 8 characters. The group at which the member accounting status is to be changed. The maximum parameter length is 8 characters. The type of member whose accounting status is to be changed. The maximum parameter length is 8 characters. Specifies the member whose accounting status is to be changed. The access key to be assigned to the member. It defaults to blank. The maximum parameter length is 16 characters.
224
NOREBUILD
By specifying this option, SCLM will update the accounting record to specify an accounting status of 'NOPROM-N'. After building the appropriate member, SCLM while promoting will copy the build maps containing the not-promoted member, but the member itself will be left behind. This option, if specified, causes the build map to copied during the promote, regardless of the FLMLRBLD macro, if the build map references the member not being promoted.
REBUILD
By specifying this option, SCLM will update the accounting record to specify an accounting status of 'NOPROM-R'. After building the appropriate member, SCLM while promoting will not copy the build maps containing the not-promoted member and the member itself. Once the copy phase of the promote is complete, the build function is invoked at the level being promoted into. Because the build maps will be missing for members that reference the member not being promoted, those members, and any dependent members, will be rebuilt. This option allows you to rebuild at the next level using the editable member found at that level or above it in the hierarchy.
REMOVE
By specifying this option, SCLM will update the accounting record to specify an accounting status of 'EDITABLE'. SCLM will perform a normal promote of the member. The ddname indicating the destination of the messages generated by the NOPROM service. If you specify a blank ddname, SCLM routes the NOPROM messages to the default output device, such as your terminal. Otherwise, before you call the NOPROM service, you must allocate the ddname. The following attributes should be used: RECFM=F, LRECL=80, BLKSIZE=80. The maximum parameter length is 8 characters. This parameter is used for FLMCMD only. Services that only write one message have a msg_line parameter. Define a program variable that is 80 characters to hold the contents of this message line. This parameter only applies to services called through the FLMLNK interface.
dd_msgs
msg_line
/*REXX*/ /*-------------------------------------------------------------------*/ /* */ /* FLMCMD NOPROM command */ /* */ /*-------------------------------------------------------------------*/ trace n /* allocate FLMMSG DSN */ PARSE ARG PROJECT ALTPROJ GROUP TYPE MEMBER SVCPARM ADDRESS TSO msgdsn = "'"||USERID()||".TEMP.FLMMSG'" X=MSG('OFF') IF SYSDSN(msgdsn) <> "OK" THEN DO
225
"ALLOC FI(AAAMSGS) DATASET("msgdsn") ", "UNIT(SYSDA) TRACKS SPACE(5 5) ", "LRECL(80) BLKSIZE(3120) RECFM(F B) DSORG(PS) ", "NEW CATALOG " "FREE FI(AAATEMP)" END "FREE FI(FLMMSGS) " X=MSG('ON') "ALLOC FI(FLMMSGS) DATASET("msgdsn") SHR REUSE" PROJECT="SCLMPROJ ALTPROJ="SCLMPROJ GROUP ="DEV1 TYPE ="SOURCE MEMBER ="FLM01EQU SVCPARM=REBUILD "FLMCMD NOPROM,"PROJECT","ALTPROJ","GROUP","TYPE","MEMBER",", ","SVCPARM",FLMMSGS" "ISPEXEC BROWSE DATASET("msgdsn")" return
IDENTIFICATION DIVISION. PROGRAM-ID. FLM02CBL. *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ *@@.THIS PROGRAM ALLOWS YOU TO CALL SCLM SERVICES FROM A COBOL @ *@@ PROGRAM. @ *@@ @ *@@.THE FUNCTION OF THIS PROGRAM IS TO PERFORM AN SCLM NOPROM ON @ *@@ THE COPYBOOK FLM01EQU IN THE DEV1 GROUP. @ *@@ @ *@@ 5647-A01 (C) COPYRIGHT IBM CORP. 1987, 2000 @ *@@ @ *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 PROGRAM-NAME PIC X(08) VALUE 'FLM02CBL'. 01 SCLM-SERVICE PIC X(08). 01 SCLM-PROJECT PIC X(08). 01 SCLM-ALT-PROJ PIC X(08). 01 SCLM-GROUP PIC X(08). 01 SCLM-TYPE PIC X(08). 01 SCLM-MEMBER PIC X(08). 77 SCLM-SCLM-ID PIC X(08) VALUE SPACE. 77 SCLM-APPL-ID PIC X(08) VALUE SPACE. 77 SCLM-AUTHCODE PIC X(08) VALUE SPACE. 226
A Practical Guide to Setting Up and Using SCLM
77 77 77 77 77 77 77 77 77 *
X(16). X(16) VALUE S9(04) COMP S9(04) COMP S9(04) COMP X(08) VALUE X(08) VALUE X(08) VALUE X(80) VALUE
SPACE. VALUE ZERO. VALUE ZERO. VALUE ZERO. 'SYSOUT'. 'MDS3602M'. SPACE. SPACE.
LINKAGE SECTION. PROCEDURE DIVISION. 1-DRIVER. *--------------------------------------------------------* FLMLNK NOPROM,JPHILP,OS2G,DEV1,SOURCE,FLM01EQU,NOREBUILD *--------------------------------------------------------MOVE SCLMPROJ TO SCLM-PROJECT MOVE SCLMPROJ TO SCLM-ALT-PROJ MOVE DEV1 TO SCLM-GROUP MOVE SOURCE TO SCLM-TYPE MOVE FLM01EQU TO SCLM-MEMBER MOVE NOREBUILD TO SCLM-NOPROM-FIELD MOVE 'START' TO SCLM-SERVICE CALL 'FLMLNK' USING SCLM-SERVICE SCLM-APPL-ID. DISPLAY 'START RETURN CODE = ' RETURN-CODE. MOVE 'INIT' TO SCLM-SERVICE CALL 'FLMLNK' USING SCLM-SERVICE SCLM-APPL-ID SCLM-PROJECT SCLM-ALT-PROJ SCLM-SCLM-ID SCLM-MSG-LINE. DISPLAY 'INIT RETURN CODE = ' RETURN-CODE. MOVE 'NOPROM' TO SCLM-SERVICE CALL 'FLMLNK' USING SCLM-SERVICE SCLM-SCLM-ID SCLM-GROUP SCLM-TYPE SCLM-MEMBER SCLM-NOPROM-FIELD SCLM-ACCESS-KEY SCLM-MSG-LINE. DISPLAY 'NOPROM RETURN CODE = ' RETURN-CODE. IF RETURN-CODE > 0 THEN DISPLAY SCLM-MSG-LINE. MOVE 'FREE' TO SCLM-SERVICE CALL 'FLMLNK' USING SCLM-SERVICE SCLM-SCLM-ID SCLM-MSG-LINE. DISPLAY 'FREE RETURN CODE = ' RETURN-CODE. MOVE 'END' TO SCLM-SERVICE
227
CALL 'FLMLNK' USING SCLM-SERVICE SCLM-APPL-ID SCLM-MSG-LINE. DISPLAY 'END RETURN CODE = ' RETURN-CODE. DISPLAY ' '. DISPLAY 'NOPROM COMPLETED'. DISPLAY 'LOAD FLM02CBL ENDED'. GOBACK. 1-EXIT. EXIT.
Given the situation where the DEV1 group contains a DB2 DCLGEN copybook SCLMTB01 for a DB2 table that was currently in the process of being modified. Now the user wants to be able to build and test in DEV1 using this copybook but does not want SCLMTB01 promoted until they are ready. Using the new functionality, the member can be modified so it will not be copied to the next level during promotion. Any load modules which use SCLMTB01 will be rebuilt after promotion to the next level (TEST) to use the version of the copybook at TEST or above. So, to do this, we can use either the N line command in the Library Utility (option 3.1) or Unit of Work (option 3.11) or the FLMCMD/FLMLNK NOPROM service. For our example we will use the N line command in the Library Utility. By issuing the N line command, SCLM will invoke the following panel as shown in Figure 11-5.
228
SCLM Not Promoted Member Update Command ===> SCLM Library: PROJECT . . . GROUP . . . . TYPE . . . . . MEMBER . . . . Options NOPROM:
. . . .
: : : :
By specifying No promote (Rebuild) SCLM will modify the accounting record for SCLMTB01 to have an account status of NOPROM-R as shown below in Figure 11-6.
Physical Data Set Accounting Status Change User ID . Member Version . Language . . . . Creation Date . . Creation Time . . Promote User ID . Promote Date . . Promote Time . . Predecessor Date Predecessor Time
. . . . . . . . . . . .
: : : : : : : : : : : :
SCLM07.DEV1.COPYLIB NOPROM-R Change Group . . . JPHILP Authorization Code 2 Auth. Code Change TEXT Translator Version 2007/01/08 Change Date . . . 16:55:08 Change Time . . . Access Key . . . . 0000/00/00 Build Map Name . . 00:00:00 Build Map Type . . 2007/01/08 Build Map Date . . 16:56:22 Build Map Time . .
. . . . . . . . . . .
: : : : : : : : : : :
DEV1 P
2007/01/08 17:19:15
2007/01/08 17:19:15
Enter "/" to select option Display Statistics Number of Change Codes Number of Includes Number of Compilation Units Number of User Entries
: : : :
0 0 0 0
Figure 11-6 SCLM Account record showing change in Accounting Status to NOPROM-R
While building, SCLM will analyze the components and determine that the member SCLMTB01 has an account status of NOPROM-R. Once the build has completed, SCLM will update the build maps containing the SCLMTB01 member to have a NOPROM build map record.
229
At the end of the build report, you are shown the build maps that were updated, shown here in Figure 11-7.
M E M B E R S
*******
Page 5
The build map for the SCLMDB2 CCBOL member is shown in Figure 11-8
SCLM07.DEV1.SOURCE(SCLMDB2): Build Map Contents Command ===> Build Map Contents -----------------Keyword -------SINC OBJ LIST OUT1 I1* NOPROM I1* I1* Member ----------------------------------SCLMDB2 SCLMDB2 SCLMDB2 SCLMDB2 COBCOPY1 SCLMTB01 SCLMTB01 SCLMTB02 Type -------SOURCE OBJ LIST DBRM COPYLIB COPYLIB COPYLIB COPYLIB
Last Time Modified ------------------2007/01/08 17:16:24 2007/01/08 17:21:17 2007/01/08 17:21:17 2007/01/08 17:21:17 2007/01/08 16:57:59
Ver --3 2 2 2 1
* Internal Keywords I# - Included member referenced by SINC member, # = Imbedded Group NOPROM - Member was/will be left behind on promotion. Use the S line command to view the not promoted member.
Figure 11-8 Build map for member SCLMDB2 showing new NOPROM entries
The NOPROM build map record will be used during promote to indicate that the promotion contains member(s) that will not to be copied to the next level. When promoting SCLMDB2 from DEV1 to TEST: SCLM encounters the NOPROM map record on the build maps SCLMDB2. SCLM compares the group specified on the NOPROM map record (DEV1), and since it is same as the group we are promoting from (DEV1), the normal date/time validation of the not-promoted member in the build maps will occur. SCLM continues and verifies that the SCLM components are current by comparing the build maps, accounting records, and member statistics.
230
While performing this verification, SCLM checks the accounting record for the accounting status for the SCLMTB01 member. Since it is set to NOPROM-R, the member SCLMTB01, its accounting record, and all the build maps containing the NOPROM member SCLMTB01 will not be copied to the next level. When copying components to the next level, the SCLMTB01 member, its accounting record and all the build maps (that is, SCLMDB2) containing the SCLMTB01 member will not be copied to the next level. Once the copy phase is complete, SCLM invokes a build at the TEST level. Since the build maps containing the SCLMTB01 member were not promoted, these will be rebuilt at the TEST level using the version of SCLMTB01 at the TEST level or above. At the end of the promote report, you are shown the not-promoted members and the build maps that were affected by the not-promoted member as shown in Figure 11-9. ******************************************************************************* ** ** ** N O T P R O M O T E D M E M B E R S ** ** ** ******************************************************************************* BACKUP NOT PROMOTED MEMBER TYPE MEMBER OPTION ________ ________ ________ ________ SCLMTB01 COPYLIB REBUILD
PAGE 10 ******************************************************************************* ** ** ** BUILD MAPS AFFECTED BY NOT PROMOTED MEMBERS ** ** ** ******************************************************************************* BUILD BMAP BMAP NOPROM NOPROM MBR MAP TYPE REBUILT MEMBER TYPE ________ ________ ________ ________ __________ SCLMDB2 SOURCE YES SCLMTB01 COPYLIB
Once the promote is complete, viewing the SCLMDB2 build map, as shown in Figure 11-10, you will see that the SCLMTB01 member used to build SCLMDB2 was dated 2007/01/08 16:56, not 2007/01/08 17:19. Therefore SCLMDB2 was built with an earlier version of the member at the TEST level or higher.
231
SCLM07.TEST.SOURCE(SCLMDB2): Build Map Contents Command ===> Build Map Contents -----------------Keyword -------SINC OBJ LIST OUT1 I1* I1* I1* Member ----------------------------------SCLMDB2 SCLMDB2 SCLMDB2 SCLMDB2 COBCOPY1 SCLMTB01 SCLMTB02 Type -------SOURCE OBJ LIST DBRM COPYLIB COPYLIB COPYLIB
Last Time Modified ------------------2007/01/08 17:16:24 2007/01/08 17:35:19 2007/01/08 17:35:19 2007/01/08 17:35:19 2007/01/08 16:57:59 2007/01/08 16:56:22 2007/01/08 17:19:24
Ver --3 3 3 3 1 1 2
* Internal Keywords I# - Included member referenced by SINC member, # = Imbedded Group ****************************** Bottom of Data *******************************
Figure 11-10 Build map for SCLMDB2 post promote
232
For the new functionality, SCLM was changed so that when promoting it will ignore the date/time inconsistencies between the build map, accounting record, and member statistics if: The build map contains a NOPROM build map record. The build level (not viewable) found on the NOPROM build map record does not match the current promote from level. SCLM needs to be able to build at a level where a member was left behind: After promotion where a member was left behind but the build maps were not rebuilt, the level you promoted into is in a broken state. Normally, when attempting to build at this level, it would cause the build maps with date/time inconsistencies (due to left-behind members) to be rebuilt. For the new functionality, SCLM was changed so that when building it will ignore the date/time inconsistencies between the build map, accounting record and member statistics if: The build map contains a NOPROM build map record. The build level (not viewable) found on the NOPROM build map record does not match the current promote from level.
11.4.1 SCLM project setup when not promoting with no rebuilding of build maps
To allow SCLM to back up the not-promoted members, you must perform the following tasks: Allocate a NOPROM backup data set. This data set is a fixed block data set with a LECL of 1024. Modify the SCLM project definition to add in a NPROMBK parameter on the FLMCNTRL macro to specify the NOPROM backup data set name. The format of the NPROMBK macro parameter is as follows: [,NPROMBK=not_promoted_backup_data_set] The name of the partitioned data set to contain a backup of unpromoted members. This parameter is optional. If you do not specify a NPRMBK value, unpromoted members will not be backed up. No SCLM variables can be used for this parameter. The FLMNPROM macro must be used to specify which SCLM editable elements can be marked as not-promotable using the NOPROM service. Allocate a CONTROL VSAM data set (if not already defined). The sample JCL for defining this member can be located in ISP.SISPSAMP(FLM02CNT) Modify the SCLM project definition to add in a CONTROL parameter on the FLMCNTRL macro to specify the CONTROL VSAM data set name. If the FLMNPROM macro is coded the CONTROL parameter on FLMCNTRL must be specified. The format of the CONTROL macro parameter is as follows: [,CONTROL=control_data_set] Specifies the VSAM data set where the additional SCLM control information is stored. If these actions have not been performed, SCLM will still complete a promotion containing the not-promoted member, however, no backups will be taken. If for any reason you need to recreate the outputs (that is, the Load module) based on the left-behind member, you will need to use the left-behind member. If for any reason this member was modified or deleted after promotion, the SCLM outputs might not be able to be recreated.
233
SCLM Not Promoted Member Update Command ===> SCLM Library: PROJECT . . . GROUP . . . . TYPE . . . . . MEMBER . . . . Options NOPROM:
. . . .
: : : :
By specifying No promote (No Rebuild) SCLM will modify the accounting record for FLM01EQU to have an account status of NOPROM-N as shown in Figure 11-12.
234
Physical Data Set Accounting Status Change User ID . Member Version . Language . . . . Creation Date . . Creation Time . . Promote User ID . Promote Date . . Promote Time . . Predecessor Date Predecessor Time
. . . . . . . . . . . .
: : : : : : : : : : : :
SCLM07.DEV1.SOURCE NOPROM-N Change Group . . . JPHILP Authorization Code 4 Auth. Code Change HLAS Translator Version 2005/06/02 Change Date . . . 08:02:16 Change Time . . . Access Key . . . . 0000/00/00 Build Map Name . . 00:00:00 Build Map Type . . 2006/10/11 Build Map Date . . 10:56:51 Build Map Time . .
. . . . . . . . . . .
: : : : : : : : : : :
DEV1 P
2007/01/09 12:00:37
2007/01/09 12:00:37
Enter "/" to select option Display Statistics Number of Change Codes Number of Includes Number of Compilation Units Number of User Entries
: : : :
2 0 0 0
Figure 11-12 SCLM Account record showing change in Accounting Status to NOPROM-N
While building, SCLM will analyze the components to be built and determine that the member FLM01EQU has an account status of NOPROM-N. Once the build has completed for FLM01LD4, SCLM will update the build maps containing the FLM01EQU member to have a NOPROM build map record. At the end of the build report you are shown the build maps that were updated as shown in Figure 11-13.
******* N O P R O M BUILD MAP -------FLM01MD4 FLM01MD5 FLM01MD6 BMAP TYPE -------SOURCE SOURCE SOURCE NOPROM MEMBER -------FLM01EQU FLM01EQU FLM01EQU
*******
Page 5
The build map for the FLM01MD4 member is shown in Figure 11-14.
235
Build Map Contents -----------------Keyword -------SINC OBJ LIST NOPROM I1* Member ----------------------------------FLM01MD4 FLM01MD4 FLM01MD4 FLM01EQU FLM01EQU Type -------SOURCE OBJ SOURCLST SOURCE SOURCE Last Time Modified ------------------2006/02/17 12:05:59 2007/01/09 12:02:53 2007/01/09 12:02:53 Ver --4 57 57
2007/01/09 12:00:37 4
* Internal Keywords I# - Included member referenced by SINC member, # = Imbedded Group NOPROM - Member was/will be left behind on promotion. Use the S line command to view the not promoted member. ****************************** Bottom of Data *******************************
Figure 11-14 Build map for member FLM01MD4 showing new NOPROM entries
The NOPROM build map record in the build maps for FLM01MD4, FLM01MD5, and FLM01MD6 will be used during promote to indicate that the promotion contains member(s) that will not to be promoted.
11.4.3 Promote containing a not-promotable member (NOREBUILD) from the same level containing the NOPROM member
After the member has been specified as being not-promotable (NOREBUILD) and SCLM has performed a build, these changes can then be promoted to the next level (TEST). When promoting FLM01LD4 from DEV1 to TEST: SCLM encounters the NOPROM map record on the build maps FLM01MD4, FLM01MD5, and FML01MD6. SCLM compares the group specified on the NOPROM map record (DEV1) and since it is same as the group we are promoting from (DEV1), the normal date/time validation of the not-promoted member in the build maps will occur. SCLM continues and verifies that the SCLM components are current by comparing the build maps, accounting records and member statistics. While performing this verification, SCLM checks the accounting record for the accounting status for the FLM01EQU member. Since it is set to NOPROM-N all the build maps containing the NOPROM member FLM01EQU will be copied to the next level. SCLM reads the CONTROL file to determine the name of the backup member. To do this, it reads the CONTROL file to determine the NOPROM backup number, this is used to generate the backup member name. If the backup number is 00000001 then the backup member will be A0000001. SCLM backs up the not-promoted member FLM01EQU into the NOPROM PDS specified by the NPROMBK parameter on the FLMCNTRL macro in the project definition. SCLM updates the build maps for FLM01MD4, FLM01MD5, and FML01MD6 at the DEV1 level to add in the backup member name generated above (A0000001) into the NOPROM build map record. 236
A Practical Guide to Setting Up and Using SCLM
When copying components to the next level, the FLM01EQU member and its accounting record will not be promoted, but build maps containing the FLM01EQU member will.
SCLM07.DEV1.SOURCE(FLM01MD3): Build Map Contents Command ===> Build Map Contents -----------------Keyword -------SINC OBJ LIST I1* _ NOPROM I1* Member ----------------------------------FLM01MD3 FLM01MD3 FLM01MD3 FLM01CON FLM01EQU FLM01EQU Type -------SOURCE OBJ SOURCLST SOURCE SOURCE SOURCE
Last Time Modified ------------------2006/10/11 10:52:10 2007/01/09 17:09:17 2007/01/09 17:09:17 2006/10/05 10:05:41
Ver --5 79 79 3
2007/01/09 17:09:00 4
* Internal Keywords I# - Included member referenced by SINC member, # = Imbedded Group NOPROM - Member was/will be left behind on promotion. Use the S line command to view the not promoted member. ****************************** Bottom of Data *******************************
Figure 11-15 Build map showing how to view a backed up source member
By typing an S alongside the NOPROM member you will be able to view the backup of the member that was taken as a part of the promotion of this build map.
11.4.5 Promote containing a not-promotable member (NOREBUILD) from a level not containing the NOPROM member
Now the user has tested the changes at TEST and wants to promote the changes to the RELEASE level. However the SCLM components at TEST are in a broken state as build maps FLM01MD4, FLM01MD5, and FLM01MD6 at TEST will contain the member FLM01EQU but this member was not promoted from DEV1. So when promoting from TEST to RELEASE: SCLM encounters the NOPROM map record in the build maps build maps FLM01MD4, FLM01MD5, and FLM01MD6. The FLM01EQU member will added to the list of members that are not being promoted. SCLM compares the group specified on NOPROM map record (DEV1), and since it is not equal to the group we are promoting from (TEST): SCLM skips the date/time validation of the not-promoted member FLM01EQU. SCLM does not back up the not-promoted member FLM01EQU.
237
SCLM continues and verifies that the SCLM components are current by comparing the build maps, accounting records and member statistics. If it encounters the member FLM01EQU it will be flagged as being up to date. When copying components to the next level the FLM01EQU member and its accounting record will not be promoted but build maps containing the FLM01EQU member will.
11.4.6 Build containing a not-promotable member (NOREBUILD) at a level which does not contain the NOPROM member
After the changes have been promoted to RELEASE the SCLM components will be in a broken state as build maps FLM01MD4, FLM01MD5, and FLM01MD6 will contain the member FLM01EQU but this member was not promoted from DEV1. Prior to this new functionality, a build performed against FLM01LD4 would rebuild the load module due to the broken state of the build maps FLM01MD4, FLM01MD5, and FLM01MD6. This is not acceptable, as it would override the changes you have just promoted. So now when performing a build containing a NOPROM build map record where the level specified on the build maps record does match the build level: SCLM performs these tasks: SCLM, when analyzing the SCLM components, will encounter the NOPROM map record on the build maps FLM01MD4, FLM01MD5, and FML01MD6. For each of these build maps: SCLM compares the group specified on the NOPROM map record (DEV1) to see if it is different to the group you are building at. If it is and the date/time of the accounting record does not match the date/time in the build maps then SCLM knows that the member FLM01EQU has not been promoted. Since the FLM01EQU member has not been promoted, it will be set as up to date in the build map and message FLM44523 issued. If other changes are encountered which would cause the build map to be rebuilt then SCLM issues message FLM44522 and completes with a return code of 8. The above situation occurs if a member used by the build map was changed and promoted, but the build map was not rebuilt. To resolve this problem, you would either need to: Delete the build map causing the problem and rebuild. This will cause the build map to be rebuilt using the version of not-promoted member at the build level or above (that is, RELEASE). Rebuild the build map at the group containing the not-promoted member (DEV1) and re-promote your changes. This will rebuild the build map using the members at the higher level as well the not-promoted member.
238
Physical Data Set Accounting Status Change User ID . Member Version . Language . . . . Creation Date . . Creation Time . . Promote User ID . Promote Date . . Promote Time . . Predecessor Date Predecessor Time
. . . . . . . . . . . .
: : : : : : : : : : : :
SCLM07.DEV1.SOURCE EDITABLE Change Group . . . JPHILP Authorization Code 4 Auth. Code Change HLAS Translator Version 2005/06/02 Change Date . . . 08:02:16 Change Time . . . Access Key . . . . 0000/00/00 Build Map Name . . 00:00:00 Build Map Type . . 2006/10/11 Build Map Date . . 10:56:51 Build Map Time . .
. . . . . . . . . . .
: : : : : : : : : : :
DEV1 P
2007/01/09 12:00:37
2007/01/09 12:00:37
Enter "/" to select option Display Statistics Number of Change Codes Number of Includes Number of Compilation Units Number of User Entries
: : : :
2 0 0 0
Promoting the member FLM01EQU or a build map containing FLM01EQU will cause SCLM to invoke a normal promotion process. Once the member FLM01EQU has been promoted to the RELEASE level, if a rebuild of the build maps FLM01MD4, FLM01MD5, and FLM01MD6 has not occurred, then these build maps will still contain the NOPROM build map records. When building at the RELEASE level after promotion of FLM01EQU: SCLM encounters the NOPROM map record on the build maps FLM01MD4, FLM01MD5, and FLM01MD6. SCLM compares the group specified on the NOPROM map record (DEV1) to see if it is different to the level you are building at. If it is and the date/time of the accounting record matches the date/time in the build maps, then SCLM knows that the member FLM01EQU has been promoted. Hence when building at RELEASE, SCLM removes the NOPROM build map record entries from the build maps FLM01MD4, FLM01MD5, and FLM01MD6, even if they were not re-built.
239
By specifying the FLMNPROM macro, you will be able to specify which SCLM editable elements can or cannot be marked as not-promotable using the NOPROM service. This macro is required if you wish to use the NOPROM service, and can be specified multiple times. Only members that match the groups, types, and languages associated with the NPROM=YES parameter can be marked as not-promotable using the NOPROM service. The format of the FLMNPROM macro is shown in Figure 11-17. FLMNPROM GROUP=(group1,group2,...)|* ,TYPE=(type1,type2,...)|* ,LANG=(lang1,lang2,...)|* ,NPROM=YES|NO
Figure 11-17 FLMNPROM macro format
Parameters
The parameters of the FLMNPROM macro are as follows: GROUP=(group1,group2,...)|* If NPROM=YES is specified, the names of the from groups whose members can be marked as not-promotable. If NPROM=NNO is specified, the names of the from groups whose members may not be marked as not-promotable. Use an asterisk (*) to indicate all groups. ,TYPE=(type1,type2,...)|* If NPROM=YES is specified, the names of the from types whose members can be marked as not-promotable. If NPROM=NO is specified, the names of the from types whose members may not be marked as not-promotable. Use an asterisk (*) to indicate all types. If NPROM=YES is specified, the languages of those members that can be marked as not-promotable. If NPROM=NO is specified, the names of the languages of those members that may not be marked as not-promotable. Use an asterisk (*) to indicate all languages. Specifies whether members in the specified group(s) and type(s) and with the specified languages may or may not be marked as not-promotable. If you specify YES, the NOPROM service can be used to mark identified members as not-promotable. If you specify NO, the NOPROM cannot be used to mark identified members as not-promotable.
,LANG=(lang1,lang2,...)|*
,NPROM=YES|NO
Examples
Example 11-3 shows how to specify that editable members with a language of COBCOPY in the SOURCE type, but in any group, can be marked as not-promotable.
Example 11-3 Specifying FLMNPROM example 1
FLMNPROM GROUP=*,TYPE=SOURCE,LANG=COBCOPY,NPROM=YES Example 11-4 shows how to specify that all editable members with a language of COBCOPY in the SOURCE type, in all groups except EMERFIX can be marked as not-promotable.
Example 11-4 Specifying FLMNPROM example 2
240
12
Chapter 12.
241
Notification processing Interface to other products or internal systems: Package approval products (such as Breeze or INFOMAN)
242
FLMCNTRL ACCT=SCLM.ACCOUNT.FILE, ACCT2=SCLM.ACCOUNT2.FILE, VERS=SCLM.AUDIT.FILE, VERS2=SCLM.AUDIT2.FILE, VERPDS=@@FLMDSN.VERSION, VERCOUNT=10, DASDUNIT=SYSDA, MAXVIO=500000, CCSAVE=CCSAVE, CCSAVCM=TSOLNK, CCSAVDS=SCLM.PROJDEFS.REXX, BLDNTF=BLDNTF, BLDNTFCM=TSOLNK, BLDNTFDS=SCLM.PROJDEFS.REXX, PRMVFY=PRMVFY, PRMVFYCM=TSOLNK, PRMVFYDS=SCLM.PROJDEFS.REXX, PRMCOPY=PRMCOPY, PRMCPYCM=TSOLNK, PRMCPYDS=SCLM.PROJDEFS.REXX, PRMPURGE=PRMPURGE, PRMPRGCM=TSOLNK, PRMPRGDS=SCLM.PROJDEFS.REXX
* * * * * * * * * * * * * * * * * * * * * * *
PRIMARY ACCOUNTING C SECONDARY ACCOUNTING C PRIMARY AUDIT VSAM C SECONDARY AUDIT VSAM C VERSION PDS NAME C # OF VERSIONS TO KEEP C UNIT ALLOC FOR DASD C LIMIT TO ALLOC ON VIO C CCSAVE USER EXIT C METHOD TO CALL EXIT C REXX DATASET C BUILD NOTIFY USER EXIT C METHOD TO CALL EXIT C REXX DATASET C PROMOTE VERIFY USER EXITC METHOD TO CALL EXIT C REXX DATASET C PROMOTE COPY USER EXIT C METHOD TO CALL EXIT C REXX DATASET C PROMOTE PURGE USER EXIT C METHOD TO CALL EXIT C REXX DATASET
In this example, a method of calling a common REXX exec for each exit is used. Then from the common REXX exec the individual exits are called. This will allow multiple exits to be called from a single exit point. We recommend that this method be used for all exits written in REXX. This allows you to add a new exit at any time without reassembling the project definition and allows for easy analysis by the SCLM admin as to which exits are being used. If no exits are needed for a given exit point then you can code a exit 0 statement in the called common REXX.
/* REXX */ /**********************************************************************/ /* This exec called from the Build Notify exit, will setup an */ /* ISPF environment for the execution of REXX execs. */ /*************************************************************************/ TRACE o ARG parm /* Parse arguments into variable parm */ bldexrc = 0 ADDRESS ISPEXEC /* Perform any necessary external binds */
243
"SELECT CMD(EX 'SCLM.PROJDEFS.REXX(BINDEXTR)' '"parm"')" bldexrc = MAX(bldexrc,rc) /* Perform any necessary copies and new copies */ IF bldexrc = 0 THEN DO "SELECT CMD(EX 'SCLM.PROJDEFS.REXX(COPYEXTR)' '"parm"')" bldexrc = MAX(bldexrc,rc) END /* Call Breeze Build Exit */ IF bldexrc = 0 THEN DO "SELECT CMD(EX 'SYS1.BRZE.SBZZCLIB(BZZSME01)' '"parm"')" bldexrc = MAX(bldexrc,rc) END exit bldexrc The above REXX exec is called from the FLMCNTRL macro on the previous page for the build notify user exit. It shows how multiple exits can be called from a common exit REXX. The
SELECT CMD will establish an ISPF environment for the execution of the individual execs.
This is required for any ISPF variables that might be used in the called exec or if ISPF services are going to be utilized. Notice that the common REXX was called with the easier to code call methodology TSOLNK. The TSOLNK methodology allows the common REXX to call the individual REXX exits using the SELECT command and thus allows the called programs to use ISPF services.
First it is sent from SCLM through parameters that are passed in a string to the program or REXX exec. These PARMs are divided by commas. Second it is passed through exit files
244
Table 12-1 shows the exact parameters for the various exit types.
Table 12-1 Parameters for various exit types Change Code Exits OPTION LIST GROUP TYPE MEMBER LANGUAGE USERID AUTHCODE CHANGE CODE Build and Promote Exits OPTION LIST EXIT TYPE PROJECT LIBDEF USERID FROM GROUP TYPE MEMBER SCOPE MODE TO GROUP Audit Delete Exits OPTION LIST EXIT TYPE PROJECT LIBDEF USERID GROUP TYPE MEMBER DATE TIME VERSION MEMBER NAME Delete Exits OPTION LIST EXIT TYPE PROJECT LIBDEF USERID GROUP TYPE MEMBER FLAG MODE
/* Break out the parms passed from the SCLM user exit */ PARSE UPPER VAR parm extyp ',' proj ',' prjdf ',' tsouid ',', fromgrp ',' type ',' member ',' scope ',' mode ',' togrp extyp proj prjdf tsouid fromgrp type member scope mode = = = = = = = = = STRIP(extyp,'T') STRIP(proj,'T') STRIP(prjdf,'T') STRIP(tsouid,'T') STRIP(fromgrp,'T') STRIP(type,'T') STRIP(member,'T') STRIP(scope,'T') STRIP(mode,'T') /* /* /* /* /* /* /* /* /* Exit Type - where in SCLM? Project - high level qualifier Alternate Project Definition User executing SCLM function From grp(Promote) or build grp Type from the SCLM panel Member from the SCLM panel Scope entered on SCLM panel Mode entered on SCLM panel */ */ */ */ */ */ */ */ */
The exit type is used to determine what process is being used and where you are within SCLM. For example, if the exit type is BINITIAL, then this would mean that the exit was called during the initial build exit. The same REXX exec can be called from multiple exit points in SCLM. The exec must examine the exit type variable passed from SCLM to determine who the caller is. Note: in this example no option list has been passed through to the exit. So the first parameter in the variable PARM is the first SCLM passed parameter which is the exit type.
245
/* Break out the parms passed from the SCLM user exit */ "execio * diskr PROMEXIT (stem exitdata. finis" Do i=1 to exitdata.0 Parse var exitdata.i Group.i Type.i Member.i Status.i End
246
FLMCNTRL parameters
These are the parameters: CCVFY=name of program CCVFYDS=dataset where program resides CCVFYCM=program call method CCVFYOP=exit options list This exit routine can be used to do the same functions as the VERCC exit. CCVFY was introduced in release 2.8 and replaces the first half of VERCC as shown in Example 12-5.
Example 12-5 Sample CCVFY exit
/* REXX */ ARG parm /* Parse parms passed by SCLM into variables */ Parse var PARM GROUP ',' TYPE ',' MEMBER ',' LANG ',' ,
247
USERID ',' AUTHCODE ',' CCODE ADDRESS TSO "ALLOC DA('RDBK.SCLM.CCIDVAL') F(CCODEDS) SHR" "EXECIO * DISKR "CCODEDS" (STEM ccline. FINIS)" IF rc <> 0 THEN DO SAY 'ERROR READING CHANGE CODE FILE' EXIT (16) End Address TSO "FREE FI(CCODEDS)" Do I = 1 To ccline.0 Select When SUBSTR(ccline.I,1,8) = ccode Exit (0) Otherwise Nop End End Say "Invalid change code" exit 12
Then
This sample REXX code is a CCVFY exit that verifies the change code that the user enters on the SCLM Edit - Entry panel or the SPROF panel. This REXX code allocates a change code file that is maintained outside of SCLM. Valid change codes are stored in column 1-8, one on each line. If the allocation is successful, then the REXX exec loops through the change code file to find a match on the SCLM change code. If a match is not found, then the exit will send a return code of 12 back to SCLM which will stop the edit session or will force the user to enter a valid change code on the SPROF panel.
FLMCNTRL parameters
These are the parameters: CCSAVE=name of program CCSAVDS=dataset where program resides CCSAVCM=program call method CCSAVOP=exit options list
248
FLMCNTRL parameters
These are the parameters: VERCC=name of program VERCCDS=dataset where program resides VERCCCM=program call method VERCCOP=exit options list If the exit sends a non-zero return code to SCLM, then the user can do one of two things: Use the CREATE command in the edit session to place the member in an external SCLM library Use the SPROF command to modify the change code so that the exit will give a 0 return code Note: The member cannot save in SCLM until the problem is corrected. Given the problems with VERCC (that is, a non-zero return code is being ignored from the call to the exit at the start of the edit), IBM now recommends the use of the newer CCVFY and CCSAVE exits.
249
As you can see, there are two build exits, a build initial exit that occurs before the build occurs, and a build notify exit that occurs after the build has completed.
FLMCNTRL parameters
These are the parameters: BLDINIT=name of program BLDINIDS=dataset where program resides BLDINICM=program call method BLDINIOP=exit options list A build exit file does not exist when this exit is invoked. This means that specific build member validation cannot be completed. Any non-zero return code from this exit which is sent back to SCLM will stop the build processing. This exit is new for OS/390 version 2.10.
250
FLMCNTRL parameters
These are the parameters: BLDNTF=name of program BLDNTFDS=dataset where program resides BLDNTFCM=program call method BLDNTFOP=exit options list A non-zero return code from this exit which is sent back to SCLM will cause SCLM to finish with a return code of 4. At this point all processing has taken place, so SCLM will continue its processing. This exit has been given a new name for the OS/390 release 2.10. In the 2.10 release and thereafter the exit can be referred to as either BLDNTF or BLDEXT1.
12.6.3 SCLM build exits build notify exit - example of the common REXX
Example 12-6 is an example of a common build notify exit. It calls two exits, one to copy members to external datasets where they are to be executed and a second similar exit for Java / J2EE development that copies jar files to their execution environment either on a local or remote USS directory. Both of these exits have been coded to run during the build notify and promote purge exits because the function is needed at each time. Whenever a new output is generated during a build or a output is promoted the external datasets have to be updated. The COPYEXTR exit will be documented in this section while the DEPLOY exit will be documented in the promote exit section.
Example 12-6 Common build exit
/* REXX */ /**********************************************************************/ /* This exec will set up an ISPF environment for the execution of */ /* the build exits */ /**********************************************************************/ TRACE o ARG parm /* Parse arguments into variable parm */ bldntfrc = 0 ADDRESS ISPEXEC "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(COPYEXTR)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(DEPLOY)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) exit bldntfrc
251
12.6.4 SCLM build exits build notify exit - example of a copy exit
In the following example of a copy exit, you can look at the comments in the code to see how the exit has been coded and how you can use this code in your exits. In particular, take a close look at how the parameters and exit file have been parsed and processed. This code can be common to any of your build exits. You can also see how certain SCLM types have been tested for in the exit file because only members in the exit file of these types have to be copied to external files. In this example the SELECT statement only processes members in types LOAD and CICSLOAD and sets up the external datasets for them. If you wanted to use this copy exit you would need to modify the SELECT for your types and external datasets accordingly. You could also extend the exit to perform other actions that may be necessary on a copy such as invoking a new copy in the CICS region or sending an e-mail notifying the administrator or user of the success or failure of the copy. Example 12-7 is REXX code that shows how ISPF services can be incorporated into the REXX code to allocate and copy datasets. This program uses the ISPF LMINIT command to allocate the from and to datasets. Notice that variables from the PARM for project, to group, and type were used to determine the source dataset name. LMCOPY is used to perform the copy.
Example 12-7 Copy exit example
/* REXX */ /**********************************************************************/ /* This exec copies the executable members to their execution dataset.*/ /**********************************************************************/ trace o ARG PARM ret_code = 0 /* Parse arguments passed into the exit */ PARSE UPPER VAR parm extyp ',' proj ',' prjdf ',' tsouid ',', fromgrp ',' type ',' member ',' scope ',' mode ',' togrp proj = strip(proj) type = strip(type) member = strip(member) /* /* /* /* if setup up the exit ddname and the good status message to check for. */ for a build exit the from group indicates where the build is occurring */ for a promote exit we want to use the destination group for the source of*/ the copy since the promote will have occurred by the time the exit runs. */ strip(extyp) = 'BUILD' then do extdd = 'BLDEXIT' goodmsg = 'BUILT' copygrp = strip(fromgrp) end else do extdd = 'PROMEXIT' goodmsg = 'PURGE SUCCESSFUL' copygrp = strip(togrp) end "execio * diskr " extdd "(stem extline. finis)" do i = 1 to extline.0 /* For all lines in exit file */ /* Extract variables from a line out of the exit file */ parse upper var extline.i eogroup 10 eotype 19 eomember 28 eostatus eogroup = STRIP(eogroup)
252
eotype = STRIP(eotype) eomember= STRIP(eomember) eostatus= STRIP(eostatus) /* If members status is OK then continue to process */ If eostatus <> goodmsg then iterate /* To dataset for the copy is a pre-allocated library */ /* Modify the Select statement for your types and datasets */ Select When eotype = 'LOAD' then do outdsn = "'RDBK."copygrp".LOADLIB'" Copy = 'Yes' end When eotype = 'CICSLOAD' then do outdsn = "'RDBK."copygrp".CICSLOAD'" Copy = 'Yes' end Otherwise Copy = 'No' End If Copy = 'Yes' then call DoCopy End exit ret_Code DoCopy: /* Initialize the dataset to copy from */ indsn = "'"proj"."copygrp"."eotype"'" Address ISPEXEC "LMINIT DATAID(FROMDSN) DATASET("indsn")" ret_code= rc if ret_code <> 0 then do Say 'Error on LMINIT for dataset 'indsn' return code' rc exit 32 end Address ISPEXEC "LMINIT DATAID(TODSN) DATASET("outdsn")" ret_code= rc if ret_code <> 0 then do Say 'Error on LMINIT for dataset 'outdsn' return code' rc exit 32 end /* Copy member from SCLM prod to external dataset */ Address ISPEXEC "LMCOPY FROMID("fromdsn") FROMMEM("eomember") TODATAID("todsn") TOMEM("eomember") REPLACE" If rc <> 0 then do /* If error on the Copy */ Say 'Error on LMCOPY for member 'eomember' return code' rc exit 32 end else /* Member was copied successfully */ Say eomember' has been copied to 'outdsn Return
253
As you can see, SCLM has four promote exits, the Promote Initial exit, which occurs before the verify phase; the promote notify exit, which occurs after the verification is complete; the promote copy exit, which occurs after the copies have occurred; and the promote purge exit, which occurs after the purge phase.
FLMCNTRL parameters
These are the parameters: PRMINIT=name of program PRMINIDS=dataset where program resides PRMINICM=program call method PRMINIOP=exit options list
254
The promote exit file does not exist when this exit is invoked. This means that a promote of an ARCHDEF would not have specific member information during this exit process. Any non-zero return code from this exit which is sent back to SCLM will stop the promote process. This exit is new for OS/390 version 2.10.
FLMCNTRL parameters
These are the parameters: PRMVFY=name of program PRMVFYDS=dataset where program resides PRMVFYCM=program call method PRMVFYOP=exit options list Depending on the mode specified on the promote, the return code could affect the promote processing. If conditional mode is used, then any return code greater than 4 will stop all the promote processing. If unconditional mode is used, then any return code other than 20 will allow processing to continue. This exit has been given a new name for the OS/390 release 2.10. In the 2.10 release and thereafter the exit can be referred to as either PRMVFY or PRMEXT1.
12.7.3 SCLM promote exits promote verify exit - example of common REXX
Example 12-8 is an example of a common promote verify exit. It calls one exit that backs up members before they are overlaid during a promote. It also verifies that the promote is being performed only using a PACKAGE type. This exit is used on a system that is using Breeze to control the promote and all Breeze promotes must be performed using a high level ARCHDEF and on this system the high level ARCHDEFs are stored in the PACKAGE type. This is an example of coding a small amount of logic directly into the common REXX. The logic could be performed in a called REXX program, but it does not make sense to do so since it consists of only a few lines of REXX. Notice though that the passed parameters must be parsed to find the member type that is being promoted.
Example 12-8 Promote Verify Common exit
/* REXX */ /**********************************************************************/ /* This exec will set up an ISPF environment for the execution of */ /* the promote verify exit. */ /**********************************************************************/ TRACE o ARG parm /* Parse arguments into variable parm */ CALL Init prmntfrc = 0 if type <> 'PACKAGE' then do say 'All promotes must use the PACKAGE type' exit 20 end
255
ADDRESS ISPEXEC "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(BKUPPROD)' '"parm"')" prmntfrc = MAX(prmntfrc,rc) exit prmntfrc /********************************************************************/ /* Init: Subroutine to initialize variables, examine the parms */ /* passed from SCLM, and set additional variables. */ /********************************************************************/ Init: /* Break out the parms passed from the SCLM user exit */ PARSE UPPER VAR parm extyp ',' proj ',' prjdf ',' tsouid ',', fromgrp ',' type ',' member ',' scope ',' mode ',' togrp extyp = STRIP(extyp,'T') /* Exit Type - where in SCLM? */ proj = STRIP(proj,'T') /* Project - high level qualifier */ prjdf = STRIP(prjdf,'T') /* Alternate Project Definition */ tsouid = STRIP(tsouid,'T') /* User executing SCLM function */ fromgrp = STRIP(fromgrp,'T') /* From grp(Promote) or build grp */ type = STRIP(type,'T') /* Type from the SCLM panel */ member = STRIP(member,'T') /* Member from the SCLM panel */ scope = STRIP(scope,'T') /* Scope entered on SCLM panel */ mode = STRIP(mode,'T') /* Mode entered on SCLM panel */ togrp = STRIP(togrp,'T') /* To grp (Promote), N/A (Build) */ return
12.7.4 SCLM promote exits promote verify exit - example of a backup exit
Example 12-9 is an example of a promote verify exit. It backs up the current members in production prior to them being overlaid during the promote. The SCLM backout function can perform a similar function, but it only handles outputs. This exit handles all types.
Example 12-9 Promote verify backup exit
/* REXX */ /**********************************************************************/ /* */ /* This rexx exec copies production members into a backup library */ /* before the SCLM Promote overlays them with the new members being */ /* promoted into the PROD group. */ /* */ /**********************************************************************/ trace o /* o - off r - result i - intermediate */ arg parm call init /* If the promote is done in report mode then don't execute if mode = 'REPORT' then exit /* If not invoked from Promote Verify exit, then exit if extyp <> 'PVERIFY' then exit */
*/
256
/* If not promoting into PROD group, then exit if togrp <> prdgrp then exit /* If promoting from the PACKAGE BACKOUT group (BACK) then exit */ if fromgrp = 'BACK' then exit /* Read all lines from the exit file into a stem variable */ "execio * diskr "ddname" (stem extline. finis)" if extline.0 <> 0 then /* if file is not empty do i = 1 to extline.0 /* For all lines in stem variable */ call Process end exit /********************************************************************/ /* Init: Subroutine to initialize variables, examine the parms */ /* passed from SCLM, and set additional variables. */ /********************************************************************/ Init: /* setup the group to do the backup for */ prdgrp = 'PROD' /* setup the type of members to backup */ copytype = 'ARCHDEF CCDEF LECDEF PACKAGE COPYBOOK CICSLOAD DCLGEN', 'DBRMLIB CNTLLIB PARMLIB PROCLIB JCLLIB LOAD ASM COBOL'
*/
*/
/* Break out the parms passed from the SCLM user exit */ PARSE UPPER VAR parm extyp ',' proj ',' prjdf ',' tsouid ',', fromgrp ',' type ',' member ',' scope ',' mode ',' togrp extyp = STRIP(extyp,'T') /* Exit Type - where in SCLM? */ proj = STRIP(proj,'T') /* Project - high level qualifier */ prjdf = STRIP(prjdf,'T') /* Alternate Project Definition */ tsouid = STRIP(tsouid,'T') /* User executing SCLM function */ fromgrp = STRIP(fromgrp,'T') /* From grp(Promote) or build grp */ type = STRIP(type,'T') /* Type from the SCLM panel */ member = STRIP(member,'T') /* Member from the SCLM panel */ scope = STRIP(scope,'T') /* Scope entered on SCLM panel */ mode = STRIP(mode,'T') /* Mode entered on SCLM panel */ togrp = STRIP(togrp,'T') /* To grp (Promote), N/A (Build) */ goodmsg badmsg ddname Return = 'PROMOTABLE' = 'NOT PROMOTABLE' = 'PROMEXIT'
/********************************************************************/ /* Process: Subroutine to initialize the from and to datasets, */ /* perform the copy of certain types of members to backup */ /* libraries, and free the files for the next call. */ /********************************************************************/ Process: /* Extract variables from a line out of the exit file */ parse upper var extline.i eogroup 10 eotype 19 eomember 28 eostatus
257
/* Only backup members that SCLM has marked as Promotable */ if eostatus <> goodmsg then return /* Only backup members with the types we want */ if wordpos(eotype, copytype) = 0 then return /* From dataset for the backup is an SCLM PROD library */ indsn = "'"proj"."prdgrp"."eotype"'" address ispexec "lminit dataid(fromdsn) dataset("indsn")" if rc <> 0 then do say 'Error on LMINIT for dataset 'indsn' return code' rc exit 32 end /* To dataset for the backup is a pre-allocated library */ outdsn = "'"proj"."prdgrp"."eotype".BACKUP'" /* Initialize the dataset to copy into */ address ispexec "lminit dataid(todsn) dataset("outdsn")" if rc <> 0 then do say 'Error on LMINIT for dataset 'outdsn' return code' rc exit 32 end /* Copy member from SCLM prod into backup dataset */ address ispexec "lmcopy fromid("fromdsn") frommem("eomember") todataid("todsn") tomem("eomember") replace" if rc = 8 then /* If member is new, and not in SCLM Prod */ nop /* No copy was done, not an error */ else if rc <> 0 then do /* If error on the Copy */ say left('* Error Copying member 'eomember, 77) '*' rc say left('* from 'indsn, 77) '*' say left('* to 'outdsn, 77) '*' exit 32 end else do /* Member was copied successfilly */ say ' ' say eomember' has been backed up to 'outdsn end address ispexec "lmfree dataid("todsn")" address ispexec "lmfree dataid("fromdsn")" return
258
FLMCNTRL parameters
These are the parameters: PRMCOPY=name of program PRMCPYDS=dataset where program resides PRMCPYCM=program call method PRMCPYOP=exit options list If a return code of 20 is sent back to SCLM, then all promote processing will stop. This exit has been given a new name for the OS/390 release 2.10. In the 2.10 release and thereafter the exit can be referred to as either PRMCOPY or PRMEXT2.
FLMCNTRL parameters
These are the parameters: PRMPURGE=name of program PRMPRGDS=dataset where program resides PRMPRGCM=program call method PRMPRGOP=exit options list A non-zero return code sent back to SCLM will cause SCLM to finish with a return code of 8. At this point all processing has taken place, so SCLM will continue its processing. This exit has been given a new name for the OS/390 release 2.10. In the 2.10 release the exit can be referred to as either PRMPURGE or PRMEXT3.
12.7.7 SCLM promote exits promote purge exit - example of common REXX
Example 12-10 is an example of a common promote purge exit. It calls two exits, one to copy members to external datasets where they are to be executed and a second similar exit for Java / J2EE development that copies jar files to their execution environment either on a local or remote USS directory. Both of these exits have been coded to run during the build notify
259
and promote purge exits because the function is needed at each time. Whenever a new output is generated during a build or a output is promoted the external datasets have to be updated. The COPYEXTR exit was documented in the build exit section while the DEPLOY exit will be documented below.
Example 12-10 Common Purge Exit
/* REXX */ /**********************************************************************/ /* This exec will set up an ISPF environment for the execution of */ /* the build exits */ /**********************************************************************/ TRACE o ARG parm /* Parse arguments into variable parm */ CALL Init prmprgrc = 0 ADDRESS ISPEXEC "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(COPYEXTR)' '"parm"')" prmprgrc = MAX(prmprgrc,rc) "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(DEPLOY)' '"parm"')" prmprgrc = MAX(prmprgrc,rc) exit prmprgrc
12.7.8 SCLM promote exits promote purge exit - example of a deploy exit
Example 12-11 is an exit that copies jar files to a USS directory where they are to be executed from. This exit would be used for a SCLM project that is using the SCLM Developer Toolkit to handle java code and create class and jar files as output. The output will be stored in SCLM but will have to be copied to a USS directory for execution. The copy in this example is performed with a OPUT command when the directory is mounted on the same LPAR where SCLM is executing and uses FTP for a remote deploy. The destination directories and the userid and password for the FTP process must be setup in a file. Look in the read_ip routine in the exit below for some information on how to set this file up.
Example 12-11 Promote purge exit example for deployment
/* REXX */ /**********************************************************************/ /* */ /* This rexx exec copies jar files to a USS directory via a OPUT */ /* copy below PROD or via FTP to a remote LPAR for PROD. It looks */ /* up the long name of the member to find the correct USS name to */ /* copy to. */ /* */ /**********************************************************************/ trace o Address TSO Arg PARM parse var parm vexttype ","project","libdef","tsouid","fromgrp",", type","prommbr","scope","mode","togrp
longname. = '' fromgrp = Strip(fromgrp) togrp = Strip(togrp) Exit_rc = 0 if vexttype = 'BUILD' then srchgrp = fromgrp else srchgrp = togrp /* read exit file to find members being promoted call get_mem_being_promoted /* read destination information for each group call read_ip /* if a match is found in the destination info then do the /* type of copy specified for the destination (local or FTP) do k = 1 to ipaddrs.0 if groupto.k = srchgrp then do count = 0 if ftphfs.k = 'FTP' then call Do_FTP else call Do_Copy if count > 0 then /* if any members have been copied send a email call Send_Email end end Exit (Exit_rc); /*-----------------------------------------------------------------*/ /* This reads the exit output dataset for members being built */ /*-----------------------------------------------------------------*/ Get_mem_being_promoted: If VEXTTYPE = 'BUILD' Then "execio * diskr BLDEXIT (stem exitfile. finis)" else "execio * diskr PROMEXIT (stem exitfile. finis)" if rc \= 0 Then return do i = 1 to exitfile.0 This_line = exitfile.I This_line = TRANSLATE(this_line) Parse var This_line Group Type Member Status Group.i = Strip(Group) Type.i = Strip(Type) Member.i = Strip(Member) Status.i = Strip(Status) End */
*/
*/ */
*/
261
Return; /*--------------------------------------------------------------------*/ /* Read info for destination */ /*--------------------------------------------------------------------*/ read_ip: Address TSO /* alloc long name file used by the developer toolkit */ "FREE FI(LSTRANS)" "FREE FI(LSTRNPTH)" "ALLOC DD(LSTRANS) DA('BWB.LSTRANS.FILE') SHR REUSE" "ALLOC DD(LSTRNPTH) DA('BWB.LSTRANS.FILE.PATH') SHR REUSE" /* Read destination info into Stem variables. To use this */ /* this exit you will need to create your own ip files. */ /* See the do loop below for the layout of the file. It is */ /* space delimited. This dataset will need to be protected */ /* since it contains passwords. There can be multiple */ /* destinations for a group. */ Address TSO "ALLOC F(IPADDRS) ", "DA('SCLM07.PROJDEFS.SOURCE(IPADDRS)') SHR" "EXECIO * DISKR IPADDRS (FINIS STEM ipaddrs." /* Here is an example dataset */ /* group (FTP/local) (dest ip/local) (dest USS) perm userid pw */ /* DEV1 local local /u/pceck/RDBK/dev1/ 777 na na */ /* TEST local local /u/pceck/RDBK/test/ 777 na na */ /* PROD FTP abc.ibm.com /u/pceck/RDBK/prod/ 777 pceck abcd */ j = 0 do i = 1 to ipaddrs.0 Parse var ipaddrs.i groupto ftphfs ip_addr path mode userid password if groupto = srchgrp then do j = j + 1 groupto.j = Strip(groupto) /* SCLM group to process the copy */ ftphfs.j = Strip(ftphfs) /* hard code 'FTP' or 'local' */ ip_addr.j = Strip(ip_addr) /* ip address of dest or 'local' */ path.j = Strip(path) /* USS directory to copy to */ mode.j = Strip(mode) /* permission to set member to */ userid.j = Strip(userid) /* userid to use for the FTP */ password.j = Strip(password) /* password to use for the FTP */ end end ip_count = j /* count of the destinations for the group */ Return; /*-----------------------------------------------------------------*/ /* Perform the FTP of the files */ /*-----------------------------------------------------------------*/ Do_FTP: /* For each different IP Address FTP the files and CHMOD */ do J = 1 to ip_count call Init_FTP Do I = 1 to exitfile.0 if Type.i = 'J2EEJAR' Then do FromDSN = Strip(PROJECT)'.'Strip(srchgrp)'.'Type.i /* find longname for shortname */
262
Say "Find longname for shortname" FLMLSSHR = member.i Address ISPEXEC "VPUT (FLMLSSHR) PROFILE" Address ISPEXEC "SELECT PGM(FLMLSTRN) PARM(FINDLONG)" LSRC=RC If LSRC > 0 Then do Address ISPEXEC "VGET (FLMLSERR,FLMLSER1) PROFILE" Say "LS ERROR LINE 1 ==>" FLMLSERR Say "LS ERROR LINE 2 ==>" FLMLSER1 Return End Else do Address ISPEXEC "VGET (FLMLSSHR,FLMLSLNG) PROFILE" Longname.i = FLMLSLNG deplloc.i = path.j || longname.i F = F + 1 ftpcmd.F = "Put '"FromDSN"("Member.i")'" deplloc.i F = F + 1 ftpcmd.F = "Site chmod "mode.j" "deplloc.i count = count + 1 End end /* /* /* if these lines were put in for testing of one additional type*/ it is not very useful but it does show you can extend this*/ REXX for any type of member */ Type.i = 'LMAP' Then do FromDSN = Strip(PROJECT)'.'Strip(srchgrp)'.'Type.i longname.i = member.i deplloc.i = path.j || member.i || '.lmap' F = F + 1 ftpcmd.F = "Put '"FromDSN"("Member.i")'" deplloc.i F = F + 1 ftpcmd.F = "Site chmod "mode.j" "deplloc.i count = count + 1 end
end if F > 4 Then do /* if any lines have been added to the FTP file after the init*/ F = F + 1 ftpcmd.F = 'quit' ftpcmd.0 = F Call Invoke_FTP End end Return(0); /*-----------------------------------------------------------------*/ /* Perform the local copy */ /*-----------------------------------------------------------------*/ Do_Copy: /* For each different destination copy the files and CHMOD */ do J = 1 to ip_count
263
do I = 1 to exitfile.0 if Type.i = 'J2EEJAR' Then do FromDSN = Strip(PROJECT)'.'Strip(srchgrp)'.'Type.i /* find longname for shortname */ Say "Find longname for shortname" FLMLSSHR = member.i Address ISPEXEC "VPUT (FLMLSSHR) PROFILE" Address ISPEXEC "SELECT PGM(FLMLSTRN) PARM(FINDLONG)" LSRC=RC if LSRC > 0 Then do Address ISPEXEC "VGET (FLMLSERR,FLMLSER1) PROFILE" Say "LS ERROR LINE 1 ==>" FLMLSERR Say "LS ERROR LINE 2 ==>" FLMLSER1 Return End else do Address ISPEXEC "VGET (FLMLSSHR,FLMLSLNG) PROFILE" Longname.i = FLMLSLNG deplloc.i = path.j || longname.i "OPUT '"FromDSN"("Member.i")' '"deplloc.i"'" say "OPUT "FromDSN"("Member.i")' to '"deplloc.i"' rc= " rc chmod = deplloc.i mode.j Call syscalls 'ON' Address syscall 'chmod' chmod Say 'chmod' chmod 'rc=' rc count = count + 1 end end if Type.i = 'LMAP' Then do /* these lines were put in for testing of one additional type*/ /* it is not very useful but it does show you can extend this*/ /* REXX for any type of member */ FromDSN = Strip(PROJECT)'.'Strip(srchgrp)'.'Type.i longname.i = member.i deplloc.i = path.j || member.i || '.lmap' "OPUT '"FromDSN"("Member.i")' '"deplloc.i"'" say "OPUT "FromDSN"("Member.i")' to '"deplloc.i"' rc= " rc chmod = deplloc.i mode.j Call syscalls 'ON' Address syscall 'chmod' chmod Say 'chmod' chmod 'rc=' rc count = count + 1 end end end Return(0); /*-----------------------------------------------------------------*/ /* This reads initialises FTP variables and stores the DUMMYSMP */ /* into memory for processing */ /*-----------------------------------------------------------------*/ Init_FTP: remote_host = ip_addr.j
264
login_id = userid.j pass_word = password.j /*----------------------------------------------------------*/ /* Setup the FTP subcommands to be issued... */ /*----------------------------------------------------------*/ ftpcmd.1 = remote_host; ftpcmd.2 = login_id pass_word /* USER and PASS responses */ ftpcmd.3 = "cd "path.j ftpcmd.4 = "binary" F = 4 C = 0 Return /*-----------------------------------------------------------------*/ /* This allocates files and invokes FTP */ /*-----------------------------------------------------------------*/ Invoke_FTP : address TSO 'Allocate fi(INPUT) new space(30,30) tracks ', 'dsorg(ps) lrecl(2080) recfm(v,b) blksize(0) reuse' address TSO 'Allocate fi(OUTPUT) new space(30,30) tracks ', 'dsorg(ps) lrecl(160) recfm(f,b,a) blksize(0) reuse' "execio" ftpcmd.0 "diskw INPUT (stem ftpcmd. finis" "FTP (EXIT" FTP_rc = rc if (FTP_rc <> 0) then do Say 'FTP failed. RC='FTP_rc Address TSO "execio * diskr OUTPUT (stem sysprint. finis" If (rc <> 0) then Say 'Read failure on SYSPRINT dataset. Return Code='rc else Do i = 1 to sysprint.0 sysprint.i = strip(sysprint.i,'T',' ') say sysprint.i End Exit_rc = 12 end else Say 'FTP worked. RC='FTP_rc Address TSO 'Free fi(INPUT)' Address TSO 'Free fi(OUTPUT)' Return Send_Email: sysid = MVSVAR('sysname') /* FTP Line count */ /* CHMOD line count */
265
/* Date routine from SMTPNOTE */ date = date("n")" "time()" AWST" date = subword(date,1,2) || , /* dd mon */ " " || , strip(substr(word(date,3),3,4)) || , /* yy */ " " || , subword(date,4) /* time and zone */ 'MAKEBUF' atsign = '@' queue 'helo PTHAPC0.AU.IBM.COM' queue 'mail from:<'strip(tsouid)||atsign||'PTHAPC0>' queue 'rcpt to:<user1'||atsign||'us.ibm.com>' queue 'data' queue 'Date: 'date queue 'From: 'strip(tsouid)||atsign||'PTHAPC0' queue 'To: user1'||atsign||'us.ibm.com' queue 'Cc: user2'||atsign||'us.ibm.com' queue 'Subject: SCLM Suite HFS Copy Report 'date' 'sysid' 'PROMMBR queue ' ' queue 'The following objects have been copied to the HFS on system 'sysid queue 'Project : 'PROJECT 'From group : 'srchgrp queue 'Using work element : 'PROMMBR queue 'By User : 'TSOUID queue ' ' Do i = 1 to exitfile.0 If deplloc.i <> '' Then queue Member.i '('longname.i') of type' Type.i 'to' deplloc.i End queue '.' queue '' "ALLOC F(SMTPMSG) SYSOUT(B) LRECL(255) RECFM(V B) DSORG(PS) "||, "DEST(PTHAPD0) WRITER(SMTP)" If Rc = 0 Then Do "execio * diskw smtpmsg (finis" "FREE F(SMTPMSG)" End 'DROPBUF' Return
266
FLMCNTRL parameters
These are the parameters: DELINIT=name of program DELINIDS=dataset where program resides DELINICM=program call method DELINIOP=exit options list Any return code other than 0 will stop the delete processing. This exit is new for OS/390 version 2.10.
267
/* REXX */ /**********************************************************************/ /* */ /* This exec called from the Delete Init exit will stop the delete */ /* if the user is not the owner of the member or is not a */ /* administrator. */ /* */ /**********************************************************************/ TRACE o ARG parm /* Parse arguments into variable parm */ CALL Init /* No need to execute if run in report mode If mode = 'REPORT' then exit 0 /* No need to execute if source member is not being deleted If FLAG <> 'TEXT' then exit 0 /* edit with the ids that can delete all code */ sclmadm = 'admext1 admext2' call get_members do i = 1 to rptline.0 parse upper var rptline.i dgrp dtype dmbr duser if pos(dtype,testtypes) = 0 then iterate else do if (duser = tsouid) | (pos(tsouid,sclmadm) > 0) then say 'Member 'dmbr' can be deleted from group 'dgrp' type 'dtype else do say 'Can not delete member 'dmbr' in group 'dgrp' type 'dtype say 'Member is owned by 'strip(duser) exit 0020 end end end Exit /********************************************************************/ /* Init: Subroutine to initialize variables, examine the parms */ /* passed from SCLM, and set additional variables. */ /********************************************************************/ Init: /* Break out the parms passed from the SCLM user exit */ 268 */
*/
PARSE UPPER VAR parm extyp ',' proj ',' prjdf ',' tsouid ',', group ',' type ',' member ',' flag ',' mode extyp proj prjdf tsouid group type member flag mode = = = = = = = = = STRIP(extyp,'T') STRIP(proj,'T') STRIP(prjdf,'T') STRIP(tsouid,'T') STRIP(group,'T') STRIP(type,'T') STRIP(member,'T') STRIP(flag,'T') STRIP(mode,'T') /* /* /* /* /* /* /* /* /* Exit Type Project Definition Alternate Project Definition User executing SCLM function Group member is in Type from the SCLM panel Member from the SCLM panel Flag Mode */ */ */ */ */ */ */ */ */
/* modify with list of types you want ownership checked for. */ /* Add in output types if you don't want outputs deleted by */ /* other than user who built them. */ testtypes = 'CNTLLIB COPYLIB COBOL DCLGEN JCLLIB PROCLIB SOURCE' RETURN /*********************************************************************/ /* Get the list of members to be deleted */ /*********************************************************************/ get_members: "alloc file("dummydd") dummy reuse" "alloc file("rptdd") recfm(v b) lrecl(133) blksize(15000) space(5 5)", "tracks reuse" /* "alloc file("flmmsgs") dummy reuse" */ /* Invoke the SCLM Database Contents Utility (SCLM 3.4) to report on /* all accounting records for specified group, type and change user. "FLMCMD DBUTIL,"proj","prjdf","group",,,,,,"type","member",*,"||, "*,*,*,*,YES,ACCT,*,,,,NORMAL,N,N,,"dummydd","dummydd","rptdd"," ||, "@@FLMGRP @@FLMTYP @@FLMMBR @@FLMCUS" saverc = rc */ */
if saverc > 0 then do say "DBUTIL return code = " rc exit 0030 end "EXECIO * DISKR "rptdd" (STEM rptline. FINIS)" if rc <> 0 then do say "Error reading EXIT output, return code = " rc exit 0040 end "FREE FILE("dummydd rptdd ")" return
269
FLMCNTRL parameters
These are the parameters: DELVFY=name of program DELVFYDS=dataset where program resides DELVFYCM=program call method DELVFYOP=exit options list Any return code other than 0 will stop the delete processing. This exit is new for OS/390 version 2.10.
/* REXX */ /**********************************************************************/ /* */ /* This exec allows only the person who last changed a member or a */ /* administrator to delete the member. This exit is invoked from */ /* Library Utility Delete (ISPF Option 10.3.1) or the delete service. */ /* */ /**********************************************************************/ trace o ARG parm /* parse arguments into variable parm */ /* TSO user id of the person invoking this rexx routine. tsouid = userid() CALL Initialize sclmadm = 'admid1 admid2' */
/* Use ACCTINFO to find out the change user for the member. CALL find_delete_member_owner
/* If the change user is same as the user invoking the delete service */ /* or the user invoking is an admin, then delete the module. */
270
if (zsaluser = tsouid) | (pos(tsouid,sclmadm) > 0) then say 'Member 'member' can be deleted from group 'group' type 'type else do say 'Can not delete member 'member' in group 'group' type 'type say 'Member is owned by 'strip(zsaluser) exit 0010 end exit /**********************************************************************/ /* Initialize all variables, parameters, .... */ /**********************************************************************/ Initialize: /* Parse parms passed by SCLM into variables & change to uppercase PARSE UPPER VAR parm exittype ',' proj ',' prjdf ',' tsouid ',' group ',' type ',' member ',' flag ',' mode exittype proj prjdf tsouid group type member flag mode return /**********************************************************************/ /* Use ACCTINFO to find out the owner of the module from the SCLM */ /* accounting record. */ /**********************************************************************/ find_delete_member_owner: ADDRESS TSO "FLMCMD ACCTINFO,"proj","prjdf","group","type","member",,,,,MATCH" if rc > 0 then do say "ACCTINFO return code = " rc say 'Please, contact SCLM administrator. ' exit 0030 end say 'owner is ' zsaluser return = = = = = = = = = STRIP(exittype,'T') STRIP(proj,'T') STRIP(prjdf,'T') STRIP(tsouid,'T') STRIP(group,'T') STRIP(type,'T') STRIP(member,'T') STRIP(flag,'T') STRIP(mode,'T') */ ,
271
FLMCNTRL parameters
These are the parameters: DELNTF=name of program DELNTFDS=dataset where program resides DELNTFCM=program call method DELNTFOP=exit options list Any return code other than 0 will stop the delete processing. The only problem with this is that the delete of the member has been completed so there is no net effect to this. This exit is new for OS/390 version 2.10.
/* REXX */ /**********************************************************************/ /* This rexx exec will delete members from the external libraries */ /* they were copied to if they are deleted from SCLM */ /**********************************************************************/ trace r /* o - off, r - result */ Address 'ISPEXEC' /* Set proper environment */ Arg parms Call Init /* Receive parms from SCLM /* Initialize variables */ */
If mode = 'REPORT' Then Exit /* Exit if REPORT mode */ If extyp = 'DGNOTIFY' |, /* Exit if not DELGROUP */ extyp = 'DNOTIFY' then nop /* or if not DELETE SERVICES*/ else exit If flag <> 'TEXT' & flag <> 'OUTPUT' Then Exit /* Exit not delt mem */ If WORDPOS(type,valid_types) = 0 Then Exit /* Exit - type not valid*/
272
if extyp = 'DNOTIFY' then do call do_delete group type member end else do /* Read all lines from exit file into stem variable Address 'TSO' "EXECIO * DISKR "ddname" (STEM EXTLINE. FINIS)" if extline.0 = 0 Then Exit do i = 1 To extline.0 /* Exit if exit file empty
*/
*/
/* For all lines in stem var*/ /* Get vars from exit file */ parse upper var extline.i eodata 9 eogroup 18 eotype 27 eomember, 36 eostatus 56 eooutput eodata = STRIP(eodata) /* Remove trailing blanks*/ eogroup = STRIP(eogroup) /* Remove trailing blanks*/ eotype = STRIP(eotype) /* Remove trailing blanks*/ eomember = STRIP(eomember) /* Remove trailing blanks*/ eostatus = STRIP(eostatus) /* Remove trailing blanks*/ eooutput = STRIP(eooutput) /* Remove trailing blanks*/ if eodata = 'MEMBER' Then do /* If member delete ok cont */ if eostatus = goodmsg | eostatus = warnmsg Then NOP else Iterate /* Skip bad records */ end Else Iterate /*Skip non-mem(bmap) deletes*/ /* process the member types that can be deleted if WORDPOS(eotype,valid_types) = 0 then iterate */
Call do_delete eogroup eotype eomember /* Delete the member from*/ /* external dataset */ end end Exit exitrc /**********************************************************************/ /* Init: Subroutine to initialize variables, examine the parms */ /* passed from SCLM, and set additional variables. */ /**********************************************************************/ Init: valid_types = 'CICSLOAD DBRMLIB LOAD' exitrc = 0 /* Exit return code */ /* Separate parms passed from SCLM*/ PARSE UPPER VAR parms extyp ',' proj ',' prjdf ',' tsouid ',', group ',' type ',' member ',' flag ',' mode extyp proj prjdf tsouid group type member flag = = = = = = = = STRIP(extyp,'T') STRIP(proj,'T') STRIP(prjdf,'T') STRIP(tsouid,'T') STRIP(group,'T') STRIP(type,'T') STRIP(member,'T') STRIP(flag,'T') /* /* /* /* /* /* /* /* Exit Type - where in SCLM Project - high level qualifier Alternate Project Definition User executing SCLM function From delete group Type from the SCLM panel Member from the SCLM panel Flag entered on SCLM panel */ */ */ */ */ */ */ */
273
mode
= STRIP(mode,'T')
*/
SELECT WHEN extyp = 'DGNOTIFY' THEN DO dgnotify = 'DGNOTIFY' goodmsg = 'DELETE SUCCESSFUL' warnmsg = 'DELETE WARNING' badmsg = 'DELETE FAILED' ddname = 'DGEXIT' END WHEN extyp = 'DNOTIFY' THEN DO dnotify = 'DNOTIFY' goodmsg = 'DELETE SUCCESSFUL' warnmsg = 'DELETE WARNING' badmsg = 'DELETE FAILED' END OTHERWISE SAY 'Invalid exit type for DELGRP user exit: 'extyp END Return do_delete: parse arg dgroup dtype dmbr /* Setup dataset for the delete */ Select When dtype = 'LOAD' then do outdsn = "RDBK."dgroup".LOADLIB" End When dtype = 'CICSLOAD' then do outdsn = "RDBK."dgroup".CICSLOAD" End Otherwise do say 'No delete necessary for type ' dtype return End End Member_To_Be_Deleted = "'"outdsn"("dmbr")'" if sysdsn(Member_To_Be_Deleted) = 'OK' then do Address 'TSO' "DELETE " Member_To_Be_Deleted exitrc = MAX(exitrc,rc) If exitrc <> 0 then do Say 'Could not delete ' Member_To_Be_Deleted end else do /* Member was copied successfully */ Say dmbr' has been deleted from 'outdsn end end return
274
FLMCNTRL parameters
These are the parameters: AVDVFY=name of program AVDVFYDS=dataset where program resides AVDVFYCM=program call method AVDVFYOP=exit options list Any non-zero return code will stop processing. This exit is new for OS/390 version 2.10.
275
FLMCNTRL parameters
These are the parameters: AVDNTF=name of program AVDNTFDS=dataset where program resides AVDNTFCM=program call method AVDNTFOP=exit options list Any return code other than 0 will stop the delete processing. The only problem with this is that the delete of the member has been completed. This exit is new for OS/390 version 2.10.
/* example of adding a user report option */ /* IF (&ZCMD = 8) */ /* &SLMUEXIT = 'CMD(USERUTIL)' */ IF (&ZCMD = B) &SLMUEXIT = 'CMD(SCLMBMAI)' IF (&ZCMD = U) &SLMUEXIT = 'PANEL(SCLMUOPT)' &OPT = &ZCMD
276
/* REXX */ /**********************************************************************/ /* Check if member being edited is part of a package that is being */ /* promoted by Breeze. If so either put out warning or stop the edit */ /**********************************************************************/ tsoid = userid() Address ISPEXEC 'VGET (SPRJ1,LIBDEF)' If LIBDEF = '' Then LIBDEF = SPRJ1 Arg PARM Parse var PARM GROUP ',' TYPE ',' MEMBER ',' LANG ',' , USERID ',' AUTHCODE ',' CCODE If MEMBER = '' Then Do Say 'Member name must be present. Either enter member ' Say 'name or use SCLM option 3.1 to process member lists' Exit_RC = 8 End Else Do
277
"ALLOC ddname(CIGIN) recfm(f b),lrecl(80) blksize(8000) space(1 1), tracks unit(vio)" "ALLOC F(CIGLOG) NEW TRACKS UNIT(VIO) BLKSIZE(13300) LRECL(133) RECFM(F B A) SPACE(1 1)" "ALLOC F(CIGRPT) NEW TRACKS UNIT(VIO) BLKSIZE(13300) LRECL(133) RECFM(F B A) SPACE(1 30)" "ALLOC F(CIGOUT) DUMMY REUSE " Exit_RC = 0 STATUS = 'PENDING' BZZ_rc = Extract_Breeze() If BZZ_rc = 0 Then Do If Member_in_package() = 4 then BZZ_rc = 8 Else BZZ_rc = 4 End If BZZ_rc = 4 Then Do STATUS = 'APPROVED' BZZ_rc = Extract_Breeze() If BZZ_rc = 0 Then Do If Member_in_package() = 4 then BZZ_rc = 8 Else BZZ_rc = 4 End End If BZZ_rc = 8 Then Do Say 'Member being edited is part of a PENDING/APPROVED' Say 'Breeze package. Edit not allowed until member has' Say 'been promoted from the 'Strip(GROUP)' group.' Say 'Breeze Package : 'package Say 'Package Details :' Say ' 'Package_details Exit_RC = 8 End "FREE "FREE "FREE "FREE DDNAME(CIGLOG)" DDNAME(CIGRPT)" DDNAME(CIGOUT)" DDNAME(CIGIN)"
End Exit (Exit_RC) Extract_Breeze : Address TSO Newstack QUEUE " REPORT PACKAGES * " QUEUE " WHERE STATUS = "STATUS QUEUE " WHERE PROJECT = "SPRJ1 QUEUE " WHERE ALTPROJ = *"
278
" WHERE GROUP = "GROUP " OPTIONS CONTENTS " " " " . " ""
x = msg("off") Address TSO "execio * diskw CIGIN (finis)" DELSTACK "CALL 'BZZ.SBZZLOAD(BZZS0000)' BZZ_rc = rc Return BZZ_rc "
Member_in_package : "EXECIO * DISKR CIGRPT (FINIS STEM INPUT." EOF = 'N' j = 0 I = 1 If I > INPUT.0 Then EOF = 'Y' Do While (EOF = 'N') If I > INPUT.0 Then EOF = 'Y' Do While (pos('FOR PACKAGE:',Strip(INPUT.I)) = 0 & EOF = 'N') I = I + 1 If I > INPUT.0 Then EOF = 'Y' End If pos('FOR PACKAGE:',Strip(INPUT.I)) > 0 then Do Parse var INPUT.I 'FOR PACKAGE: ' Package . I = I + 1 If I > INPUT.0 Then EOF = 'Y' End Do While (pos('PROJECT:',Strip(INPUT.I)) = 0 & EOF = 'N') I = I + 1 If I > INPUT.0 Then EOF = 'Y' End If pos('PROJECT:',Strip(INPUT.I)) > 0 then Do Package_details = INPUT.I I = I + 1 If I > INPUT.0 Then EOF = 'Y' End Do While (pos('MONITORED CONTENT',Strip(INPUT.I)) = 0 & EOF = 'N') I = I + 1 If I > INPUT.0 Then EOF = 'Y' End If pos('MONITORED CONTENT',Strip(INPUT.I)) > 0 then Do Do While (pos('FOR PACKAGE:',Strip(INPUT.I)) = 0 & EOF = 'N') parse var INPUT.I BZZMEM BZZPRJ BZZALT BZZGRP BZZTYP BZZLAN If BZZMEM = MEMBER &, BZZGRP = GROUP &, BZZTYP = TYPE Then
279
Do BZZ_rc = 4 Return BZZ_rc End I = I + 1 If I > INPUT.0 Then EOF = 'Y' End End Do While (pos('FOR PACKAGE:',Strip(INPUT.I)) = 0 & EOF = 'N') I = I + 1 If I > INPUT.0 Then EOF = 'Y' End End BZZ_rc = 0 Return BZZ_rc
280
/* REXX */ /**********************************************************************/ /* This exec will set up an ISPF environment for the execution of */ /* the build exits */ /**********************************************************************/ TRACE o ARG parm /* Parse arguments into variable parm */ CALL Init bldntfrc = 0 ADDRESS ISPEXEC "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(COPYEXTR)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(BINDEXTR)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(DEPLOY)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) exit bldntfrc Example 12-18 is the sample bind external exit. Notice that the exit uses file tailoring using ISPF skeletons. These skeletons will have to be created also as documented below. This exit will have to be customized with your DBRMLIB type and with the bind parameters you want to use for each group where the bind job needs to run.
Example 12-18 Bind exit example
/* REXX */ /**********************************************************************/ /* This exec is called from the promote purge exit and build exits */ /* to perform all binds for all groups. */ /* */ /* After including the proper skeletons for the bind it submits a */ /* job to perform the binds. The job is submitted in held job status*/ /* */ /**********************************************************************/ trace o /* trace facility */ ARG parm /* original sclm parms will be passed here */ CALL Init /* Initializations */ */ */
/* If the promote is done in the report mode this exec should not /* get executed. if mode = 'REPORT' then exit /* If not build exit 1 or promote purge exit return if extyp <> bldext1 & extyp <> prmext3 THEN exit /* Set the group for the bind SELECT WHEN extyp = bldext1 THEN bndgrp = fromgrp
*/
*/
281
WHEN extyp = prmext3 THEN bndgrp = togrp OTHERWISE exit END /* Select stmt */ /* Read all lines from exit file into a stem variable "execio * diskr "ddname" (stem extline. finis)" if extline.0 = 0 then /* If file was empty exit do i = 1 to extline.0 /* For all lines in stem variable /* add members to be processed to a set of ISPF tables call chkdb2 end /* If dbrmlib is being promoted then create jobs to process bind if db2mbrs > 0 then do call process saverc = rc if saverc <> 0 then do say ' Unable to create and submit bind job, rc is = ' saverc say ' Contact SCLM administrator' maxrc = MAX(maxrc,saverc) end end Exit maxrc /********************************************************************/ /* Init: Subroutine to initialize variables, examine the parms */ /* passed from SCLM, and set additional variables. */ /********************************************************************/ Init: ftopenV = 0 maxrc = 0 db2mbrs = 0 /* Bind Count */ /* Set standard BIND options */ flag = 'I' iso = 'CS' /* Break out the parms passed from the SCLM user exit */ PARSE UPPER VAR parm extyp ',' proj ',' prjdf ',' tsouid ',', fromgrp ',' type ',' member ',' scope ',' mode ',' togrp extyp proj prjdf tsouid fromgrp type member scope mode = = = = = = = = = STRIP(extyp,'T') STRIP(proj,'T') STRIP(prjdf,'T') STRIP(tsouid,'T') STRIP(fromgrp,'T') STRIP(type,'T') STRIP(member,'T') STRIP(scope,'T') STRIP(mode,'T') /* /* /* /* /* /* /* /* /* Exit Type - where in SCLM? Project - high level qualifier Alternate Project Definition User executing SCLM function From grp(Promote) or build grp Type from the SCLM panel Member from the SCLM panel Scope entered on SCLM panel Mode entered on SCLM panel */ */ */ */ */ */ */ */ */ */ */
*/ */
*/
282
togrp bnduser
= STRIP(togrp,'T') = tsouid
*/
SELECT WHEN extyp = DO Bldext1 goodmsg badmsg ddname END WHEN extyp = DO Prmext3 goodmsg badmsg ddname END
OTHERWISE SAY 'Invalid exittype for BIND user exit: 'extyp END /* Select stmt */ Return /********************************************************************/ /* chkdb2: Subroutine to process each exit record to determine */ /* if any database programs are being processed */ /********************************************************************/ chkdb2: /* process each member from exit file */
/* Extract variables from a line out of the exit file */ parse upper var extline.i eogroup 10 eotype 19 eomember 28 eostatus eomember= STRIP(eomember) eogroup = STRIP(eogroup) eotype = STRIP(eotype) eostatus= STRIP(eostatus) mbr = eomember bindmbr = mbr /* If member ok continue */ if eostatus = goodmsg then do if eotype = 'DBRM' then do call addBind end /* if eotype is dbrmlib end /* if eostatus is goodmsg Return
*/ */
283
/* */ /********************************************************************/ addBind: Address ISPEXEC call setBindParms if db2mbrs = 0 then do /* create table to hold the OP members that need a BIND */ "TBCREATE DB2MBRS NAMES(mbr pkg qual own act val exp) NOWRITE REPLACE" saverc = rc maxrc = MAX(maxrc,saverc) end "TBADD DB2MBRS" saverc = rc maxrc = MAX(maxrc,saverc) if saverc = 0 then db2mbrs = db2mbrs + 1 return /* Add member to table */
/********************************************************************/ /* */ /* Process: Subroutine to include the bind job skeletons */ /* */ /********************************************************************/ Process: Address 'ISPEXEC' /* Issue all commands to ISPF */ if db2mbrs > 0 then do "FTOPEN TEMP" if bndgrp <> 'PROD' then "FTINCL BINDJOB" else "FTINCL BINDJOBP"
*/
*/ */ */
/* Include DB2 Bind Statements "FTINCL BINDMBR" saverc = rc if saverc <> 0 then do say ' Unable to include the bind skeleton, rc is = ' saverc say ' Contact SCLM administrator' maxrc = MAX(maxrc,saverc) end "TBEND DB2MBRS"
if saverc = 0 then call submit_job saverc = rc if saverc <> 0 then do say ' Unable to submit the bind job, rc is = ' rc say ' Contact SCLM administrator'
284
maxrc = MAX(maxrc,saverc) end return /**********************************************************************/ /* Close file tailoring and submit bind job */ /**********************************************************************/ Submit_job: subrc = 0 "FTINCL BINDEND" subrc = rc if subrc say ' say ' maxrc end /* Finished file tailoring */
<> 0 then do Unable to include the bindend skeleton, rc is = ' rc Contact SCLM administrator' = MAX(maxrc,subrc)
"FTCLOSE" subrc = rc
*/
if subrc = 0 Then do "VGET ZTEMPF" address TSO Dummy = Outtrap("cmd_output_line.","*") Address 'TSO' "SUBMIT '"ztempf"'" subrc = rc Parse Var cmd_output_line.1 . jobname "(" jobnum ")" . if subrc = 0 then do say copies('*',79) say left('* A bind job for all members'||, ' has been submitted in held job status .',77) '*' say left('* Job name: 'jobname' , Job Id: '||, jobnum'.',77) '*' say left('* Please release the job when'||, ' you are ready to have the binds performed.',77) '*' say copies('*',79) end else do say copies('*',79) say left('* The submit of the bind job '||, 'has failed.',77) '*' say copies('*',79) subrc = 100 end end maxrc = MAX(maxrc,subrc) Return subrc /**********************************************************************/ /* Setup the Bind Parameters for the group and database */ /**********************************************************************/ setBindParms:
285
select when bndgrp = 'DEV1' | bndgrp = 'DEV2' then do sys = 'DI11' pkg = bndgrp qual = 'DEVDBA' own = 'DEVDBA' exp = 'NO' val = 'RUN' act = 'REP' end when bndgrp = 'TEST' then do sys = 'DI11' pkg = bndgrp qual = 'TESTDBA' own = 'TESTDBA' exp = 'NO' val = 'RUN' act = 'REP' end when bndgrp = 'PROD' then do sys = 'DI11' pkg = bndgrp qual = 'PRODDBA' own = 'PRODDBA' exp = 'NO' val = 'RUN' act = 'REP' end otherwise do say 'INVALID GROUP PASSED' say 'GROUP PASSED IS' bndgrp say 'CONTACT SCLM ADMINISTRATOR' EXIT 312 end end return Example 12-19 is the non-PROD bind job skeleton (BINDJOB) used by the bind exit. It needs to be put in the same skeleton library as your customized FLMLIBS skeleton. The job card and steplib will have to be coded to local standards. Remove the typrun=hold line if you want the bind to be immediate.
Example 12-19 BINDJOB skeleton
//SCLMBIND JOB (ACCOUNT),'SCLM BIND IN &BNDGRP.', // TYPRUN=HOLD, // MSGCLASS=X,MSGLEVEL=(1,1), // NOTIFY=&&SYSUID //* //****************************************************************** //* SCLM BIND JOB * //****************************************************************** //DB2BIND EXEC PGM=IKJEFT1A,REGION=2560K //STEPLIB DD DSN=DB2.V810.SDSNLOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=*
286
//SYSOUT DD SYSOUT=* //DBRMLIB DD DSN=&PROJ..&BNDGRP..DBRM,DISP=SHR //SYSTSIN DD * DSN SYSTEM(&SYS.) Example 12-20 is the production bind job skeleton (BINDJOBP) used by the bind exit. It needs to be put in the same skeleton library as your customized FLMLIBS skeleton. It needs to be customized for your local environment and the JOBPARM statement needs to be coded to point to your production LPAR if you wan to run the bind job there.
Example 12-20 BINDJOBP skeleton
//SCLMBNDP JOB (ACCOUNT),'SCLM BIND IN &BNDGRP.', // TYPRUN=HOLD, // MSGCLASS=X,MSGLEVEL=(1,1), // NOTIFY=&&SYSUID /*JOBPARM S=PROD //* //****************************************************************** //* SCLM BIND JOB * //****************************************************************** //DB2BIND EXEC PGM=IKJEFT1A,REGION=2560K //STEPLIB DD DSN=DB2.V810.SDSNLOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSOUT DD SYSOUT=* //DBRMLIB DD DSN=&PROJ..&BNDGRP..DBRM,DISP=SHR //SYSTSIN DD * DSN SYSTEM(&SYS.) Example 12-21 is the BINDMBR skeleton. You will need to customize this with the bind values that you want to vary from member to member and with any values that you want to code specifically for each program. Corresponding changes to the bind exit would have to be performed also.
Example 12-21 BINDMBR skeleton
)DOT DB2MBRS BIND PACKAGE (&PKG.) MEMBER(&MBR.) OWNER (&OWN.) QUALIFIER (&QUAL.) VALIDATE (&VAL.) ISOLATION (&ISO.) ACTION(&ACT.) EXPLAIN (&EXP.) )ENDDOT Example 12-22 is the small BINDEND skeleton.
Example 12-22 BINDEND skeleton
/* //*
287
288
13
Chapter 13.
289
290
ddname substitution list in order to allocate the correct data set name for the program. (An intermediate translator is not needed if the succeeding translator supports DDNAME substitution lists; in this case, the succeeding translator can hard-code the DDNAME and use IOTYPE=U on the FLMALLOC macro.) Complex conditional execution: A JCL runstream that specifies skipping all steps after a specified condition code from one or more previous steps is directly converted to appropriate FLMTRNSL macros with appropriate GOODRC values. Other conditional executions of BUILD translators can be addressed by using the FLMTCOND macro. For example, if the JCL is set up to run BUILD translator X if any previous return code is 4, but run Build translator Y if any previous return code is 8, you can use the FLMTCOND macro. FLMTCOND is only valid for use with BUILD translators. Conditional execution of non-BUILD translators can require modification of the translators or interface programs to handle the control of execution. TSO Address Space compatibility: Some programs that run from JCL will not run in the TSO Address Space in which SCLM resides without a special interface translator. IBM has provided interface programs for several common IBM programs with this characteristic. For example, the FLMTMSI (SCRIPT), FLMTMJI (JOVIAL), and FLMTMMI (DFSUNUB0) translators all use the TSO Service Facility IKJEFTSR. If you have JCL that runs program XYZ without any errors, but fails when you try to run program XYZ from an FLMTRNSL macro, this may be the problem. You must write a translator to call the program using IKJEFTSR. The following sections describe how to convert JCL statements and runstreams into functionally equivalent SCLM language definitions and provide suggested strategies for working around restrictions and conflicts.
//STEP1
EXEC
PGM=IEFBR14
Example 13-2 shows an SCLM FLMTRNSL macro that performs the same task as the JCL statement in Example 13-1.
Example 13-2 Running program IEFBR14 from an SCLM translator
* FLMTRNSL COMPILE=IEFBR14,FUNCTN=BUILD,PORDER=0
FLMTRNSL's COMPILE option specifies the name of the program to execute (IEFBR14.) The FUNCTN parameter specifies here that IEFBR14 will be invoked when the user requests a
Chapter 13. Creating language definitions from JCL
291
BUILD, and the PORDER value of 0 tells SCLM that neither an option list nor a ddname substitution list will be passed to IEFBR14. Example 13-3 is a slightly more complex example. We want to use a translator program named GAC to copy the contents of TSOSCxx.DEV1.SOURCE(MEMBER1) into TSOSCxx.DEV1.LIST(MEMBER1). The GAC program itself requires a SYSIN data set, which is empty in this example.
Example 13-3 Running program GAC from JCL
EXEC DD DD DD
Example 13-4 shows the SCLM language definition that performs the same task as the JCL in Example 13-3.
Example 13-4 Running program GAC from an SCLM translator
* FLMTRNSL * FLMALLOC FLMCPYLB * FLMALLOC FLMCPYLB * FLMALLOC FLMCPYLB * As before, the FLMTRNSL macro is used to specify the name of the program to run. The FLMALLOC and FLMCPYLB statements allocate the existing data sets to ddnames. IOTYPE=A,DDNAME=OUTPUT TSOSCxx.DEV1.LIST(MEMBER1) IOTYPE=A,DDNAME=INPUT TSOSCxx.DEV1.SOURCE(MEMBER1) IOTYPE=A,DDNAME=SYSIN NULLFILE COMPILE=GAC,FUNCTN=BUILD,PORDER=0
//STEP1 //STEP2
EXEC EXEC
PGM=ABC PGM=XYZ,COND=(4,LT)
In SCLM, the GOODRC parameter on the FLMTRNSL macro allows you to specify return code values for conditional execution. In Example 13-6, the GOODRC parameter for program ABC is set to 4. If ABC ends with a return code greater than 4, processing ends; program XYZ will not execute.
Example 13-6 Specifying conditional execution in an SCLM Language definition
292
In Example 13-7, program XYZ runs only if the return code from program ABC is 4 or less. Program MBS is to execute after program XYZ regardless of the previous return codes.
Example 13-7 More complex conditional expression using JCL
In SCLM, the GOODRC parameter on the FLMTRNSL macro specifies when to skip all remaining translators in the language definition. Therefore, in Example 13-8, the FLMTCOND macro is used so that execution can skip program XYZ but continue with program MBS.
Example 13-8 More complex conditional expression with SCLM language definition
293
SCLM uses an FLMALLOC macro with IOTYPE=W to allocate a work (temporary) file with the ddname of SYSPUNCH. This work file is passed to the next FLMTRNSL macro. 7. The JCL has a job step named COB, which is the second translator called in this job. SCLM uses an FLMTRNSL macro to call this translator. This is the second FLMTRNSL macro for build in our language definition. 8. The job step COB executes (EXEC PGM=) a program called IGYCRCTL, the compiler for Enterprise COBOL. SCLM uses the COMPILE=IGYCRCTL statement on the FLMTRNSL macro. 9. To pass compiler options to the Enterprise COBOL compiler, the COB job step uses a PARM=parameter of the EXEC statement. SCLM uses the OPTIONS= parameter of the FLMTRNSL macro to perform the same task. 10.This job has conditional execution for the COB step via the COND(5,GE) JCL parameter of the EXEC statement. The COB step will not execute if the return code of the TRN step is greater than 4. SCLM sets the GOODRC keyword parameter for the TRN step (CICS preprocessor) equal to 4. Build halts execution of all translators following the TRN step in the language definition if the return code from the TRN step is greater than 4. 11.The STEPLIB statement in the COB job step tells the job where to find the program IGYCRCTL. SCLM uses the DSNAME= option on the FLMTRNSL macro. Both the STEPLIB and DSNAME point to the same data set,ECOBOL.V340.SIGYCOMP. 12.The SYSLIB statement in job step COB tells the job where to find the system type includes. The language definition uses the FLMSYSLB macro with IOTYPE=I and the FLMINCLS macro to do the same task. SCLM allocates these project data sets allocated for IOTYPE=I before the data sets on the FLMCPYLB macro(s). ALCSYSLB=Y parameter must be specified on the FLMLANGL macro to ensure that the FLMSYSLB data sets are allocated to the IOTYPE=I ddnames. Because PORDER=3 is being used, the SYSLIB DD is the fourth ddname passed to the compiler in a ddname substitution list. The COBOL compiler uses the fourth ddname as SYSLIB no matter what value is assigned to the DDNAME keyword parameter on the FLMALLOC macro. 13.For each system library specified for the SYSLIB DD, the language definition has an FLMSYSLB macro. In this case both CICS.TS31.CICS.SDFHCOB and CICS.TS31.CICS.SDFHMAC are specified. 14.The COB job step sends the compile listing to the printer using the SYSPRINT statement. SCLM uses an FLMALLOC macro to allocate an output data set to the ddname SYSPRINT. 15.In the COB job step, the SYSIN DD statement identifies the data set that contains the member to compile. This is the output of the CICS preprocessor step TRN. SCLM uses an FLMALLOC macro with IOTYPE=U to refer to a ddname from a prior step. The language definition instructs MVS to allocate the data set assigned in the TRN step to the ddname SYSPUNCH.
294
16.The SYSLIN statement in the COB step identifies the output data set for object code created by the COBOL compiler. The language definition uses an FLMALLOC macro with IOTYPE=O to allocate an output file. This FLMALLOC macro is the first in the COB FLMTRNSL because when using PORDER=3, the Enterprise COBOL compiler expects the output data set ddname to be first in a ddname substitution list. 17.The COB step allocates SYSUT1 as a temporary work file for the Enterprise COBOL compiler. SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the eighth file provided to the OS COBOL compiler because PORDER=3 tells SCLM that we are using a ddname substitution list. 18.The COB step allocates SYSUT2 as a temporary work file for the Enterprise COBOL compiler. SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the ninth file provided to the Enterprise COBOL compiler because we are using a ddname substitution list. 19.The COB step allocates SYSUT3 as a temporary work file for the Enterprise COBOL compiler. SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the tenth file provided to the Enterprise COBOL compiler because we are using a ddname substitution list. 20.The COB step allocates SYSUT4 as a temporary work file for the Enterprise COBOL compiler. SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the eleventh file provided to the Enterprise COBOL compiler because we are using a ddname substitution list. 21.The COB step allocates SYSUT5 as a temporary work file for the Enterprise COBOL compiler. SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the twelfth file provided to the Enterprise COBOL compiler because we are using a ddname substitution list. 22.SCLM language definition only The language definition uses PORDER=3 for the Enterprise COBOL compiler step (COB) to use a ddname substitution list. A ddname substitution list provides an ordered list (defined by the translator) of ddnames such that the position of a ddname in the list, and not the actual ddname, is used by the translator for a specific file. The input file for the compiler must be the output file from the CICS preprocessor. The ddname assigned in the TRN step is SYSPUNCH. Because this file has already been allocated to SYSPUNCH, another way (besides ddname) is needed to pass this file as the input to the compiler. By using PORDER=3, SCLM passes all the files that can be used by the OS COBOL compiler in the order specified for this compiler. To use PORDER=3, a specific parameter string must be built. The language definition must have an FLMALLOC macro for each of these parameters. Those FLMALLOCs that are tagged for STEP 22 are not applicable for the Enterprise COBOL compiler. SCLM places 8 bytes of hexadecimal zeros into the ddname substitution list for each FLMALLOC with IOTYPE=N.
295
Note: For reference purposes, the language definition shown in Example 13-10 on page 297 contains comments with step numbers placed in the middle of commands; for this language definition to assemble and link into a project definition, these comments must be removed.
Example 13-9 JCL: Invoke CICS Preprocessor and COBOL Compiler
//USERIDC JOB (AS05CR,T12,C531),'USERID',NOTIFY=USERID,CLASS=A, // MSGCLASS=O,MSGLEVEL=(1,1) //* //* THIS PROCEDURE CONTAINS 2 STEPS //* 1. EXEC THE CICS TS PREPROCESSOR //* 2. EXEC THE ENTERPRISE COBOL COMPILER //* //* CHANGE THE JOB NAME AND THE ACCOUNTING INFORMATION TO MEET THE //* REQUIREMENTS OF YOUR INSTALLATION. //* //* CHANGE 'PROGNAME' TO THE NAME OF THE CICS/COBOL PROGRAM YOU //* WANT TO COMPILE. CHANGE 'USERID' TO YOUR USERID. //* //* CHANGE 'DEVLEV' TO THE GROUP THAT CONTAINS THE PROGRAM TO BE COMPILED. //* //* STEP 1: TRN STATEMENT; STEP 2: EXEC PGM STATEMENT //* //TRN EXEC PGM=DFHECP1$, //* //* STEP 3: STEPLIB STATEMENT //* // REGION=2048K //STEPLIB DD DSN=CICS.TS31.CICS.SDFHLOAD,DISP=SHR //* //* STEP 4: SYSIN STATEMENT //* //SYSIN DD DSN=USERID.DEVLEV.SOURCE(PROGNAME),DISP=SHR //* //* STEP 5: SYSPRINT STATEMENT //* //SYSPRINT DD SYSOUT=* //* //* STEP 6: SYSPUNCH STATEMENT //* //SYSPUNCH DD DSN=&&SYSCIN, // DISP=(,PASS),UNIT=SYSDA, // DCB=BLKSIZE=0, // SPACE=(CYL,(5,2)) //* //* STEP 7: COB STATEMENT; STEP 8: EXEC PGM STATEMENT //* STEP 9: PARM STATEMENT; STEP 10: COND STATEMENT //* //COB EXEC PGM=IGYCRTCL,REGION=2048K,COND=(4,GT), // PARM='NOTRUNC,NODYNAM,LIB,SIZE=256K,BUF=32K,APOST,DMAP,XREF' //* //* STEP 11: STEPLIB STATEMENT
296
//* //STEPLIB DD DSN=Ecobol.V340.Sigycomp,DISP=SHR //* //* STEP 12: SYSLIB STATEMENT; STEP 13: DD STATEMENT CONCATENATION //* //SYSLIB DD DSN=CICS.TS31.CICS.SDFHCOB,DISP=SHR // DD DSN=CICS.TS31.CICS.SDFHMAC,DISP=SHR //* //* STEP 14: SYSPRINT STATEMENT //* //SYSPRINT DD SYSOUT=* //* //* STEP 15: SYSIN STATEMENT //* //SYSIN DD DSN=&&SYSCIN,DISP=(OLD,DELETE) //* //* STEP 16: SYSLIN STATEMENT //* //SYSLIN DD DSN=USERID.DEVLEV.OBJ(PROGNAME),DISP=SHR //* //* STEP 17: SYSUT1 STATEMENT //* //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 18: SYSUT2 STATEMENT //* //SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 19: SYSUT3 STATEMENT //* //SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 20: SYSUT4 STATEMENT //* //SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 21: SYSUT5 STATEMENT //* //SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(5,2))
Example 13-10 SCLM Language Definition: Invoke CICS Preprocessor and COBOL
*********************************************************************** * SCLM LANGUAGE DEFINITION FOR * ENTERPRISE COBOL WITH CICS TS PREPROCESSOR 3.1 * * CICS TS OUTPUT IS PASSED VIA THE CICSTRAN DD ALLOCATION TO ENTERPRISE COBOL. * * POINT THE FLMSYSLB MACRO(S) AT ALL 'STATIC' COPY DATASETS. * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * WHEN A NEW TRANSLATOR VERSION REQUIRES TOTAL RECOMPILATION FOR THIS * LANGUAGE, THE 'VERSION' FIELD ON FLMLANGL SHOULD BE CHANGED. *********************************************************************** *
297
COBCICS FLMSYSLB CICS.TS31.CICS.SDFHCOB * FLMLANGL LANG=COBCICS,VERSION=CICSTS31,ALCSYSLB=Y * * PARSER TRANSLATOR * FLMTRNSL CALLNAM='SCLM COBOL PARSE', FUNCTN=PARSE, COMPILE=FLMLPCBL, PORDER=1, OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * * BUILD TRANSLATORS * - CICS PRECOMPILE - STEP NAME TRN * * STEP 1 FLMTRNSL CALLNAM='CICS PRE-COMPILE', FUNCTN=BUILD, * STEP 2 COMPILE=DFHECP1$, * STEP 3 (* STEPLIB *) DSNAME=CICS.TS31.CICS.SDFHLOAD, VERSION=3.1, * STEP 10 (* COND *) GOODRC=4, PORDER=1 * STEP 4 (* SYSIN *) FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80, DDNAME=SYSIN * STEP 5 (* SYSPRINT *) FLMALLOC IOTYPE=O,RECFM=FBA,LRECL=121, RECNUM=35000,PRINT=Y,DDNAME=SYSPRINT * * STEP 6 (* SYSPUNCH *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80, RECNUM=5000,DDNAME=SYSPUNCH * * STEP 7 (*COBOL INTERFACE - STEP NAME COB *) * STEP 8 FLMTRNSL CALLNAM='COBOL COMPILE', FUNCTN=BUILD, COMPILE=IGYCRCTL, * STEP 11 (* STEPLIB *) DSNAME=ECOBOL.V340.SIGYCOMP, VERSION=3.4.0, GOODRC=4, * STEP 22 PORDER=3, * STEP 9 (* PARMS *) OPTIONS=(NOTRUNC,NODYNAM,LIB,SIZE=256K,BUF=32K,APOST, DMAP,XREF)* DDNAME ALLOCATIONS * STEP 16
C C C C
C C C C C C
C C C C C C C C
298
* STEP * 7
* STEP * 13
* STEP * 14
(* N/A *) FLMALLOC IOTYPE=N 12; STEP 13 (* SYSLIB *) FLMALLOC IOTYPE=I,KEYREF=SINC 15 (* SYSIN *) FLMALLOC IOTYPE=U,KEYREF=SINC,DDNAME=SYSPUNCH 14 (* SYSPRINT *) FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=VBA,LRECL=137, RECNUM=500000,PRINT=Y,DFLTTYP=LIST 22 (* SYSPUNCH *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE 17 (* SYSUT1 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 18 (* SYSUT2 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 19 (* SYSUT3 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 20 (* SYSUT4 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 22 (* SYSTERM *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE 21 (* SYSUT5 *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE 22 (* SYSUT6 *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE
299
300
14
Chapter 14.
301
302
303
14.1.2 Option 1: Debug side file under SCLM - default temporary name
This could be described as being the default behavior, and is the easiest to set up from an SCLM language translator point of view. For most implementations of SCLM with Debug Tool this option will work just fine. Using the EQADEBUG DD or SET DEFAULT LISTING is the easiest way to let Debug Tool know where to find the listings. Note: If you are also going to be using Fault Analyzer, then the preferred way to find the listings may be by use of the EQAUEDAT user exit. This is a user exit that can be coded to give a location of the debug side file based on the location of the load module. For example if the load module is being run from the PROD library, then EQAUEDAT can be set up to get the side file from the PROD library. Fault Analyzer will also run the Debug Tool EQAUEDAT user exit to determine the location of the side files. As you are storing the Debug Tool side file in SCLM, you have to define the type to SCLM. In your project definition, make sure you have specified a FLMTYPE macro for the side files. In our example, we use SYSDEBUG as the type, so you require an FLMTYPE SYSDEBUG. Allocate the PDS or PDSE that will contain the side files for each level of the hierarchy. The Debug Tool Version 7 Configuration Guide states: If the users use COBOL or PL/I separate debug files, verify that the users specify the following attributes for the PDS or PDSE that contains the separate debug files: RECFM=FB LRECL=1024 BLKSIZE set so that the system determines the optimal size Important: Users must allocate files with the correct attributes to optimize the performance of Debug Tool. Note: Side files can be created using the TEST SEPERATE option under the following COBOL and PL/I compilers: Enterprise COBOL for z/OS and OS/390, Version 3 COBOL for OS/390 & VM, Version 2 Release 2 COBOL for OS/390 & VM, Version 2 Release 1 with APAR PQ40298 Enterprise PL/I for z/OS(R), Version 3 Release 5
FLMTRNSL
CALLNAM='ENTERPRISE COBOL COMPILER', C FUNCTN=BUILD, COMPILE=IGYCRCTL, DSNAME=ECOBOL.V340.SIGYCOMP, VERSION=3.1, GOODRC=0, PORDER=1, OPTIONS=(XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ)
C C C C C C
304
FLMTRNSL
CALLNAM='ENTERPRISE COBOL COMPILER', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C DSNAME=ECOBOL.V340.SIGYCOMP, C VERSION=3.1, C GOODRC=0, C PORDER=1, C OPTIONS=(XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ,TESTC (ALL,SYM,SEP))
Next we add an extra SYSDEBUG DD. Depending on if you are using DDNAME substitution, this will alter how you specify the DD. If you are using PORDER=1, so no DDNAME substitution, then add the SYSDEBUG DD at the end of the build translator with the following FLMALLOC statements as shown in Example 14-3.
Example 14-3 New FLMALLOC statement for SYSDEBUG DD
C C
Notice the LRECL of 1024 for the SYSDEBUG DD. This matches what you have allocated for the SYSDEBUG type datasets as stated in the Debug Tool Customization Guide as the most optimum size for performance. The completed build steps of the translator are shown in Example 14-4.
Example 14-4 Enterprise COBOL language translator with debug options
* *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C CALLMETH=LINK, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --ENTERPRISE COBOL INTERFACE-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE COBOL COMPILER', C FUNCTN=BUILD, C
Chapter 14. Debugging and fault analysis with SCLM
305
COMPILE=IGYCRCTL, C DSNAME=ECOBOL.V340.SIGYCOMP, C VERSION=3.1, C GOODRC=0, C PORDER=1, C OPTIONS=(XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ,TESTC (ALL,SYM,SEP)) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, C RECNUM=5000,DFLTTYP=OBJ * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC * FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT2,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT3,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT4,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT5,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT6,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT7,RECNUM=5000 * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=O,DDNAME=SYSPRINT,KEYREF=LIST, C RECFM=FBA,LRECL=133, C RECNUM=50000,PRINT=Y,DFLTTYP=LIST * FLMALLOC IOTYPE=O,DDNAME=SYSDEBUG,KEYREF=OUT1, C RECFM=FB,LRECL=1024, C RECNUM=50000,PRINT=Y,DFLTTYP=SYSDEBUG
306
Example 14-5 Enterprise PL/I V3.5 language translator with debug options
* *********************************************************************** * --PL/I ENTERPRISE INTERFACE-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE PL/I COMPILER', C FUNCTN=BUILD, C COMPILE=IBMZPLI, C DSNAME=EPLI.V350.SIBMZCMP, C VERSION=4.0, C GOODRC=0, C PORDER=1, C OPTIONS=(MACRO,OBJECT,SOURCE,XREF,TEST(ALL,SYM,SEP)) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ,RECNUM=5000,DFLTTYP=OBJ FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 @02C * 2@02D FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE FLMALLOC IOTYPE=O,DDNAME=SYSPRINT,KEYREF=LIST,DFLTTYP=LIST, C PRINT=Y,RECNUM=5000 * FLMALLOC IOTYPE=O,DDNAME=SYSDEBUG,KEYREF=OUT1, C RECFM=FB,LRECL=1024, C RECNUM=50000,PRINT=Y,DFLTTYP=SYSDEBUG * *
Figure 14-1 Build report showing generate debug side files Chapter 14. Debugging and fault analysis with SCLM
307
The new SYSDEBUG file is added by SCLM to the build map or the COBOL source file so that when the source is promoted, the debug file will be promoted with it. If we look inside the OBJ module, which is link-edited into the LOAD module, we see the reference to the debug side file and the fact that it has the temporary data set name allocated by SCLM, as shown in Figure 14-2. .TXT .TXT .TXT .TXT ..m .. ... ... .. .. .. .. ...j.0..}}.\}.q.}..K.J..j....&.J. .J..*0.. .....DEBUGINF.....+...................SYS06336.T083010.R ..A000.DOHERTL.SYSDEBUG.H01...............IDBA........... ......} .......=.... ....................................
This is not an issue if you are going to be using the EQADEBUG DD statement or SET DEFAULT LISTING to subsequently allocate the correct SCLM controlled SYSDEBUG datasets to your testing procedures or CICS region JCL
/* REXX */ "ALLOC F(SYSPRINT) DA(*)" "ALLOC F(INSPPREF) DA('DOHERTL.INSPPREF')" "CALL 'SCLM07.DEV1.LOAD(STARTAPP)' '/TEST'" "FREE "FREE Exit F(SYSPRINT)" F(INSPPREF)"
The file DOHERTL.INSPPREF contains any Debug Tool preferences you may have set. In this example we are only setting the SET DEFAULT LISTING command as shown in Figure 14-3.
308
-----------------------------------------------------------------------------EDIT DOHERTL.INSPPREF Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ***************************** 000001 SET DEFAULT LISTING ('SCLM07.DEV1.SYSDEBUG','SCLM07.TEST.SYSDEBUG', 000002 'SCLM07.PROD.SYSDEBUG') ****** **************************** Bottom of Data ***************************
Figure 14-3 Debug Tool preferences file
Even though the load module has the SCLM temporary name, Debug Tool will find the correct side file in the concatenation of data sets specified in the SET DEFAULT LISTING command, shown in Figure 14-4. COBOL LOCATION: STARTAPP initialization Command ===> Scroll ===> PAGE MONITOR --+----1----+----2----+----3----+----4----+----5----+----6 LINE: 0 OF 0 ******************************* TOP OF MONITOR ******************************** ****************************** BOTTOM OF MONITOR ******************************
SOURCE: STARTAPP -1----+----2----+----3----+----4----+----5----+- LINE: 1 OF 51 ******************************** TOP OF SOURCE ******************************** 1 000100* --------------------------------------------------. 2 000200* IDE Sample Program . 3 000300* --------------------------------------------------. 4 000400 Identification Division. . 5 000500 Program-ID. StartApp. . LOG 0----+----1----+----2----+----3----+----4----+----5----+---- LINE: 11 OF 14 0011 *** User preferences file commands follow *** 0012 SET DEFAULT LISTINGS ( 'SCLM07.DEV1.SYSDEBUG', 'SCLM07.TEST.SYSDEBUG', 0013 'SCLM07.PROD.SYSDEBUG' ) ; 0014 *** User preferences file commands end ***
Figure 14-4 Starting Debug Tool finds the concatenation of debug side files
/* REXX */ "ALLOC F(SYSPRINT) DA(*)" "ALLOC F(INSPPREF) DA('DOHERTL.INSPPREF')" "ALLOC F(EQADEBUG) DA('SCLM07.DEV1.SYSDEBUG',
309
'SCLM07.TEST.SYSDEBUG', 'SCLM07.PROD.SYSDEBUG') SHR" "CALL 'SCLM07.DEV1.LOAD(STARTAPP)' '/TEST'" "FREE "FREE "FREE Exit F(SYSPRINT)" F(INSPPREF)" F(EQADEBUG)"
SOURCE: PRINTAPP -1----+----2----+----3----+----4----+----5----+- LINE: 1 OF 28 ******************************** TOP OF SOURCE ******************************** 1 000100 Identification Division. . 2 000200 Program-ID. PRINTAPP. . 3 000300 . 4 000400 Data Division. . 5 000500 Working-Storage Section. . LOG 0----+----1----+----2----+----3----+----4----+----5----+---- LINE: 31 OF 34 0031 SET SOURCE ON ( "STARTAPP" ) SCLM07.DEV1.SYSDEBUG(STARTAPP) ; 0032 The debug information for STARTAPP has already been validated, changing 0033 the debug file is not allowed. The command will not be performed. 0034 SET SOURCE ON ( "PRINTAPP" ) SCLM07.DEV1.SYSDEBUG(PRINTAPP) ; PF 1:? 2:STEP 3:QUIT 4:LIST 5:FIND 6:AT/CLEAR PF 7:UP 8:DOWN 9:GO 10:ZOOM 11:ZOOM LOG 12:RETRIEVE
Figure 14-5 Using the SET SOURCE command in Debug Tool
310
14.1.3 Option 2: Debug side file under SCLM - correct side file name at compile time
This option is very similar to option 1 except that the name of the debug side file is a real data set rather than a temporary dataset name. When the side file that is stored in SCLM is promoted with the source code, OBJ and load module, the name of the debug side file will still show the name of the side file that was created at build time. As, by default, SCLM does not re-build on promote, the name of the side file will not change but the location of the side file will. The advantages this gives over Option 1 are minimal. It allows you to see a more meaningful name in the OBJ or load module, but this will not change how Debug Tool searches for the file. As you start Debug Tool, if the side file has been promoted, you will still get an error saying Debug Tool cannot find the file. You will still have to use one of Debug Tools methods, as listed previously, to locate the side file. This method may be the preferred approach if you are also going to be using Fault Analyzer at your site. The reason for this is Fault Analyzer will run Debug Tools EQAUEDAT user exit if it has been set up to change the listing location. By having a real data set name passed to EQAUEDAT, it will be easier for the user exit to set the location of the listing based on the location of the load module that is running. This way you will have a single method, EQAUEDAT, defined for both Debug Tool and Fault Analyzer, making it easier to maintain. This also means that you do not have to put EQADEBUG DDs into all your CICS regions. There are other reasons why you still might want to set up the SCLM language translators in this way. For example, when you start Debug Tool, it will be easier to specify the SET SOURCE command as in the LIST option as you just have to overtype the group level. Also you may only debug at the development level, so for the modules that you have compiled with debug on, they will always be in the development group. In which case you can step only in those modules with debugging turned on, and because the load module has the correct location of the file, Debug Tool will find the file without having to use the SET DEFAULT LISTING command or EQADEBUG DD. As stated in 14.1.2, Option 1: Debug side file under SCLM - default temporary name on page 304, you must create the data sets that contain the side files and add the FLMTYPE macro for this type to your project definition.
311
* FLMALLOC IOTYPE=A,DDNAME=SYSDEBUG,DISP=SHR FLMCPYLB @@FLMPRJ.@@FLMGRB.SYSDEBUG(@@FLMMBR) * However, using the IOTYPE=A has a drawback in this instance. The DISP=SHR does not work the same way that DISP=SHR works in JCL. In JCL if the member does not exist, then it will be created. In the FLMALLOC if the member does not exist, then the build will fail. We could have used a DISP=OLD on the FLMALLOC statement, in this case the member would get created. But the problem with this is the DISP=OLD will allocate the dataset exclusively to the user doing the build. So with multiple users there will be contention issues. To this end we need to add an extra step to allocate the file if it does not exist. This step needs to be added before the compile step. The language translator step is shown in Example 14-9.
Example 14-9 Add new SYSDEBUG member translator step
*********************************************************************** * --ALLOCATE SYSDEBUG MEMBER IF NEW * *********************************************************************** * FLMTRNSL CALLNAM='ALLOC SYSDEBUG', C FUNCTN=BUILD, C COMPILE=SELECT, C DSNAME=SCLM.PROJDEFS.REXX, C CALLMETH=ISPLNK, C GOODRC=0, C PORDER=1, C OPTIONS='CMD(EX ''SCLM.PROJDEFS.REXX(ALLOCDBG)'' C ''@@FLMPRJ @@FLMGRP @@FLMMBR'')' *
312
The REXX called by this step that does the allocate is shown in Example 14-10.
Example 14-10 REXX to allocate a SYSDEBUG file member
/* parse arguments */
/* If sysdebug member does not exist then create it */ If sysdsn(dbugdsn) <> 'OK' Then Do "ALLOC DA("dbugdsn") FI(SYSDEBUG) SHR" out.0 = 1 out.1 = "dummy" "EXECIO * DISKW SYSDEBUG (STEM OUT. FINIS)" If rc > 0 Then Do Say "****** Error creating the dummy sysdebug member, RC="rc Exit 12 End "FREE F(SYSDEBUG)" End Exit 0 Finally, to ensure that SCLM knows that the SYSDEBUG file is associated with the source, we need a final build step. This IEBGENERs the generated member onto itself. But by using an IOTYPE=O or P, SCLM will update the build map to associate the SYSDEBUG with the program that was compiled. This step is required as the actual compile step used and IOTYPE=A to place the member in the SCLM SYSDEBUG library, so at this time SCLM does not know about the member. Only IOTYPE=O and P will update the build map. The IEBGENER step is shown in Example 14-11.
Example 14-11 IEBGENER step to associate SYSDEBUG with source
*---------------------------------------------------------------------* *-- REGISTER SYSDEBUG TO SCLM --* *---------------------------------------------------------------------* FLMTRNSL C CALLNAM='REG SYSDEBUG TO SCLM', C FUNCTN=BUILD, C COMPILE=ICEGENER, C GOODRC=0, C PORDER=3 * 1 --- N/A --FLMALLOC IOTYPE=N * 2 --- N/A --FLMALLOC IOTYPE=N * 3 --- N/A --FLMALLOC IOTYPE=N * 4 --- N/A --FLMALLOC IOTYPE=N * 5 --- SYSIN --FLMALLOC IOTYPE=A FLMCPYLB NULLFILE * 6 --- SYSPRINT ---
313
* * *
FLMALLOC IOTYPE=A FLMCPYLB NULLFILE 7 --- N/A --FLMALLOC IOTYPE=N 8 --- SYSUT1 (INPUT) --FLMALLOC IOTYPE=U,DDNAME=SYSDEBUG 9 --- SYSUT2 (OUTPUT) --FLMALLOC IOTYPE=O,DDNAME=OUTDEBUG,KEYREF=OUT2, RECFM=FB,LRECL=1024, RECNUM=50000,PRINT=Y,DFLTTYP=SYSDEBUG
C C
The completed build steps of the translator are shown in Example 14-12.
Example 14-12 Complete Enterprise COBOL translator with debugging turned on
CBCID2DT FLMSYSLB CICS.TS31.CICS.SDFHCOB * @01C* FLMSYSLB CICS.TS31.CICS.SDFHMAC * @01C* * FLMLANGL LANG=CBCID2DT,VERSION=2,ALCSYSLB=Y,CHKSYSLB=BUILD, C LANGDESC='ENTERPRISE COBOL WITH CICS AND DB2' * *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) *M34FN* * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) *M34FN* * - CICS PRECOMPILE CODE LINES *18@01D* * COMMENT LINES *14@01D* * --COBOL INTERFACE-CODE LINES *29@01D* * COMMENT LINES *18@01D* * *********************************************************************** * --ALLOCATE SYSDEBUG MEMBER IF NEW * *********************************************************************** * FLMTRNSL CALLNAM='ALLOC SYSDEBUG', C FUNCTN=BUILD, C COMPILE=SELECT, C DSNAME=SCLM.PROJDEFS.REXX, C CALLMETH=ISPLNK, C GOODRC=0, C PORDER=1, C OPTIONS='CMD(EX ''SCLM.PROJDEFS.REXX(ALLOCDBG)'' C ''@@FLMPRJ @@FLMGRP @@FLMMBR'')' * *********************************************************************** * COBOL COMPILE AND CICS PRE-PROCESS CODE LINES *32@01A* * IN ONE STEP COMMENT LINES *19@01A* *********************************************************************** 314
A Practical Guide to Setting Up and Using SCLM
* FLMTRNSL CALLNAM='COBOL COMPILER WITH CICS PREPROCESS', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C VERSION=1.0, C TASKLIB=TASKLIB, C GOODRC=4, C PORDER=1, C OPTIONS=(NONUM,LIB,XREF(FULL),MAP,OFFSET,NOOPTIMIZE,SQL,C CICS(''COBOL3''),TEST(ALL,SYM,SEP)) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,KEYREF=OBJ,RECFM=FB,LRECL=80, C RECNUM=5000,DFLTTYP=OBJ,DDNAME=SYSLIN * FLMALLOC IOTYPE=I,KEYREF=SINC,DDNAME=SYSLIB * FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80, C DDNAME=SYSIN * FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=FBA,LRECL=133, C RECNUM=25000,PRINT=Y,DFLTTYP=LIST,DDNAME=SYSPRINT * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT1 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT2 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT3 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT4 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT5 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT6 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT7 * FLMALLOC IOTYPE=P,DDNAME=DBRMLIB,MEMBER=@@FLMONM, C DFLTTYP=DBRM,KEYREF=OUT1, C RECFM=FB,LRECL=80,RECNUM=5000,DIRBLKS=1 * FLMALLOC IOTYPE=A,DDNAME=SYSDEBUG,DISP=SHR FLMCPYLB @@FLMPRJ.@@FLMGRB.SYSDEBUG(@@FLMMBR) * * (* TASKLIB*)
315
FLMALLOC IOTYPE=A,DDNAME=TASKLIB FLMCPYLB ECOBOL.V340.SIGYCOMP FLMCPYLB CICS.TS31.CICS.SDFHLOAD FLMCPYLB DB2.V810.SDSNLOAD FLMCPYLB DB2.V810.SDSNEXIT * * *---------------------------------------------------------------------* *-- REGISTER SYSDEBUG TO SCLM --* *---------------------------------------------------------------------* FLMTRNSL C CALLNAM='REG SYSDEBUG TO SCLM', C FUNCTN=BUILD, C COMPILE=ICEGENER, C GOODRC=0, C PORDER=3 * 1 --- N/A --FLMALLOC IOTYPE=N * 2 --- N/A --FLMALLOC IOTYPE=N * 3 --- N/A --FLMALLOC IOTYPE=N * 4 --- N/A --FLMALLOC IOTYPE=N * 5 --- SYSIN --FLMALLOC IOTYPE=A FLMCPYLB NULLFILE * 6 --- SYSPRINT --FLMALLOC IOTYPE=A FLMCPYLB NULLFILE * 7 --- N/A --FLMALLOC IOTYPE=N * 8 --- SYSUT1 (INPUT) --FLMALLOC IOTYPE=U,DDNAME=SYSDEBUG * 9 --- SYSUT2 (OUTPUT) --FLMALLOC IOTYPE=O,DDNAME=OUTDEBUG,KEYREF=OUT2, C RECFM=FB,LRECL=1024, C RECNUM=50000,PRINT=Y,DFLTTYP=SYSDEBUG
316
RDBKC01 0 4 0
The build report shows the new debug file that was created as part of the compile, shown in Figure 14-7. **************************************************************************** ******* B U I L D O U T P U T S G E N E R A T E D ******* Page 1 MEMBER -----RDBKC01 RDBKC01 RDBKC01 RDBKC01 TYPE ---OBJ LIST DBRM SYSDEBUG VERSION ------11 11 11 4 KEYWORD ------OBJ LIST OUTX
The new SYSDEBUG file is added by SCLM to the build map or the COBOL source file so that when the source is promoted, the debug file will be promoted with it. If we look inside the OBJ module, which is link-edited into the LOAD module, we see that the reference to the debug side file has the current location of the file, as shown in Figure 14-8. .TXT ..\ .TXT ... .TXT ..* .. .. .. ..}.\}.q.}..K.Jqs].j....&.Ju .Jq.*0...DEBUGINF.... ... ....................SCLM07.DEV1.SYSDEBUG(RDBKC01)..... ..IDBA................ ...q ........=....*...............
This is not an issue if you are going to be using the EQADEBUG DD statement to subsequently allocate the correct SCLM controlled SYSDEBUG datasets to your testing procedures or CICS region JCL.
317
Figure 14-9 Extract from CICS region JCL showing EQADEBUG DD allocation
When the CICS transaction is tested using CEDF, the side file will be found by searching the EQADEBUG DD specified in the region JCL. Using this method where the load module will contain a real data set name may make using the EQAUEDAT easier, especially if your site uses Fault Analyzer in addition to Debug Tool. If this is the case, the EQAUEDAT exit could be coded such that it takes the location of the side file passed in and substitutes all but the last level qualifier (DEBUG in our example) with all but the last level qualifier of the load library location. For example, if the load module is being run from SCLM07.PROD.LOAD and the side file location specified in the load module is SCLM07.DEV1.DEBUG, then EQAUEDAT can be coded so that the side file location is set up as SCLM07.PROD.DEBUG. If SCLM has promoted the side file with the source and load module, then this is where the correct side file will exist for the PROD version of the load module. Example 14-13 shows a sample EQAUEDAT exit that uses all but the last qualifier of the LOADLIB data set name and appends the last qualifier and member name of the original SYSDEBUG data set. This example may be more appropriate in an SCLM environment than the sample shipped with Debug Tool.
318
*********************************************************************** * * * MODULE NAME = EQAUEDAT * * * * Sample code to change last qualifier of the load DSN to the * * last qualifier of the sysdebug DSN and use the new DSN as the * * modified sysdebug DSN * * E.g. DEV1.APPL1.LOAD & TEST.APP1TST.SYSDEBUG(MYAPP) * * giving * * DEV1.APPL1.SYSDEBUG(MYAPP) * * * * This code expects the resultant DSN to be 44 char or less. * */********************************************************************/ * * Symbolic Register Definitions and Usage * R0 EQU 0 Work register R1 EQU 1 Parameter list address (upon entry) R2 EQU 2 Work register - DSN Length R3 EQU 3 Work register R4 EQU 4 Address of data set name R5 EQU 5 Work register R6 EQU 6 Work register R7 EQU 7 Work register R8 EQU 8 Work register R9 EQU 9 Parameter list address (after CEEENTRY) R10 EQU 10 Work register R11 EQU 11 Base register for executable code R12 EQU 12 Common Anchor Area address R13 EQU 13 Save Area/Dynamic Storage Area address R14 EQU 14 Return point address R15 EQU 15 Entry point address * * Language Codes * LANPLI EQU 1 PL/I LANCOBOL EQU 2 COBOL LANC EQU 4 C LANASSEM EQU 5 Assembler * * Prologue * EQAUEDAT CEEENTRY AUTO=DSASIZ, Amount of main memory to obtain * PPA=PPA3, Program Prolog Area for this routine * MAIN=NO, This program is a Subroutine * NAB=NO, NO- not called from LE-enabled pgm * PARMREG=R9, R1 value is saved here * BASE=R11 Base register for executable code, * constants, and static variables USING CEECAA,R12 Common Anchor Area addressability USING CEEDSA,R13 Dynamic Storage Area addressability USING PARMLIST,R9 * * First scan down debug dataset name looking for last .
Chapter 14. Debugging and fault analysis with SCLM
319
* * L L L L LR LR MVC R3,DSETNM@ R3,0(R3) R6,DSETLEN R2,0(R6) R4,R3 R5,R2 LLQPos,=F'0' Addr of sysdebug dsn Addr of sysdebug dsn length
NextChar CLI 0(R3),C'.' Now scan for length for last . BNE NoLLQUpd Arguably more efficient to ST R3,LLQPos do in reverse. NoLLQUpd DS 0H LA R3,1(,R3) BCT R2,NextChar * * We now have * * .-----------R5------------. * V V * USERID.THIS.DATASET(MEMBER) * | | * | .------------------LLQPos * .-----------------------------R4 * L R7,LLQPos ST R7,LLQPosSysdebug Remember start address SR R7,R4 SR R5,R7 ST R5,LLQLenSysdebug Length of last qualifier and (mm) * * No scan load data set name for last . * L L L L R3,LDLBMN@ R3,0(R3) R6,LDLBMNLN R2,0(R6) Addr of load dsn Addr of load dsn length
320
* * * * * * * * * *
We now have
.-------R5--------. V V USERID.THIS.LOADLIB | | | .------------------LLQPos .-----------------------------R4 L SR ST L L L EX L L AR L ST L L R7,LLQPos R7,R4 R7,LLQLen R10,LLQPos R7,LLQPosSysdebug R5,LLQLenSysdebug R5,MoveMem R5,LLQLenSysdebug R7,LLQLen R5,R7 R6,DSETLEN R5,0(R6) R4,LDLBMN@ R7,0(R4) R4,DSETNM@ R10,0(R4) R5,MoveMem
Length up to last . Now move last qualifier and member name (if there is one) from sysdebug dsn over the top of the load dsn calculate new combined length
* L L EX * * * Exit * PPA3 *
We now need to copy the newly formed dsn back over the original sysdebug dsn.
Epilogue DS 0H CEETERM RC=0 CEEPPA , Program Prolog Area for this routine
LTORG , Place literal pool here EJECT MoveMem MVC 0(0,R10),0(R7) * * Map the Dynamic Storage Area (DSA) * CEEDSA , Map standard CEE DSA prologue * * Local Automatic (Dynamic) Storage.. * LLQPosSysdebug DS F LLQLenSysdebug DS F LLQPos DS F LLQLen DS F
321
DSASIZ EJECT * * * * * * PARMLIST DSETNM@ DSETLEN LANGCODE CUNM@ CUNMLEN LDMDMN@ LDMDMNLN LDLBMN@ LDLBMNLN
EQU
*-CEEDSA
Length of DSA
Map the Common Anchor Area (CAA) CEECAA The map of parameters DSECT DS DS DS DS DS DS DS DS DS END
A A A A A A A A A ,
Debug Data dataset name string addr Debug Data dataset name len Language Code CU name string address CU name length Load module name string address Load module name string length Load library name string address Load library name string length of EQAUEDAT
For completeness of this test scenario, we can test the transaction in CICS. To use Debug Tool from CICS, you must set up a debug profile using transaction CADP or DTCN in CICS. A typical setup is shown in Figure 14-10 and Figure 14-11. CADP CICS Application Debugging Profile Manager C64C1IS1
List Debugging Profiles Owner $EXAMPLE $EXAMPLE $EXAMPLE $EXAMPLE $EXAMPLE $EXAMPLE CICSUSER CICSUSER Profile COMP1 COMP2 COMP3 CORBA EJB JAVA RDBK RDBKWD4Z S I I I I I I I A Tran T* TR TRN3 T* * TR* TST1 TST1
(A=Activate,I=Inactivate,D=Delete,C=Copy) Program P* * PROG3 Compile Unit * SAMPCOMPUN + * Applid CICSREG1 CICSREG2 CICSREG3 * * * C64C1IS1 C64C1IS1 Userid PANDREWS DRBEARD* * IORWERTH * PENFOLD* * * Term TTT1 TTT2 TTT2 Type Comp Comp Comp Corb EJB Java Comp Comp
_ _ _ _ _ _ _ _
* *
* *
* *
8 profile(s). All profiles shown Enter=Process PF1=Help 2=Filter 3=Exit 4=View 5=Create Comp 6=Create Java 9=Set display device 10=Edit 11=Sort
Figure 14-10 CADP transaction showing RDBK profile to use Debug Tool under CICS
322
CADP
C64C1IS1
Set Compiled Debugging Display Device Debugging Display Device Session Type ==> 3270 Display Terminal ==> TCP/IP Name Or Address ==> ==> ==> ==> Port
3270 1497
(3270,TCP)
==>
08001 (Single,Multiple)
To test using CEDF and Debug Tool, you must use 2 terminals. For example, we have started 2 CICS sessions that are assigned terminal IDs 1290 and 1292. The following sequence takes place: 1. Terminal 1292: Clear panel and type CEDF 1290,on,i and press Enter. The following message is then displayed on the panel: TERMINAL 1290: OPTION I... REQUESTS THE DEBUG TOOL : EDF MODE ON. DEBUG TOOL ON. 2. Terminal 1290: Clear panel and type transaction name, in our example TST1, press Enter. 3. Terminal 1292: EDF session will start, step through EDF until it terminates, at which time control is passed to Debug Tool, which is running on terminal 1290. 4. Terminal 1290: Debug Tool starts up with the source code.
14.1.4 Option 3: Debug side file under SCLM - correct side file name at each group
If you do not want to utilize the EQADEBUG DD, SET DEFAULT LISTING, or EQAUEDAT functionality in Debug Tool and you insist that the side file name specified in the LOAD module points to the correct location at all times, then this is possible with SCLM.
323
CBCID2DT FLMSYSLB CICS.TS31.CICS.SDFHCOB * @01C* FLMSYSLB CICS.TS31.CICS.SDFHMAC * @01C* * FLMLANGL LANG=CBCID2DT,VERSION=2,ALCSYSLB=Y,CHKSYSLB=BUILD, LANGDESC='ENTERPRISE COBOL WITH CICS AND DB2' * FLMLRBLD GROUP=(TEST,PROD) *
324
INVOKING PROMOTE PROCESSOR THE PROMOTE REPORT WILL APPEAR IN DOHERTL.PROMOTE.REPORT81 THE BUILD REPORT WILL APPEAR IN DOHERTL.BUILD.REPORT81 THE BUILD LISTING WILL APPEAR IN DOHERTL.BUILD.LIST81 PROMOTE PROCESSOR INITIATED - 09:10:09 ON 2006/12/07 INITIATING VERIFICATION PHASE - 09:10:09 ON 2006/12/07
FLM55000 - INITIATING COPY PHASE - 09:10:10 ON 2006/12/07 FLM57000 - INITIATING PURGE PHASE - 09:10:13 ON 2006/12/07 FLM57001 - INITIATING PURGE FROM GROUP: TEST FLM42000 FLM44500 FLM06501 FLM06501 FLM06501 FLM44500 FLM06501 FLM44500 FLM06501 FLM46000 FLM87107 FLM58000 FLM09008 BUILD PROCESSOR INITIATED - 09:10:16 ON 2006/12/07 >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: COBOL MEMBER: RDBKC01 TRANSLATOR RETURN CODE FROM ===> ALLOC SYSDEBUG ===> 0 TRANSLATOR RETURN CODE FROM ===> COBOL COMPILER W ===> 4 TRANSLATOR RETURN CODE FROM ===> REG SYSDEBUG TO ===> 0 >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: ARCHBIND MEMBER: RDBKC01 TRANSLATOR RETURN CODE FROM ===> DB2 PACKAGE BIND ===> 0 >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: ARCHLEC MEMBER: RDBKC01 TRANSLATOR RETURN CODE FROM ===> LKED/370 ===> 0 BUILD PROCESSOR COMPLETED - 09:13:54 ON 2006/12/07 BUILD SUCCEEDED FOR MEMBER RDBKC01 AT 09:13:54, CODE: 0 PROMOTE PROCESSOR COMPLETED - 09:13:54 ON 2006/12/07 RETURN CODE = 0
If we look inside the OBJ module, which is link-edited into the LOAD module, we see that the reference to the debug side file now has the PROD location of the side file thus as shown in Figure 14-13. .TXT ..\ .TXT ... .TXT ..* .. .. .. ..}.\}.q.}..K.Jqs].j....&.Ju .Jq.*0...DEBUGINF.... ... ....................SCLM07.PROD.SYSDEBUG(RDBKC01)..... ..IDBA................ ...q ........=....*...............
325
*********************************************************************** * --ENTERPRISE COBOL INTERFACE-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE COBOL COMPILER', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C DSNAME=ECOBOL.V340.SIGYCOMP, C VERSION=3.1, C GOODRC=0, C PORDER=1, C OPTIONS=(XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ,TESTC (ALL,SYM)) * The FLMALLOC of the listing dataset will be the same as the default Enterprise COBOL translator as shipped with SCLM. Member FLM@COBE in library ISP.SISPMACSI.
326
******************************************************************************* ******* B U I L D O U T P U T S G E N E R A T E D ******* Page 1 MEMBER -----PRINTAPP STARTAPP PRINTAPP STARTAPP STARTAPP STARTAPP TYPE ---OBJ OBJ LIST LIST LOAD LMAP VERSION ------9 17 9 17 14 14 KEYWORD ------OBJ LIST LOAD LMAP
Figure 14-14 Build list when listing used over side file
If we look in the generated OBJ again, we see an SCLM temporary dataset name, this time referring to the compiler listing as shown in Figure 14-15. .TXT ... .TXT .. .TXT .. .. .. .. .............@......%............................SYSPRINT ..SYS06341.T151802.RA000.DOHERTL.SYSPRINT.H01 .. PP 5655- LineID|&-/...................
Even though the load module has the SCLM temporary name for the listing, Debug Tool will find the correct listing in the concatenation of data sets specified in the SET DEFAULT LISTING command, shown in Figure 14-17.
327
COBOL LOCATION: STARTAPP initialization Command ===> Scroll ===> PAGE MONITOR --+----1----+----2----+----3----+----4----+----5----+----6 LINE: 0 OF 0 ******************************* TOP OF MONITOR ******************************** ****************************** BOTTOM OF MONITOR ******************************
SOURCE: STARTAPP -1----+----2----+----3----+----4----+----5----+- LINE: 1 OF 51 ******************************** TOP OF SOURCE ******************************** 1 000100* --------------------------------------------------. 2 000200* IDE Sample Program . 3 000300* --------------------------------------------------. 4 000400 Identification Division. . 5 000500 Program-ID. StartApp. . LOG 0----+----1----+----2----+----3----+----4----+----5----+---- LINE: 11 OF 14 0011 *** User preferences file commands follow *** 0012 SET DEFAULT LISTINGS ( 'SCLM07.DEV1.LIST', 'SCLM07.TEST.LIST', 0013 'SCLM07.PROD.LIST' ) ; 0014 *** User preferences file commands end *** PF 1:? 2:STEP 3:QUIT 4:LIST 5:FIND 6:AT/CLEAR PF 7:UP 8:DOWN 9:GO 10:ZOOM 11:ZOOM LOG 12:RETRIEVE
Figure 14-17 Starting Debug Tool finds the concatenation of listings
/* parse arguments */
/* If sysdebug member does not exist then create it If sysdsn(listdsn) <> 'OK' Then Do "ALLOC DA("listdsn") FI(LIST) SHR" out.0 = 1 out.1 = "dummy" "EXECIO * DISKW LIST (STEM OUT. FINIS)" If rc > 0 Then Do Say "****** Error creating the dummy list member, RC="rc Exit 12 End "FREE F(LIST)" End Exit 0
*/
328
You can then remove the SYSDEBUG allocations and replace with allocations for the LIST type. In this case you have to pay attention to the compiler expected DCB requirements for the SYSPRINT dataset when setting up the translator. The complete translator is shown in Example 14-17.
Example 14-17 Enterprise COBOL translator with debugging turned on using listing
FLMLANGL
* *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C CALLMETH=LINK, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --ALLOCATE SYSDEBUG MEMBER IF NEW * *********************************************************************** * FLMTRNSL CALLNAM='ALLOC SYSDEBUG', C FUNCTN=BUILD, C COMPILE=SELECT, C DSNAME=SCLM.PROJDEFS.REXX, C CALLMETH=ISPLNK, C GOODRC=0, C PORDER=1, C OPTIONS='CMD(EX ''SCLM.PROJDEFS.REXX(ALLOCLST)'' C ''@@FLMPRJ @@FLMGRP @@FLMMBR'')' * * *********************************************************************** * --ENTERPRISE COBOL INTERFACE-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE COBOL COMPILER', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C DSNAME=ECOBOL.V340.SIGYCOMP, C VERSION=3.1, C GOODRC=0, C PORDER=1, C OPTIONS=(XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ,TESTC (ALL,SYM)) * *********************************************************************** * --DDNAME ALLOCATION-* ***********************************************************************
Chapter 14. Debugging and fault analysis with SCLM
329
* FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, RECNUM=5000,DFLTTYP=OBJ * FLMALLOC * FLMALLOC * FLMALLOC * FLMALLOC * FLMALLOC * FLMALLOC * FLMALLOC * FLMALLOC * FLMALLOC * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPRINT,DISP=SHR FLMCPYLB @@FLMPRJ.@@FLMGRB.LIST(@@FLMMBR) * *---------------------------------------------------------------------* *-- REGISTER LISTING TO SCLM --* *---------------------------------------------------------------------* FLMTRNSL C CALLNAM='REG LISTING TO SCLM', C FUNCTN=BUILD, C COMPILE=ICEGENER, C GOODRC=0, C PORDER=3 * 1 --- N/A --FLMALLOC IOTYPE=N * 2 --- N/A --FLMALLOC IOTYPE=N * 3 --- N/A --FLMALLOC IOTYPE=N * 4 --- N/A --FLMALLOC IOTYPE=N * 5 --- SYSIN --FLMALLOC IOTYPE=A FLMCPYLB NULLFILE * 6 --- SYSPRINT --FLMALLOC IOTYPE=A FLMCPYLB NULLFILE * 7 --- N/A --IOTYPE=W,DDNAME=SYSUT7,RECNUM=5000 IOTYPE=W,DDNAME=SYSUT6,RECNUM=5000 IOTYPE=W,DDNAME=SYSUT5,RECNUM=5000 IOTYPE=W,DDNAME=SYSUT4,RECNUM=5000 IOTYPE=W,DDNAME=SYSUT3,RECNUM=5000 IOTYPE=W,DDNAME=SYSUT2,RECNUM=5000 IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC C
330
* *
FLMALLOC IOTYPE=N 8 --- SYSUT1 (INPUT) --FLMALLOC IOTYPE=U,DDNAME=SYSPRINT 9 --- SYSUT2 (OUTPUT) --FLMALLOC IOTYPE=O,DDNAME=OUTLIST,KEYREF=OUT1, RECFM=FBA,LRECL=121, RECNUM=50000,PRINT=Y,DFLTTYP=LIST *
C C
14.1.7 Invoking the debugger to run on your workstation using WebSphere debugger
Debug Tool now also interfaces with remote debuggers such as the WebSphere for System z debugger. From an SCLM perspective, the setup is no different than has been previously described in the options above. Whether to invoke the WebSphere debugger for your program will vary on whether your program is a batch or CICS program, for example.
331
Figure 14-18 WD/z client showing active RSE connection and troubleshooting preferences
332
Your client is now ready to accept communication from the z/OS host. So let us now look at what is required on the host to trigger invocation.
List Debugging Profiles Owner $EXAMPLE $EXAMPLE $EXAMPLE $EXAMPLE $EXAMPLE $EXAMPLE CICSUSER CICSUSER Profile COMP1 COMP2 COMP3 CORBA EJB JAVA RDBK RDBKWD4Z S I I I I I I I A Tran T* TR TRN3 T* * TR* TST1 TST1
(A=Activate,I=Inactivate,D=Delete,C=Copy) Program P* * PROG3 Compile Unit * SAMPCOMPUN + * Applid CICSREG1 CICSREG2 CICSREG3 * * * C64C1IS1 C64C1IS1 Userid PANDREWS DRBEARD* * IORWERTH * PENFOLD* * * Term TTT1 TTT2 TTT2 Type Comp Comp Comp Corb EJB Java Comp Comp
_ _ _ _ _ _ _ _
* *
* *
* *
8 profile(s). All profiles shown Enter=Process PF1=Help 2=Filter 3=Exit 4=View 5=Create Comp 6=Create Java 9=Set display device 10=Edit 11=Sort
Figure 14-21 CADP transaction showing RDBKWD4Z profile
If we select PF9 - Set display device we can set up the parameters required to enable our CICS transaction to talk to our workstation. In Figure 14-22 we do the following steps: 1. Set the session type to TCP for TCPIP. 2. Set the IP address to the IP address we got from the Show Client Info option in our WD/z client. In the example, this is 9.30.146.40. 3. Set the port number to the port number we got from the Debug Daemon preferences in our WD/z client, by default this is 8001.
333
CADP
C64C1IS1
Set Compiled Debugging Display Device Debugging Display Device Session Type ==> 3270 Display Terminal ==> TCP/IP Name Or Address ==> 9.30.146.40 ==> ==> ==> Port
TCP 1053
(3270,TCP)
==>
08001 (Single,Multiple)
To invoke the debugger to test our transaction, all we need to do is clear the panel and enter our transaction name. Tip: If the normal 3270 Debug Tool starts rather than the remote debugger, then ensure that the IBM-supplied group DFHSO is installed in the CICS region. You might also have to Inactivate the debug profile and then Activate it again to ensure it is picked up by Debug Tool. In our example transaction TST1 executes program RDBKC01. So when the remote debugger starts, it starts up program RDBKC01 so that you can step through the code. This is shown in Figure 14-23, where we can see that we have executed the first DB2 call in the program and have received an SQLCODE of -805, so we have a DB2 error.
334
Figure 14-23 Remote debugger in WD/z being invoked from the execution of a CICS transaction
/* REXX */ "ALLOC F(SYSPRINT) DA(*)" "ALLOC F(INSPPREF) DA('DOHERTL.INSPPREF')" "ALLOC F(EQADEBUG) DA('SCLM07.DEV1.SYSDEBUG', 'SCLM07.TEST.SYSDEBUG', 'SCLM07.PROD.SYSDEBUG') SHR" SUBSYS = 'DI11' DB2_Line = "RUN PROGRAM(RDBKP01) PLAN(RDBKPLN1)" ||, " LIB('SCLM07.DEV1.LOAD') " ||, " PARM('TEST(,,,TCPIP&9.30.146.40%8001:*)/')" queue DB2_Line
335
This JCL can be submitted from z/OS or through the Submit context menu in the z/IDE in WD/z, as shown in Figure 14-24,
336
The job runs but passes control to the remote debugger. You can then step through the code on your WD/z client. Once finished, or terminated, control is passed back to the JCL and the job finishes.
337
For a detailed discussion on where Fault Analyzer finds the side files, see the section Locating compiler listings or side files in the Fault Analyzer Users Guide, SC19-1088-00.
338
An example of the PARMLIB configuration member IDICNF00 is shown in Figure 14-25. ------------------------------------------------------------------------------VIEW SYS1.PARMLIB.APC1.USER(IDICNF00) - 01.04 Columns 00001 00080 Command ===> Scroll ===> CSR ****** **************************** Top of Data ******************************* 000001 INCLUDE 000002 EXCLUDE(TYPE(STC)) 000003 EXCLUDE(ABEND(S013,S*37,S213,S806,S913)) 000004 RETAINDUMP(ALL) 000005 MMP(512) 000006 DATASETS( 000007 IDIHIST(IDIC1.HIST) 000008 IDIDOC(IDIC1.V7R1M0.SIDIDOC1) 000009 IDIBOOKS(IDIC1.V7R1M0.SIDIBOOK) 000010 IDIMAPS(IDIC1.V7R1M0.SIDIMAPS) 000011 IDILCOB(SCLM07.DEV1.LIST 000012 SCLM07.TEST.LIST 000013 SCLM07.PROD.LIST) 000014 IDILPLIE(SCLM07.DEV1.LIST 000015 SCLM07.TEST.LIST 000016 SCLM07.PROD.LIST) 000017 IDISYSDB(SCLM07.DEV1.SYSDEBUG 000018 SCLM07.TEST.SYSDEBUG 000019 SCLM07.PROD.SYSDEBUG) 000020 ) ****** *************************** Bottom of Data *****************************
Figure 14-25 IDICNF00 PARMLIB member
Depending on whether you plan to also use Debug Tool may determine what method you chose to use to locate the side file with Fault Analyzer. There is currently only one common point between the two products, which is the EQAUEDAT user exit. This is the debug Tool user exit and Fault Analyzer will run this exit also. If you have a structured approach to your library system, which you should have if you are using SCLM, then using EQAUEDAT may make the most sense. If a program is being run from SCLM07.PROD.LOAD or possibly an external copy of the member in SCLM07.PROD.LOAD, then it is probably safe to say that the debug side file you should be using to analyze the dump will come from SCLM07.PROD.DEBUG, or whatever you have named your debug file. This would be both true for Fault Analyzer and Debug Tool. So it would be a fairly straightforward process to set up a single EQAUEDAT that satisfies the needs of both products. This would also keep maintenance down to a minimum. If you are not planning on running Debug Tool, then the simplest option would be to either use the EQAUEDAT user exit or to specify the location of the side file via the IDISYSDB DD in the PARMLIB configuration member IDICNF00, the IDIOPTS user options file, or an Analysis Control user exit. If you chose not to use the EQAUEDAT user exit, yet are also planning on using Debug Tool, then the location of the side file must be specified in both the IDISYSDB DD for Fault Analyzer and the EQADEBUG DD for Debug Tool (or one of the other Debug Tool methods of specifying the location of the side file).
339
FLMLANGL *
FLMINCLS TYPES=(PLI,PLINCL,DCLGEN) DB2DCLS FLMINCLS TYPES=(DCLGEN) * *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM PL/I PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPGEN, C PORDER=1, C OPTIONS=(SOURCEDD=SOURCE, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C LANG=I(I)) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** 340
A Practical Guide to Setting Up and Using SCLM
* --ENTERPRISE PL/I-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE PL/I COMPILER', C FUNCTN=BUILD, C COMPILE=IBMZPLI, C TASKLIB=TASKLIB, C VERSION=4.0, C GOODRC=4, C PORDER=1, C OPTIONS=(MACRO,OBJECT,SOURCE,XREF,PP(SQL),MAP,LIST,NEST,C AGGREGATE,ATTRIBUTES,NOBLKOFF,OFFSET,OPTIONS) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, C RECNUM=5000,DFLTTYP=OBJ * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC * FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 * FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=O,DDNAME=SYSPRINT,KEYREF=LIST, C DFLTTYP=LIST,PRINT=Y,RECNUM=5000 * FLMALLOC IOTYPE=P,DDNAME=DBRMLIB,MEMBER=@@FLMONM, C DFLTTYP=DBRM,KEYREF=OUT1, C RECFM=FB,LRECL=80,RECNUM=5000,DIRBLKS=1 * FLMALLOC IOTYPE=A,DDNAME=TASKLIB FLMCPYLB EPLI.V350.SIBMZCMP FLMCPYLB DB2.V810.SDSNEXIT FLMCPYLB DB2.V810.SDSNLOAD * FLMALLOC IOTYPE=I,DDNAME=DB2DCLS,KEYREF=SINC,INCLS=DB2DCLS * *********************************************************************** * --COPY FILES FROM SYSPRINT TO LISTING * *********************************************************************** * FLMTRNSL CALLNAM='COPY FILES ', C FUNCTN=BUILD, C COMPILE=COPYFILE, C DSNAME=SCLM.PROJDEFS.REXX, C CALLMETH=TSOLNK, C
341
C C C
* *********************************************************************** * --CREATE IDILANGX FILE * *********************************************************************** * FLMTRNSL CALLNAM='IDILANGX', C FUNCTN=BUILD, C COMPILE=IDILANGX, C DSNAME=IDI.V610.SIDIMOD1, C VERSION=3.5.2, C GOODRC=0, C PORDER=1, C OPTIONS='@@FLMMBR(PLI ERROR OFT IDILANGX FAULT' * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=U,DDNAME=LISTING * FLMALLOC IOTYPE=P,DDNAME=IDILANGX,DFLTTYP=IDILANGX, C KEYREF=OUT2,BLKSIZE=27998,LRECL=1562,RECFM=VB, C RECNUM=10000,DIRBLKS=50,DFLTMEM=* * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC The REXX to perform the copy that is picked up from SCLM.PROJDEFS.REXX is shown in Example 14-21.
Example 14-21 REXX to copy listing file
/* REXX */ /**********************************************************************/ /* Copy file I to file O. Both are assumed to be pre-allocated. */ /**********************************************************************/ PARSE UPPER ARG I","O . "EXECIO * DISKR "I" (STEM R. FINIS " "EXECIO * DISKW "O" (STEM R. FINIS " RETURN
342
With the extra steps, the build messages will be as shown in Figure 14-26. FLM49000 FLM09002 FLM09006 FLM42000 FLM44500 FLM06501 FLM06501 FLM06501 FLM46000 FLM09008 INVOKING BUILD PROCESSOR THE BUILD REPORT WILL APPEAR IN DOHERTL.BUILD.REPORT49 THE BUILD LISTING WILL APPEAR IN DOHERTL.BUILD.LIST49 BUILD PROCESSOR INITIATED - 02:13:55 ON 2007/02/08 >> INVOKING BUILD TRANSLATOR(S) FOR TYPE: PLI MEMBER: TRANSLATOR RETURN CODE FROM ===> ENTERPRISE PL/I ===> TRANSLATOR RETURN CODE FROM ===> COPY FILES ===> TRANSLATOR RETURN CODE FROM ===> IDILANGX ===> BUILD PROCESSOR COMPLETED - 02:14:00 ON 2007/02/08 RETURN CODE = 0
RDBKP01 4 0 0
Figure 14-26 Build messages after a build that also creates IDILANGX file
The SCLM process for Assembler is slightly simpler, as the IDILANGX expects the input to be in DD SYSADATA, and this is also the output DD from the assemble. So the extra copy step is not required. An example of an assembler language translator is shown in Example 14-22.
Example 14-22 Assembler language translator with additional IDILANGX step
HLAF *
FLMSYSLB SYS1.MACLIB FLMLANGL LANG=HLAF,VERSION=HLAF1.0,ALCSYSLB=Y, LANGDESC='HIGH LEVEL ASSEMBLER WITH FAULT ANALYZER' C
* *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** FLMTRNSL CALLNAM='SCLM HLAS PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPGEN, C PORDER=1, C OPTIONS=(SOURCEDD=SOURCE, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C LANG=A) *** THIS IS ASSEMBLER ONLY *** * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --BUILD TRANSLATOR(S)-- --HIGH LEVEL ASSEMBLER INTERFACE-- * *********************************************************************** * FLMTRNSL CALLNAM='HL ASM', C FUNCTN=BUILD, C COMPILE=ASMA90, C VERSION=1.5, C GOODRC=0, C PORDER=1, C OPTIONS=(XREF(SHORT),LINECOUNT(75),OBJECT,RENT,ADATA), C PARMKWD=PARM1 *
343
*********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=9000 * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, C RECNUM=9000,DFLTTYP=OBJ * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC FLMALLOC IOTYPE=O,DDNAME=SYSPRINT,KEYREF=LIST,PRINT=Y, C RECFM=FBA,LRECL=121, C DFLTTYP=LIST,RECNUM=20000 FLMALLOC IOTYPE=W,DDNAME=SYSADATA,RECFM=VB,RECNUM=9000, C LRECL=8188,BLKSIZE=8192 * *********************************************************************** * IDILANGX BUILD TRANSLATOR * *********************************************************************** * FLMTRNSL CALLNAM='IDILANGX', C FUNCTN=BUILD, C COMPILE=IDILANGX, C DSNAME=IDI.V610.SIDIMOD1, C VERSION=6.1, C GOODRC=0, C PORDER=1, C OPTIONS='@@FLMMBR(ASM ERROR OFT IDILANGX FAULT' * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * (* IDILANGX *) FLMALLOC IOTYPE=P,DDNAME=IDILANGX,DFLTTYP=IDILANGX, C KEYREF=OUT2,BLKSIZE=27998,LRECL=1562,RECFM=VB, C RECNUM=10000,DIRBLKS=50,DFLTMEM=* * *
344
Usually, when you specify TEST in combination with any other sub-options (except NONE), the compiler options NOOPTIMIZE and OBJECT automatically go into effect, preventing you from debugging optimized programs. However, if you specify TEST(NONE,SYM) and compile with one of the following compilers, you can specify OPT, allowing you to debug optimized programs: Enterprise COBOL for z/OS and OS/390, Version 3 Release 2 Enterprise COBOL for z/OS and OS/390, Version 3 Release 1 with APAR PQ63235 COBOL for OS/390 & VM, Version 2 with APAR PQ63234 Most of the examples previously show setting the compiler options to TEST(ALL,SYM,SEPERATE). These examples show how the compiler options are set to produce side files. For more information on the actual compiler options and what they do, you should refer to the Debug Tool Users Guide, SC19-1071-00, or to the Redbooks publication, IBM Application Development and Problem Determination Tools V7 for System z: Application Performance Analyzer, Debug Tool Utilities and Advanced Functions, Fault Analyzer, File Export, File Manager, and Workload Simulator, SG24-7372. Your site may not use Fault Analyzer, so may only want to run debug at the development group level during code development. If this is the case you may want to recompile at promotion to the TEST group to turn the debugging off. You can do this by using the FLMLRBLD macro in conjunction with the FLMTOPTS to set different compiler options at different levels. Finally, you may want to only use debug translators at the development group when the need arises. To do this, you can use an SCLM Alternate project to define the same languages with debug options turned on. Then just build the required module by using the alternate project definition. Then before promoting, build the member again with the primary project definition so that debug options are turned off.
14.4 Conclusions
There are a number of different ways to set up SCLM to provide the required files for debugging and fault analysis. Depending on how you plan to use Debug Tool and/or Fault Analyzer, this will determine the best way for you to set up the translators. In all cases it is better to use the SYSDEBUG side file if at all possible, as this will make things a lot simpler, especially when Fault Analyzer is used, as the vast array of compiler options will not be required. If Fault Analyzer is used, then the preferred approach would be to use the option to put a real data set in the load module as described in 14.1.3, Option 2: Debug side file under SCLM - correct side file name at compile time on page 311 and then resolve this to a correct side file by using the EQAUEDAT user exit. As EQAUEDAT is the common denominator between Debug Tool and Fault Analyzer, and both products are being used, then this option will be preferred in order to minimize customizations in both products to find side files. If only Debug Tool is used, then any of the methods used to determine the location of the side file will work fine. Using the EQAUEDAT method will again mean that your administrator controls where the side file is found, thus minimizing the amount of customization in CICS region JCL and other procedures. However, this method will involve adding an extra member create and copy step to the SCLM language translators as documented above. If you are happy to code a EQADEBUG DD whenever you need to debug code, then it will be sufficient to use the default SCLM behavior as documented in 14.1.2, Option 1: Debug side file under SCLM - default temporary name.
345
If your site rebuilds code at every level, then using the method described in14.1.4, Option 3: Debug side file under SCLM - correct side file name at each group will always put the correct location of the side file into the load module, so you should not need to use EQAUEDAT, EQADEBUG, or any of the other methods to find the side file, as Debug Tool and Fault Analyzer will always find the correct one. However, this is not standard processing in SCLM, as building at the development group and then promoting through the hierarchy is the normal practice.
346
Part 4
Part
347
348
15
Chapter 15.
349
SCLM Advanced Edition for z/OS is a suite of the following add-on products to SCLM: SCLM Administrator Toolkit Enhanced Access Control for SCLM for z/OS SCLM Developer Toolkit Breeze for SCLM for z/OS Merge Tool for z/OS IBM SCLM Administrator Toolkit simplifies the administration of SCLM managed projects by means of a workstation-based graphical interface or an ISPF based interface. Enhanced Access Control provides additional security to protect your SCLM objects from change outside of SCLM. SCLM Developer Toolkit is an Eclipse-based tool that extends SCLM Services to the workstation. It facilitates collaboration between z/OS and non z/OS-based developers and provides a transparent IDE-based interface to SCLM, long file name support, and a remote portal via SCLM Explorer/Developer View that allows access to other SCLM-based products. The Breeze product provides for package notification, review, and approval processing throughout the life cycle. IBM Merge Tool for z/OS and OS/390 provides a variety of tools to perform merge tasks.
350
351
Breeze consists of these components: Package database User exits VSAM data set containing Breeze package records. Programs that customize the SCLM build and promote functions for Breeze functions (for example, to create package records in the Breeze package database, and send e-mails notifying users of promotion requests). Various ISPF pop-up windows that the Breeze user exits display during SCLM foreground processing. An HTTP server that hosts the Breeze Web interface with software that allows the Web interface to access the package database A Web page, hosted by the CTS server, that allows users to view and vote on packages. Various utilities for maintaining or reporting on the Breeze package database (for example, to define approvers, delete old package records, or report on packages).
352
353
creating a SURROGAT for each user that will use the Breeze server to vote or browse members. As new users join or leave the team, these SURROGAT records must be maintained. BZZSMPRT is used when the user of the Breeze Web application needs to browse SCLM information about package members. This job writes out the information to temp files that the Breeze server job reads and passes on to the user. BZZSMPRT can be customized to create the temp dataset name to begin with the users user ID along with the date and time or by preceding the user ID with a fixed high level qualifier such as SCLMTEMP or SCLMBREZ. In the former case, then the user ID of the Breeze Server ID must be given alter access to all Breeze users user IDs. In the latter case, then the Breeze servers user ID will need alter access to the specified fixed high level and all breeze users will need read access to it. If you use a fixed high level qualifier for the temp dataset name, you may want to create a SMS rule to delete the files created under this high level qualifier on a daily basis. 6. Java Control: These are a number of members that control the way that Breeze works. The customized versions are stored in Breezes SBZZJAVA dataset. They consist of the following members: BZZ$CNTL: This stores the TCPIP port number used by the Breeze server job. This member is set up in the previous step. BRHTML: This is the HTML that contains the Breeze Web interface. It must be configured with the IP address of the system where Breeze is installed and the TCPIP port number used by the Breeze server job. Setting up this member, testing it, and the Breeze Web interface is covered in step 9 of Chapter 6 of the Breeze Installation Guide. $$$$SMTP: SMTP parameters. This member must be set up even if you do not set up Breeze to send out e-mail because it is used also for TSO SEND notification. Setting up this member and testing it is covered in step 13b of Chapter 9 of the Breeze Installation Guide. $$HTML: This contains message text, including Web link, to be used for notification messages. This member must be set up even if you do not set up Breeze to send out e-mail, since it is used also for TSO SEND notification. Setting up this member and testing it is covered in step 13c of Chapter 9 of the Breeze Installation Guide. This step also documents a number of ways to customize the e-mail that is sent out. $$COLL: This says whether you want collisions reported or not. $$EMER: This is a list of user IDs allowed to do emergency promotes $$EXCL: This is a list of SCLM types you want Breeze to ignore in its inventory collection 7. SCLM Integration: There are several steps that must be done to integrate Breeze with SCLM. This step is covered in step 11 and 12 of chapter 8 of the Breeze Installation Guide. a. The Breeze fields must be added to the SCLM promote panel, FLMP#P. The fields to be merged in are in a set of panels in the Breeze SBZZPENU dataset. You should merge in the fields based upon the member for the level of your operating system. Here is the full list: 354 BZZP#P28 OS/390 2.8 version of FLMP#P BZZP#P29 OS/390 2.9 version of FLMP#P BZZP#P2A OS/390 2.10 and z/OS 1.1 version of FLMP#P
BZZP#P2C z/OS 1.2 version of FLMP#P BZZP#P2D z/OS 1.5 version of FLMP#P BZZP#P2E z/OS 1.6 version and above of FLMP#P
The base FLMP#P panel can be modified or better yet, placed in a dataset under your PROJDEFS dataset, such as SCLM.PROJDEFS.PANELS, and have the SCLM users logon proc changed to include this dataset ahead of the base ISPF dataset for DDNAME ISPPLIB. b. The Breeze variables must be added to the SCLM promote skeleton, FLMP$. The variables to be merged in are in a set of skeletons in the Breeze SBZZSENU dataset. You should merge in the fields based upon the member for the level of your operating system. Here is the full list: BZZP$28 OS/390 2.8 version of FLMP$ BZZP$29 OS/390 2.9 version of FLMP$ BZZP$2A OS/390 2.10 and z/OS 1.1 version of FLMP$ BZZP$2C z/OS 1.2 version of FLMP$ BZZP$2D z/OS 1.5 version of FLMP$ BZZP$2E z/OS 1.6 version and above of FLMP$
c. The Breeze datasets must be added to the SCLM batch skeleton, FLMLIBS. The datasets to merge in are found in the member BZZFLMSK in SBZZSENU. The base FLMP$ and FLMLIBS skeletons can be modified or better yet, placed in a dataset under your PROJDEFS dataset, such as SCLM.PROJDEFS.SKELS, and have the SCLM users logon proc changed to include this dataset ahead of the base ISPF dataset for DDNAME ISPSLIB. d. The four Breeze user exits must be called from the SCLM Build notify and three promote user exit points: A call to BZZSME01 in SBZZCLIB must be added to the Build notify exit point. Here is an example of how our common Build exit from Chapter 12, SCLM user exit processing on page 241 looks after it was modified to add this call as shown in Example 15-1.
Example 15-1 Common Build Exit
/* REXX */ ARG parm /* Parse arguments into variable parm */ bldntfrc = 0 ADDRESS ISPEXEC "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(COPYEXTR)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(BINDEXTR)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(DEPLOY)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) "SELECT CMD(EX 'BZZ.SBZZCLIB(BZZSME01)' '"parm"')" bldntfrc = MAX(bldntfrc,rc) exit bldntfrc
355
A call to BZZSME02 in SBZZCLIB must be added to the Promote Verify exit point. We also added a check to this exit point to ensure that all promotes are done through a high level ARCHDEF, which is a Breeze requirement. Even with Breeze installed, individual members could be promoted without Breeze verification if this check is not added. This code assumes that all high level ARCHDEFs are stored in the PACKAGE type, which is our convention for the example projects in this book. You will have to adjust for your projects accordingly. Here is an example of how our common promote verify exit from Chapter 12, SCLM user exit processing on page 241 looks after it was modified to add this code and call. Notice that the parameters must be parsed to determine the type as shown in Example 15-2.
if type <> 'PACKAGE' then do say 'All promotes must use the PACKAGE type' exit 20 end ADDRESS ISPEXEC "SELECT CMD(EX 'BZZ.SBZZCLIB(BZZSME02)' '"parm"')" prmvfyrc = MAX(prmvfyrc,rc) if prmvfyrc = 0 then do "SELECT CMD(EX 'SCLM07.PROJDEFS.REXX(BKUPPROD)' '"parm"')" prmvfyrc = MAX(prmvfyrc,rc) end exit prmvfyrc Init: /* Break out the parms passed from the SCLM user exit */ PARSE UPPER VAR parm extyp ',' proj ',' prjdf ',' tsouid ',', fromgrp ',' type ',' member ',' scope ',' mode ',' togrp extyp proj prjdf tsouid fromgrp type member scope mode togrp return = = = = = = = = = = STRIP(extyp,'T') STRIP(proj,'T') STRIP(prjdf,'T') STRIP(tsouid,'T') STRIP(fromgrp,'T') STRIP(type,'T') STRIP(member,'T') STRIP(scope,'T') STRIP(mode,'T') STRIP(togrp,'T') /* /* /* /* /* /* /* /* /* /* Exit Type - where in SCLM? Project - high level qualifier Alternate Project Definition User executing SCLM function From grp(Promote) or build grp Type from the SCLM panel Member from the SCLM panel Scope entered on SCLM panel Mode entered on SCLM panel To grp (Promote), N/A (Build) */ */ */ */ */ */ */ */ */ */
356
An alternate way to protect against non-high level ARCHDEF promotes is to edit BZZSMEP1 in your SBZZCLIB dataset, look for the NOTHL routine as shown below and modify the ret_code = 0 line to read ret_code = 8. NOTHL: /* ---------------------- */ /* set pkg flag to no */ /* ---------------------- */ VPKGYN = 'N' ADDRESS ISPEXEC 'VPUT (VPKGYN)' PROFILE say member' is not a HL ARCHDEF - BREEZE processing bypassed' ret_code = 0 <- Modify this line to ret_code = 8 CALL EXIT
A call to BZZSME03 in SBZZCLIB must be added to the Promote Copy exit point. Here is an example of how our common promote copy exit from Chapter 12, SCLM user exit processing on page 241 looks after it was modified to add this call as shown in Example 15-3.
ADDRESS ISPEXEC "SELECT CMD(EX 'BZZ.SBZZCLIB(BZZSME03)' '"parm"')" prmcpyrc = MAX(prmcpyrc,rc) exit prmcpyrc A call to BZZSME04 in SBZZCLIB was required in earlier releases of Breeze, but it is no longer necessary.
8. SMTP server: If you want Breeze to send notification via e-mail to approvers, then you have to configure Breeze to use the SMTP server to handle the e-mail. TSO Send can be used if E-mail notification is not required. This configuration and testing can be found in chapter 9 of the Breeze Installation Guide. If you have to use secure SMTP, then you must follow the instructions in this chapter to set up Breeze to use it.
357
358
There are three record types that are required to be setup to use Breeze to vote on package promotions: Inventory junction records: Link inventory locations (identified by SCLM project, group, type and language) with approver groups. Approver group records: Define approver group names and quorums, which approvers they contain, and various attributes for each approvers role in the group (for example, whether an approvers vote is required when deciding the final result of the group vote). Individual approver user records: Define approvers, including their e-mail addresses, phone numbers and real names.
359
Use Utility Job BZZSMJIJ, as shown in Example 15-4, in your SBZZJCL dataset to define your inventory locations. Specify the Approver group to the right of the = sign. Include the other values as needed or enter * to match any member, project, group, type or language.
Example 15-4 Job BZZSMJIJ - Defining inventory locations
//....your job card... //* //STEP1 EXEC PGM=BZZSAPIJ //STEPLIB DD DSN=BZZ.SBZZLOAD,DISP=SHR //CIGLOG DD SYSOUT=* //CIGRPT DD SYSOUT=* //CIGOUT DD SYSOUT=* //CIGIN DD * ASSIGN TO APPROVER GROUP = ................ MEMBER = ......... OF PROJECT = ......... ALTERNATE PROJECT = ......... GROUP = ......... TYPE = ......... LANGUAGE = ....... . /* The parameters are: APPROVER GROUP: 116 character approver group name MEMBER: 18 character SCLM member name OF PROJECT: 18 character SCLM project name ALTERNATE PROJECT: 18 character SCLM project name GROUP: 18 character SCLM group name TYPE: 18 character SCLM type member name LANGUAGE: 18 character Notes: 1. Breeze interprets the inventory location that you specify in inventory junction records as the source location of members (before promotion). During approver group collection processing, Breeze looks at the source location of each valid member and then finds the associated inventory/approver group record. 2. You can specify wild cards (*) for project, group, type, language and member names: you can specify * on its own to match any name, or you can specify a partial name followed by * (for example, DEV* matches all names beginning with DEV: DEV1, DEV2 etc.). However, we recommend that you specify at least the complete project name, and as many other parts of the inventory location as possible, so that the approver group is responsible only for appropriate inventory locations.
Notifying approvers
When package promotion is requested, Breeze can notify users in two ways: e-mail and TSO SEND. Most organizations typically use both because they complement each other. TSO SEND is immediate so the approvers can be notified quickly. However, e-mail is trackable while TSO SEND is not and it can be sent to all users while TSO SEND can not because not all approvers have TSO access. Another advantage to e-mail notification is that the message contains a link to the Breeze Web interface. Users can then just click on the link and go directly to the Web interface. However, not all approvers want to be e-mailed about pending approvals. They may prefer to check periodically from their desktop. Whether or not users are notified is controlled in two ways. First, to shut off all notifications of approvers, do not provide a $$HTML member in SBZZJAVA, the trigger that e-mail is implemented for the product. (See the Breeze Installation Guide for more information on e-mail.) To shut off e-mails for select users or groups, use the individual user ID attribute definitions to limit to TSO only.
//...your job card //STEP1 EXEC PGM=BZZSAPG1 //STEPLIB DD DSN=BZZ.SBZZLOAD,DISP=SHR //CIGLOG DD SYSOUT=* //CIGRPT DD SYSOUT=* //CIGOUT DD SYSOUT=* //CIGIN DD * ADD APPROVER GROUP = ................
361
QUORUM = .... . ADD APPROVER GROUP = ................ INCLUDE USERID = ....... REQUIRED = . APPROVE ONLY ONCE = . NOTIFY ONLY = . . /*
The first two lines of input must be defined once. This sets the QUORUM. The next set of lines must be repeated for each user in the approver group. QUORUM: The minimum number of votes required in the approver group before the group vote can be decided as approve or veto. An approver group with required approvers cannot have a quorum of zero. The quorum must be equal to or greater than the number of required approvers in the group. Even if there is a quorum of votes, the group vote cannot be decided until all required approvers have voted. USERID: 18 character user ID of the approver to be added to the group, deleted from the group, or whose approver group details you want to update or list. REQUIRED: Required approver. Must vote before the package status can be determined. APPROVE ONLY ONCE: If the user has previously voted on the package when it was promoted from a lower group in the project hierarchy, then their vote will be reapplied to later requests for promotion. This allows the user to vote only once, and not be required for further intervention as the package is promoted up the project hierarchy. NOTIFY ONLY: The user is not allowed to vote but is notified when a package requests approval.
//STEP1 EXEC PGM=BZZSAPU1 //STEPLIB DD DSN=BZZ.SBZZLOAD,DISP=SHR //CIGLOG DD SYSOUT=* //CIGRPT DD SYSOUT=* //CIGOUT DD SYSOUT=* //CIGIN DD *
362
ADD
APPROVER USER ID = ........ NAME = '...........................' PHONE = ............... EMAIL1 = '...........................' EMAIL2 = '...........................' EMAIL3 = '...........................' TSOSEND = . REQUIRED = . APPROVE ONLY ONCE = . .
/* The parameters are as follows: ID NAME PHONE EMAIL13 18 character approver user ID. 130 character user name. If the name contains spaces, then it must be enclosed in quotes. Up to a 10 digit telephone number. 150 character e-mail address. You may enter up to three e-mail addresses for each specified user ID. If the address contains spaces, then it must be enclosed in quotes. Y - Notify via TSO SEND and e-mail. N - Notify via e-mail only. Blank - Defaults to Y. REQUIRED No longer used. APPROVE ONLY ONCE No longer used. If there is no Approver User record, then the notification message is sent as a TSO SEND message.
TSO SEND
//BZZSMJU1 JOB (#ACCT),'BREEZE JOB',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //* ------------------------------------------------------------------* //* NAME: BZZSMJU1 * //* PURPOSE: MAINTAIN USER/APPROVER ATTRIBUTE RECORDS. * //* ------------------------------------------------------------------* //* //STEP1 EXEC PGM=BZZSAPU1 //STEPLIB DD DSN=BZZ.SBZZLOAD, // DISP=SHR //CIGLOG DD SYSOUT=* //CIGRPT DD SYSOUT=* //CIGOUT DD SYSOUT=*
Chapter 15. Breeze for SCLM - installation, setup, and use
363
//CIGIN ADD
DD
* APPROVER USER ID = DOHERTL NAME = 'LIAM DOHERTY' PHONE = 123456789 EMAIL1 = 'DOHERTL@AU1.IBM.COM' TSOSEND = Y APPROVER USER ID = PCECK NAME = 'PETER ECK' PHONE = 123456789 EMAIL1 = 'PCECK@US.IBM.COM' TSOSEND = Y
. ADD
. ADD APPROVER USER ID = JMEHTA NAME = 'JYOTINDRA MEHTA' PHONE = 123456789 EMAIL1 = 'JMEHTA@IN.IBM.COM' TSOSEND = Y APPROVER USER ID = * BUILD REPORT
. LIST
. /* Example 15-8 creates two approver groups, one approver group for development and one approver group for TEST. It adds the three users we defined as approvers to each approver group. Finally, it LISTs all approver groups in the database.
Example 15-8 BZZSMJG1 - Defining approver group records
//BZZSMJG1 JOB (#ACCT),'BREEZE JOB',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //* ------------------------------------------------------------------* //* NAME: BZZSMJG1 * //* PURPOSE: MAINTAIN APPROVER GROUP RECORD DEFINITIONS. * //* ------------------------------------------------------------------* //STEP1 EXEC PGM=BZZSAPG1 //STEPLIB DD DSN=BZZ.SBZZLOAD, // DISP=SHR //CIGLOG DD SYSOUT=* //CIGRPT DD SYSOUT=* //CIGOUT DD SYSOUT=* //CIGIN DD * ADD APPROVER GROUP = DEVAPPR QUORUM = 1 . ADD APPROVER GROUP = DEVAPPR INCLUDE USERID = PCECK REQUIRED = N APPROVE ONLY ONCE = N NOTIFY ONLY = N . ADD APPROVER GROUP = DEVAPPR 364
A Practical Guide to Setting Up and Using SCLM
INCLUDE USERID = DOHERTL REQUIRED = N APPROVE ONLY ONCE = N NOTIFY ONLY = N . ADD APPROVER GROUP = DEVAPPR INCLUDE USERID = JMEHTA REQUIRED = N APPROVE ONLY ONCE = N NOTIFY ONLY = N . ADD APPROVER GROUP = TESTAPPR QUORUM = 1 . ADD APPROVER GROUP = TESTAPPR INCLUDE USERID = PCECK REQUIRED = N APPROVE ONLY ONCE = N NOTIFY ONLY = N . ADD APPROVER GROUP = TESTAPPR INCLUDE USERID = DOHERTL REQUIRED = N APPROVE ONLY ONCE = N NOTIFY ONLY = N . ADD APPROVER GROUP = TESTAPPR INCLUDE USERID = JMEHTA REQUIRED = N APPROVE ONLY ONCE = N NOTIFY ONLY = N . LIST APPROVER GROUP = * BUILD REPORT . /* Example 15-9 creates junctions records for each approver group that ties the members in the development groups (using DEV*) to the development approver group and the TEST group members to the TEST approver group. It then reports on the junction records.
Example 15-9 BZZSMJIJ - Defining junctions records
//BZZSMJIJ JOB (#ACCT),'BREEZE JOB',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //* ------------------------------------------------------------------* //* NAME: BZZSMJIJ * //* PURPOSE: MAINTAIN INVENTORY JUNCTION RECORDS * //* ------------------------------------------------------------------* //STEP1 EXEC PGM=BZZSAPIJ //STEPLIB DD DSN=BZZ.SBZZLOAD, // DISP=SHR //CIGLOG DD SYSOUT=* //CIGRPT DD SYSOUT=* //CIGOUT DD SYSOUT=* //CIGIN DD * ASSIGN TO APPROVER GROUP = DEVAPPR
Chapter 15. Breeze for SCLM - installation, setup, and use
365
OF
MEMBER = * PROJECT = SCLM07 ALTERNATE PROJECT = * GROUP = DEV* TYPE = * LANGUAGE = * = = = = = = = TESTAPPR * SCLM07 * TEST * *
. ASSIGN TO APPROVER GROUP MEMBER OF PROJECT ALTERNATE PROJECT GROUP TYPE LANGUAGE . LIST APPROVER GROUP = * BUILD REPORT . /*
366
an 8 if the member is not a package to prevent members from being promoted outside of Breeze control. We discussed this situation in 15.4.1, Breeze installation tasks on
page 353 above.
If it is a valid package, then the Breeze exit records the package information in the Breeze package database, and continues processing. If the Breeze exit determines that the package does not require approval, then it sets the package status to APPROVED, and returns control to SCLM with a return code of zero, allowing the promotion to proceed. If the package does require approval, then the Breeze exit sets the package status to PENDING, notifies the approvers, and returns a non-zero return code to SCLM. This causes the promotion to fail. The approvers can now view and vote on the package.
Chapter 15. Breeze for SCLM - installation, setup, and use
367
Verify exit during second promote: If the voting results in a package status of APPROVED (instead of VETOED), then the developer can now promote the package by retrying the promote function. This time, the Breeze promote verify user exit recognizes that the package has been approved, and returns control to SCLM with a return code of zero, allowing the promotion to proceed. Instead of manually using the promote function a second time, you can schedule the Breeze promotion sweep batch utility, BZZSMJS1, to automatically promote packages that have been approved. Copy exit during second promote: If the normal SCLM copy phase succeeds, then the Breeze promote copy user exit updates the package status to PROMOTED. Otherwise, the Breeze exit either updates the package status to INCOMPLETE or leaves the package in an APPROVED status, depending upon installation settings. The parameter RESET NOT REQUIRED ON INCOMPLETE as specified in the CIGINI file controls this behavior. Purge exit during second promote: Breeze does not affect the normal SCLM Purge phase.
* NAME: P2007601 * DESC: PACKAGE FOR 2007601 * DEFECT: 2007601 * * ADD SOME NEW FUNCTIONALITY AND FIXING A DEFECT * * ARCHDEF MEMBERS * INCL SCLMTST1 ARCHDEF * Batch Program INCL SCLMTST1 LECDEF * Batch DB2 Program INCL SCLMTST2 LECDEF * Online DB2 Program INCL SCLMTST3 ARCHDEF * Online Program * * JCL MEMBERS * PROM PAY63702 JCLLIB * Job Control Language * * DOC MEMBERS * PROM P2007601 DOC * Documentation
368
SCLM Promote - Entry Panel Command ===> Promote input: Project . . . From group . Type . . . . Member . . . Mode . . 1
: . . .
Enter "/" to select option Workstation Promote Scope . . . 1 1. Normal 2. Subunit 3. Extended
Output control: Process . . 2 1. Execute 1. Terminal 2. Submit 2. Printer 3. Data set Printer . . * 4. None Volume . . Breeze control: Clear Package: N (Y/N) Override Dates: N (Y/N) Window (yy/mm/dd - hh:mm) 07 / 09 / 01 00 : 00 Thru 07 / 09 / 30 00 : 00 Description: FIX DEFECT 2007601 Type: ST (ST/EM)
Figure 15-4 SCLM Promote - Entry Panel
The package Type (standard or emergency) does not affect approval, and is for documentation purposes only, except for one key difference: if your administrator has created a $$EMER member in the SBZZJAVA data set, then only the user IDs listed in that member can build or promote emergency packages. If there is no $$EMER member in the SBZZJAVA data set, then there is no difference in behavior between standard and emergency packages. The Window attributes consist of a start and end date between which the package can be promoted. If the dates are left blank then the Breeze default dates are used. The Description attribute allows the developer to enter a description for the package. If this is left blank then the package will be given a blank description. The Clear Package attribute, if set to Y will allow the developer to automatically clear the package if it exists at the next level of the hierarchy. This enables packages to be reused without having to manually clear same named packages using the BZZSMJD1 job. If the developer does not clear the package, either manually with the BZZSMJD1 job or by using the Clear Package attribute, they will get a message from Breeze stopping the promote as Breeze will not allow the contents of a package to be overwritten unless the status of that package is set to blank.
369
The Override attribute, if set to Y will allow the developer to override these parameters on the second promote if they were entered incorrectly on the first promote. If after approval the second promote has been invoked but the promotion date window has not been reached, due to being entered incorrectly on the first promote, by using the override attribute the developer can set the promotion window to its correct value. If the developer invokes the SCLM promote service as opposed to using the foreground SCLM promote, then Breeze will assign default attributes to the package. When the SCLM promote function starts, it produces messages similar to these: FLM59001 - INVOKING PROMOTE PROCESSOR FLM09002 - THE PROMOTE REPORT WILL APPEAR IN BABEL.PROMOTE.REPORT02 FLM09004 - THE PROMOTE MESSAGES WILL APPEAR IN BABEL.PROMOTE.MSGS02 If the normal promote verify phase succeeds, then SCLM invokes the Breeze promote verify user exit. The Breeze exit calls the RPTARCH SCLM service to generate an architecture report, producing a message similar to this: FLM87107 - RPTARCH SUCCEEDED FOR MEMBER PKG1 AT 16:33:04, CODE: 0 Breeze uses this report to determine if the promote input member is a valid package (that is, a high-level architecture member). If the member is not a package, then Breeze performs no further processing; the exit returns control to SCLM, and SCLM continues with a normal promote. Content and approver collection Breeze uses the architecture report it generated earlier to determine the inventory location of each source member in the package. If any of these inventory locations match Breeze inventory junction records, then Breeze uses the approver groups named in the inventory junction records to collect a list of approvers for the package. This is known as content and approver collection. At this point, Breeze displays the message shown in Figure 15-5. ******************************************************* * Content and approver collection in progress for * * Package P2007601 * * From Group = DEV1 * * To Group = TEST * *******************************************************
Figure 15-5 Breeze - Approver collection in progress
If Breeze determines that the package has no approvers, or all its approvers belong to groups with a quorum of zero, then the package needs no approval before promotion. Breeze sets the package status to APPROVED. If the package has at least one approver in a group whose quorum is greater than zero, then the package requires approval before promotion. Breeze sets the package status to PENDING, and displays the following pop-up window, as shown in Figure 15-6.
370
* Package Approver Reminder Prompt Option ==> The package P2007601 has 0001 approver groups assigned, containing 0003 individual approvers of which 0000 are required. The package is not eligible for promotion until the package is approved. All users have been notified that their vote is required. To approve or veto the package promotion, please use the Breeze for SCLM Web Interface. End = Return Help = PF1
Figure 15-6 Breeze package appprover reminder pop-up panel
If you execute the promote in a submitted job, then similar information will appear in SYSTSPRT. Breeze notifies all approvers for the package via e-mail, TSO SEND or both, depending on the approver records. For more information about approver records.
371
Also, users defined to watchlists will receive Breeze notification if a package clear occurs as the result of an SCLM build being performed. If the package has been promoted to a higher level in the hierarchy and then one of the modules is changed and the package rebuilt, Breeze will display panel BZZSM014 which states that the package exists at the higher level already. What must be done in this case is to use the CLEAR utility or promote with the CLEAR option to clear all reference of the voting on the package, so that it can be reused. Alternatively, a different package ID could be used. It should also be noted that vetoed packages will be cleared if an SCLM build is performed on the package.
372
15.7 Viewing and voting on packages using the Breeze Web interface
An e-mail message is sent to all potential approvers of a package. The e-mail message contains a link to the Web page that displays the Breeze interface. To start using the Breeze Web interface, you can either click on the link in the e-mail message, or ask your Breeze administrator for the Web address (URL) of the interface, and enter the address in your Web browser. The Web address of the Breeze Web interface has the following format where ipAddress is the TCPIP address of your host computer and port is the TCPIP port number that the Breeze server job is using to communicate with the Breeze Web applications: http://ipAddress:port/brsclm.html This Web page downloads a Java applet that displays in your Web browser window. When the Breeze Web interface loads, it displays a login prompt as shown in Figure 15-7.
After you logon with your mainframe ID and password, the Breeze Web interface will load as shown in Figure 15-8.
373
The main panel is divided into several areas as shown in Table 15-1.
Table 15-1 Main panel areas In-box Filter List Information Status Lets you determine which packages are displayed in the list according to package status and whether you are an approver for the package. Limits the packages displayed to those that meet the criteria you specify. Displays a list of packages determined by the In-box and any filter that you set. To view or vote on a package, you select the package from this list. Displays information about the package that you select from the list. Describes communication between the Breeze Web interface and its host.
The information panel contains the following information in tabs as shown in Table 15-2.
Table 15-2 Tab information Summary Contents Log General Information about the package, such as status and group information A list of members included in this package. You can also Browse the member and its SCLM accounting information from here A log of Breeze activity against the package
374
General Information about the package, such as status and group information List members that are affected by other packages A list of the approver groups and approvers and the votes that they have cast, plus the current status A list of notes that approvers may have made when they voted on a package
Emergency Packages Standard Packages Packages by status Pending Vetoed Approved Promoted Promotion failed
When the list displays the package you want, click on it in the list to select it. To vote on a package for which you are an Approver, you must select the package from the list displayed when you click on Requiring my approval or one of its sub-items. This activates the Approve and Veto buttons, allowing you to cast a vote. If you select the same package from the Packages by status list, then these buttons remain disabled.
375
Value Date the package was promoted. User ID of the person who made the last update to the package. Date the package was last updated.
This is the first in a sequence of voting dialogs. Each of these panels has a Prior button and a Cancel button. To step back through the sequence, click the Prior button. To return to the main panel without voting, click the Cancel button. On the first dialog in the sequence, shown above, both the Prior and Cancel buttons take you back to the main panel without voting. 4. To leave a note explaining your vote to other users, select Add notes to package. 5. Click the Next button to proceed. 6. If you chose Do not add notes to package, go to the next step. If you chose to add notes, then a dialog displays with a text box where you can enter your notes. You can enter up to 480 characters. To insert a line break in your notes, press Enter. 376
When you finish entering your notes, click the Next button to proceed. The final voting dialog displays. 7. Click the Submit button to cast your vote as shown in Figure 15-10.
Approved status
Every approver group for the package approves the package, that is, in every approver group: Every required approver has voted either for or against. A package can be approved even if one or more required approvers vote against it. The number of votes is equal to or greater than the quorum (minimum number of votes required for the approver group). There are a majority of for votes. The package now can be promoted.
Vetoed status
One approver group for the package vetoes the package, that is, in one of the approver groups: Every required approver has voted either for or against. A package can be vetoed even if one or more required approvers vote for it. The number of votes is equal to or greater than the quorum (minimum number of votes required for the approver group). There are at least as many against votes as for votes. If one approver group vetoes a package, then Breeze immediately sets the package to vetoed status even if required approvers in other approver groups have not yet voted.
377
Figure 15-11 Summary tab Table 15-5 Summary tab explanations Description If a developer used the SCLM Promote function in foreground to request promotion for this package, then this is the description that the developer entered on the Breeze pop-up window. Otherwise, if the developer used the SCLM promote service in a batch job, then this is the default description supplied by Breeze. Package type: STANDARD or EMERGENCY. Current package status. User ID, time, and date of the most recent invocation of the Breeze promote verify user exit for this package, that is, who last used the SCLM promote function for this package, and when they used it. User ID, time, and date of the most recent successful promotion of this package as recorded by the Breeze promote purge user exit. If the package reaches Approved status between these two dates, then the package can be promoted. Otherwise, the package cannot be promoted even if it is approved. Package member details. The to group is the SCLM project group to which the package will be promoted. Indicates whether the current package is in collision with any other packages.
378
To view more detailed information about a member, click the entry for the member in the Contents tab. A dialog displays with the following choices, each of which opens a new browser window displaying the selected information: Browse Changes Audit Displays the contents of the member. Displays a line-by-line comparison of the new (source) and old (target) members. Displays audit information for the member.
379
For each action, the log displays the date and time, the return code, and the user ID that performed the action. If a package was promoted previously, then the package inherits the existing log, and the log accumulates as the package is promoted up the hierarchy.
380
381
//SWPTEST JOB (#ACCT),'BREEZE JOB',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //* ------------------------------------------------------------------* //* NAME: BZZSMJS1 * //* PURPOSE: SUBMIT ALL BREEZE FOR SCLM PACKAGES THAT ARE APPROVED * //* AND HAVE A VALID EXECUTION WINDOW. * //* NOTE: THE OK$CLEAR DD DUMMY WILL CAUSE THE CLEAR PACKAGE * //* OPTION TO BE INCLUDED IN THE PROMOTE REQUEST. TO DISABLE* //* THE CLEAR TARGET PACKAGE OPTION, COMMENT OUT THE * //* OK$CLEAR DDNAME. * //* ------------------------------------------------------------------* //* * //* TO USE THIS JCL, YOU MUST: * //* 1) INSERT VALID JOB CARD. * //* 2) REVIEW THE NAMING CONVENTIONS OF THE ISPF LIBRARIES. * //* THIS SKELETON REFLECTS DEFAULT NAMING STANDARDS. * //* PLEASE MODIFY TO MEET YOUR INSTALLATION STANDARDS. * //* 3) MAKE SURE THAT THE STEPLIB POINTS TO YOUR INSTALLATION * //* ISPF LOAD LIBRARIES, UNLESS THEY ARE LINKLISTED. * //* REVIEW THIS WITH YOUR ISPF SYSTEM PROGRAMMER. * //* 4) MAKE SURE THAT THE STEPLIB POINTS TO THE BREEZE PRODUCT* //* LIBRARIES THAT CONTAIN THE CIGINI MODULE. * //* * //* ------------------------------------------------------------------* //STEP1 EXEC PGM=BZZSAPS1 //STEPLIB DD DSN=BZZ.SBZZLOAD,DISP=SHR //CIGLOG DD SYSOUT=* //OK$CLEAR DD DUMMY //PROMCARD DD DSN=&&APPRCARD,DISP=(,PASS), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=31200), // SPACE=(TRK,(45,45)),UNIT=SYSALLDA //CIGTMPLT DD * FLMCMD PROMOTE,%PROJECT%,%ALTERNATE%,%GROUP%,%TYPE%,+ %MEMBER%,,N,C,PROMMSGS,PROMREPT,PROMEXIT,COPYERR,+ Y,Y,,BLDMSGS,BLDREPT,BLDLIST,BLDEXITR /* //STEP1IF IF (STEP1.RC = 0) THEN
382
//STEP2 EXEC PGM=IRXJCL,PARM='PROMSEL TEST' //*----------------------------------------------//* FILTER INPUT FROM STEP 1 - SEND OUTPUT //* TO NEXT STEP ONLY FOR SPECIFIED GROUP //*----------------------------------------------//SYSTSPRT DD SYSOUT=(*) //SYSTSIN DD DUMMY //APPRCARD DD DSN=&&APPRCARD,DISP=(OLD,DELETE) //PROMCARD DD DSN=&&PROMCARD,DISP=(,PASS), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=31200), // SPACE=(TRK,(45,45)),UNIT=SYSALLDA //*----------------------------------------------//* THE FOLLOWING DATASET MUST CONTAIN THE REXX //*----------------------------------------------//SYSEXEC DD DSN=SCLM.PROJDEFS.REXX,DISP=SHR //STEP2IF IF (STEP2.RC = 0) THEN //*-------------------------------------------------------------------* //* PASS PROMOTE REQUESTS TO SCLM * //*-------------------------------------------------------------------* //PROMOTE PROC //GENER0 EXEC PGM=IEBGENER //SYSPRINT DD DUMMY //SYSIN DD DUMMY //SYSUT1 DD DUMMY //SYSUT2 DD DSN=&&CLIST0(TEMPNAME),UNIT=SYSALLDA, // SPACE=(TRK,(1,1,2),RLSE), // DISP=(NEW,PASS),DCB=(LRECL=80, // BLKSIZE=1600,DSORG=PO,RECFM=FB) //*-------------------------------------------------------------------* //* PROCESS THE SCLM FLMCMDS FROM STEP1 * //*-------------------------------------------------------------------* //PROM0 EXEC PGM=IKJEFT01,REGION=4096K,TIME=1439,DYNAMNBR=200 //*-------------------------------------------------------------------* //* STEPLIB LIBRARIES * //*-------------------------------------------------------------------* //STEPLIB DD DSN=BZZ.SBZZLOAD,DISP=SHR // DD DSN=ISPFLPA.ZOSR8.SISPLPA,DISP=SHR // DD DSN=ISPFLNK.ZOSR8.SISPLOAD,DISP=SHR // DD DSN=DB2.V810.SDSNLOAD,DISP=SHR //*-------------------------------------------------------------------* //* ISPF LIBRARIES * //*-------------------------------------------------------------------* //ISPMLIB DD DSN=BZZ.V1R1.SBZZMENU,DISP=SHR // DD DSN=ISPF.ZOSR8.SISPMENU,DISP=SHR //* //ISPSLIB DD DSN=BZZ.V1R1.SBZZSENU,DISP=SHR // DD DSN=SCLM.PROJDEFS.SKELS,DISP=SHR // DD DSN=ISPF.ZOSR8.SISPSENU,DISP=SHR // DD DSN=ISPF.ZOSR8.SISPSLIB,DISP=SHR //* //ISPPLIB DD DSN=BZZ.V1R1.SBZZPENU,DISP=SHR // DD DSN=ISPF.ZOSR8.SISPPENU,DISP=SHR //* //ISPTLIB DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB),
383
// DSN= TEMPORARY TABLE LIBRARY // DD DSN=ISPF.ZOSR8.SISPTENU,DISP=SHR //* //ISPTABL DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE LIBRARY //* //ISPPROF DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE LIBRARY //* //ISPLOG DD SYSOUT=*, // DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB) //* //ISPCTL1 DD DISP=NEW,UNIT=SYSALLDA,SPACE=(CYL,(1,1)), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB) TEMPORARY FILE //* TAILORING DATASET //SYSTERM DD SYSOUT=* //*-------------------------------------------------------------------* //* TEMPORARY CLIST CONTAINING COMMAND TO BE EXECUTED * //*-------------------------------------------------------------------* //SYSPROC DD DSN=&&CLIST0,DISP=(OLD,DELETE) // DD DSN=BZZ.V1R1.SBZZCLIB,DISP=SHR // DD DSN=ISPF.ZOSR8.SISPCLIB,DISP=SHR CLIST LIBRARY OW01230 // DD DSN=SCLM07.PROJDEFS.REXX,DISP=SHR //*-------------------------------------------------------------------* //* PASCAL ERROR MESSAGE FILE * //*-------------------------------------------------------------------* //COPYERR DD SYSOUT=(*),RECFM=FBA,LRECL=133,BLKSIZE=1330 //*-------------------------------------------------------------------* //* PROMOTE USER EXIT OUTPUT FILE * //*-------------------------------------------------------------------* //PROMEXIT DD DSN=&&PROMEXIT, // DISP=(NEW,DELETE,DELETE),SPACE=(TRK,(5,10),RLSE), // DCB=(LRECL=160,BLKSIZE=3200,RECFM=FB),UNIT=SYSALLDA //*-------------------------------------------------------------------* //* OUTPUT CARD * //*-------------------------------------------------------------------* //PROMREPT DD SYSOUT=* //PROMMSGS DD SYSOUT=* //SYSPRINT DD SYSOUT=(*) //BLDMSGS DD SYSOUT=*,DCB=(LRECL=80,RECFM=F,BLKSIZE=80) //BLDLIST DD SYSOUT=*,DCB=(LRECL=137,RECFM=VBA,BLKSIZE=3120) //BLDREPT DD SYSOUT=*,DCB=(LRECL=80,RECFM=FBA,BLKSIZE=3120) //BLDEXITR DD DSN=&&BLDEXITR, // DISP=(NEW,DELETE,DELETE),SPACE=(TRK,(5,10),RLSE), // DCB=(LRECL=160,BLKSIZE=3200,RECFM=FB),UNIT=SYSALLDA //*-------------------------------------------------------------------* //* NLS TABLE AND TRANSLATION TABLE NAME FILE * //*-------------------------------------------------------------------* //ZFLMDD DD DUMMY //*-------------------------------------------------------------------* //FLMMSGS DD SYSOUT=(*) //SYSTSPRT DD SYSOUT=(*) //SYSTSIN DD DUMMY
384
//PROMOTE PEND //*-------------------------------------------------------------------* //* INVOKE THE PROMOTE PROC TO PROCESS QUALIFIED PACKAGES * //*-------------------------------------------------------------------* //BREEZE EXEC PROC=PROMOTE //GENER0.SYSUT1 DD DSN=&&PROMCARD,DISP=(OLD,DELETE) //* //PROM0.ZFLMDD DD * ZFLMNLST=FLMNLENU ZFLMTRMT=ISR3278 ZDATEF=YY/MM/DD /* //PROM0.SYSTSIN DD * ISPSTART CMD(%TEMPNAME) /* //ENDIF2 ENDIF //ENDIF1 ENDIF Example 15-12 is the PROMSEL REXX. It only passes on PROMOTE statements that are for a specific group. The group is the single parameter that is passed in. This REXX must be placed in the location you specify in the SYSEXEC statement of the step that you add to your sweep job. You may want to improve this routine to handle wildcards in the group name passed to it.
Example 15-12 PROMSEL REXX to filter out PROMOTE statements to a specific group
/* REXX */ Arg Group Say Say Say Say '*********************************************************' 'Promotion selected for groups : 'Group '*********************************************************' ' '
j = 0 i = 1 PROM = 'No' /* read in all PROMOTE CARDs for packages in APPROVED status */ "EXECIO * DISKR APPRCARD (FINIS STEM apprcard." If apprcard.0 = 2 then Do say 'There are no packages to process' exit 4 End Parse var apprcard.1 cmd PROMOTE',' . Do Until (cmd = 'FLMCMD') j = j + 1 promcard.j = apprcard.i i = i + 1 Parse var apprcard.i cmd PROMOTE',' . End Do While (cmd <> 'IF') Parse var apprcard.i cmd PROMOTE','PROJ','ALT','PROMGRP',' . /* look for PROMOTE cards that match the specified group */ If cmd = 'FLMCMD' & Group = PROMGRP Then
Chapter 15. Breeze for SCLM - installation, setup, and use
385
Do PROM = 'Yes' j = j + 1 promcard.j = apprcard.i i = i + 1 writeName = 'Yes' /* write out PROMOTE cards until the next set is found */ Parse var apprcard.i cmd PROMOTE',' . Do Until (cmd = 'FLMCMD' | cmd = 'IF') j = j + 1 promcard.j = apprcard.i if writeName = 'Yes' then Do Parse var apprcard.i PkgName','rest say 'Package' strip(PkgName) 'will be promoted' writeName = 'No' End i = i + 1 Parse var apprcard.i cmd PROMOTE',' . End End Else /* bypass PROMOTE cards until the next match is found */ Do Until (cmd = 'FLMCMD' | cmd = 'IF') i = i + 1 Parse var apprcard.i cmd PROMOTE',' . End If cmd = 'IF' Then Do while (i <= apprcard.0) j = j + 1 promcard.j = apprcard.i i = i + 1 End End If PROM = 'Yes' Then Do promcard.0 = j "EXECIO * DISKW PROMCARD (FINIS STEM promcard." RC = 0 End Else Do Say '*********************************************************' Say '*** No requests found for promotion group 'Group Say '*********************************************************' RC = 4 End Exit RC
386
//JC1 JOB (ACCT#),'NAME',CLASS=A,REGION=4096K, // MSGCLASS=H,MSGLEVEL=(1,1), //JC1_USER,PASSWORD //* ----------------------------------------------------------------//STEP010 EXEC PGM=IKJEFT01,REGION=300M,TIME=1439,DYNAMNBR=200 //STEPLIB DD DISP=SHR,DSN=BZZ.SBZZLOAD //ISPPROF DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(10,10,10)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE LIBRARY //* //ISPMLIB DD DSN=BZZ.SBZZMENU,DISP=SHR // DD DSN=ISP.SISPMENU,DISP=SHR //* //ISPSLIB DD DSN=BZZ.V1R1.SBZZSENU,DISP=SHR // DD DSN=ISP.SISPSENU,DISP=SHR //* //ISPPLIB DD DSN=BZZ.V1R1.SBZZPENU,DISP=SHR // DD DSN=ISP.SISPPENU,DISP=SHR //* //ISPTLIB DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(10,10,10)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE ENURARY // DD DSN=ISP.SISPTENU,DISP=SHR //* //ISPTABL DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(10,10,10)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE LIBRARY //* //ISPLOG DD SYSOUT=*, // DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB) //* //ISPCTL1 DD DISP=NEW,UNIT=SYSDA,SPACE=(CYL,(1,1)), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB) TEMPORARY FILE //* TAILORING DATASET //SYSUDUMP DD SYSOUT=* //SNAPDUMP DD SYSOUT=* //SYSOUT DD SYSOUT=* //CIGLOG DD DSN=&&CLOG, // DISP=(NEW,PASS),UNIT=SYSALLDA, // DCB=(RECFM=FBA,LRECL=133,BLKSIZE=1330), // SPACE=(CYL,(1,5)) //CIGRPT DD SYSOUT=* //CIGIN DD * //SYSPRINT DD SYSOUT=* //ISPLOG DD DUMMY 387
388
16
Chapter 16.
ERROR
This setting, however, does not protect the member from ISPF 3.3 (Move/Copy), IEBCOPY, or other methods of overwriting the member, only ISPF edit.
389
Additionally, by providing the mechanism to protect resources such that only SCLM programs have the authority to update certain resources, there are additional benefits in that you can be even more granular with your authority with regard to SCLM. For example, you can say that a development group is only allowed to be updated by the SCLM Edit and Build processes by a certain group, plus the change management group is only allowed to update certain resources via the Promote process. This allows you to define who is allowed to do what in terms of updating the hierarchy, and how they are allowed to perform that update. In this chapter we provide a brief explanation of EAC terminology before considering some usage scenarios. Additionally, we explore some of the special requirements required concerning Breeze with EAC and IEBCOPY update through EAC. Restriction: EAC currently works only with RACF. The EAC processor is hooked into the ICHRCX02 RACF post processing user exit such that when RACF flags a violation control is passed to the ICHRCX02 exit. EAC processing is then invoked to check if the access that was denied through RACF is actually permitted through EAC rules. If it is, then the violation is overridden. Similar processing could be handled in other security managers, such ACF2 or Top Secret, if those products had a means of defining program pathing, which is the process of allowing access to certain resources only via certain programs.
390
Member Status Account Language Text Chg Date Chg Time RDBKC01 DEV1 CBCID2DT DEV1 2007/01/03 01:07:35 ******************************* Bottom of data ********************************
Figure 16-1 SCLM member showing date and time
We can see the changed date and time of the member when we list the member in option 3.1. This date and time is the date and time stored in the ISPF statistics. The same member can be seen by listing the data set in ISPF edit as shown in Figure 16-2. -----------------------------------------------------------------------------EDIT SCLM07.DEV1.COBOL Row 00001 of 00001 Command ===> Scroll ===> PAGE Name Prompt Lib Size Created Changed ID . RDBKC01 1 166 2006/11/22 2007/01/03 01:07:35 PCECK **End**
Figure 16-2 SCLM member listed through ISPF edit
The final thing to look at is the SCLM metadata that is stored in the VSAM account file. When the member statistics and metadata statistics are in sync, then the account record for the member will have the same date and time as shown in Figure 16-3.
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
391
Physical Data Set Accounting Status Change User ID . Member Version . Language . . . . Creation Date . . Creation Time . . Promote User ID . Promote Date . . Promote Time . . Predecessor Date Predecessor Time
. . . . . . . . . . . .
: : : : : : : : : : : :
SCLM07.DEV1.COBOL EDITABLE Change Group . . . PCECK Authorization Code 9 Auth. Code Change CBCID2DT Translator Version 2006/11/22 Change Date . . . 15:51:32 Change Time . . . Access Key . . . . 0000/00/00 Build Map Name . . 00:00:00 Build Map Type . . 2006/12/08 Build Map Date . . 05:18:35 Build Map Time . .
. . . . . . . . . . .
: : : : : : : : : : :
DEV1 P
2007/01/03 01:07:35
2007/01/03 01:07:35
Enter "/" to select option Display Statistics Number of Change Codes Number of Includes Number of Compilation Units Number of User Entries
: : : :
0 3 0 0
If we now edit this member outside of SCLM, in ISPF edit, save it, and look at the member listed in SCLM option 3.1, we see that the date and time of the member has changed, shown in Figure 16-4. -----------------------------------------------------------------------------Member List : SCLM07.DEV1.COBOL - HIERARCHY VIEW Member 1 of 1 Command ===> Scroll ===> CSR A=Account V=View M=Map C=Build B=Browse P=Promote D=Delete U=Update E=Edit T=Transfer
Member Status Account Language Text Chg Date Chg Time RDBKC01 DEV1 CBCID2DT DEV1 2007/01/08 20:09:47 ******************************* Bottom of data ********************************
Figure 16-4 SCLM member showing date and time after illegal edit
If we were to look at the account record again, we would see that it is has exactly the same information as what is seen in Figure 16-3 above. The problem with the mismatch between the member in the data set and the SCLM metadata for the member can be seen when the member is built or promoted. If we build this source member, SCLM will return to us the following message, shown in Figure 16-5.
392
INVOKING BUILD PROCESSOR THE BUILD REPORT WILL APPEAR IN DOHERTL.BUILD.REPORT45 THE BUILD LISTING WILL APPEAR IN DOHERTL.BUILD.LIST45 BUILD PROCESSOR INITIATED - 20:15:21 ON 2007/01/08 ACCOUNTING INFORMATION IS NOT ACCURATE FOR MEMBER: RDBKC01 TYPE: COBOL ACCOUNTING GROUP: DEV1 MEMBER GROUP: DEV1 FLM45000 - ERROR PROCESSING CURRENT BUILD FLM46000 - BUILD PROCESSOR COMPLETED - 20:15:22 ON 2007/01/08 FLM09008 - RETURN CODE = 8
Figure 16-5 Accounting error when ISPF stats and metadata are out of sync
As we can see from the message, SCLM will not allow the member to be built due to a mismatch between the accounting data and the ISPF statistics. This also means that the member cannot be promoted, which protects the integrity of the modules further up in the hierarchy. This is a simple scenario, and in this case it can be fixed quite easily by just saving the member in SCLM in the development group. But if the same edit had been performed on a TEST or PROD version of the member, then it would be a bit more complicated to fix the situation, possibly requiring the member that has been edited illegally being saved in the development group and being promoted through the hierarchy. This is the most common error in SCLM that EAC is going to prevent, but additionally EAC will give more granularity as to who can update what resource using which SCLM function.
16.2.1 Profiles
A Profile identifies a data set or RACF generic data set Profile to be validated by Enhanced Access Control for SCLM. Discrete Profiles like SCLM.DEVT.SOURCE describe a specific data set, and Enhanced Access Control for SCLM will always validate against the discrete data set Profile if one has been defined. An illustration is shown in Figure 16-6. Generic Profiles such as SCLM.DEVT.* describe multiple data sets, and match the coding rules for RACF generic data set Profiles. Enhanced Access Control for SCLM will validate against a generic Profile if a discrete data set Profile has not been defined and RACF performed validation against a generic Profile of the same name.
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
393
Figure 16-6 Discrete data set profiles and generic data set profiles
The Profiles also define the access rules validated by EAC. These access rules determine who can have access privileges, and the controlling Applications or program environment required in order for those access privileges to apply. The access rule has three parts: Application User Access Describes the SCLM programs as Applications/Functions Describes the RACF user IDs or Groups, or * for all users Describes the access privilege, such as NONE, READ, UPDATE, CONTROL, and ALTER.
Example 16-1 shows a sample Profile definition and its access rules. This is a discrete data set Profile, as it controls only the one data set called SCLM07.DEV1.COBOL.
Example 16-1 Sample EAC Profile
Profile: SCLM07.DEV1.COBOL Application SCLM SCLM SCLM SCLM Function EDIT EDIT PROMOTE PROMOTE User/Group FRED PGMRS * MNGRS Access READ UPDATE NONE UPDATE
1 2 3 4
This Profile has four access rules: Access rule 1 This shows that the user ID FRED is assigned the READ access privilege when the SCLM07.DEV1.COBOL data set is accessed via the SCLM EDIT Application and Function program list. This is for the RACF Group called PGMRS. They will be assigned the UPDATE privilege if they access the data set by performing an SCLM EDIT.
Access rule 2
394
Access rule 3
This applies when the Application and Function of SCLM PROMOTE is used. In this case, the user value of * applies to all users, and they are assigned a privilege of NONE. This also applies to the Application and Function of SCLM PROMOTE, but this case is specifically for the RACF Group called MNGRS, who will be assigned the access privilege of UPDATE.
Access rule 4
Enhanced Access Control for SCLM matches the data set access request against its definitions for the Profile, Application, and User/Group to determine the appropriate access privilege. Most-to-least specific matching is performed, therefore: Discrete data set Profiles take precedence over generic data set Profiles. RACF user IDs take precedence over RACF Groups, which take precedence over * for all users.
16.2.2 Applications
The principal feature of EAC is its ability to limit data set access via specific Applications. These Applications describe the programs that must be used to obtain access: a control program called the High Program and a service program called the Low Program. For example, ISRSCLM is an SCLM High Program, and FLMP can be used as the Low Program for the SCLM Promote function. By defining both the High and Low Programs, SCLM and its various sub-functions can be secured. Defining the SCLM programs as Applications simplifies access rule writing, as multiple combinations of SCLM programs can be grouped into one or a few applications. The Applications can also be assigned Function names to distinguish various SCLM functions or services. Whereas the Application name is mandatory, the Function name is optional. It provides flexibility in the way Applications are defined. Example 16-2 shows a sample definition for the Application and Function name of SCLM Promote. While these names are arbitrary, they should be assigned values that readily distinguish their use. You could equally have assigned the Application name of Promote and not used a Function name.
Example 16-2 Sample EAC Application/Function for Promote
or
PROMOTE
This Application contains three High and Low Program pairs: Program pair 1 This specifies the High Program of FLMCMD. This is the controlling program when the SCLM Command Interface is executed. The Low Program is FLMP, because this is the program that it controls in the SCLM Promote service. This specifies the High Program of FLMS$SRV. This is the controlling program when the SCLM FLMLNK Subroutine or Call Interface is executed.
Program pair 2
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
395
Program pair 3
This specifies the High Program of ISRSCLM. This is the controlling program when SCLM is executed online via TSO.
For a full explanation of the EAC product, refer to the manual, Enhanced Access Control for SCLM for z/OS Users Guide, SC27-1591.
396
The personnel in the change management group do not have any authority to edit parts in the DEV1 group. However, for promotion to production, they are going to be the ones to create the change control packages to drive that promotion. So the change control team must be able to edit the PACKAGE type at TEST. They do this using an alternate project definition that defines TEST as the lowest level in the hierarchy. This is required by SCLM, as only the lowest level in the hierarchy can be edited. They will also have update capability on the TEST and PROD levels of the hierarchy, but only through the PROMOTE service.
Figure 16-7 Development SCLM project and change control alternate project
397
You can use a mixture of discrete and generic profiles in EAC (Figure 16-8).
TITLE '*** PROJECT DEFINITION FOR SCLM07 ***' SCLM07 FLMABEG * ********************************************************************** * PROJECT CONTROLS ********************************************************************** * * FLMCNTRL ACCT=SCLM07.ACCOUNT.FILE, C VERS=SCLM07.VERSION.FILE, C VERCOUNT=5, C MAXVIO=999999, C VIOUNIT=VIO * *---------------------------------------------------------------------* * ACCOUNT INFORMATIONS * *---------------------------------------------------------------------* TESTALTC FLMALTC ACCT=SCLM07.TEST.ACCOUNT.FILE, X VERS=SCLM07.VERSION.FILE PRODALTC FLMALTC ACCT=SCLM07.PROD.ACCOUNT.FILE, X VERS=SCLM07.VERSION.FILE * * ************************************************************** * * DEFINE THE GROUPS * * ************************************************************** * DEV1 FLMGROUP AC=(P,D),KEY=Y,PROMOTE=TEST DEV2 FLMGROUP AC=(P,D),KEY=Y,PROMOTE=TEST TEST FLMGROUP AC=(P),KEY=Y,PROMOTE=PROD,ALTC=TESTALTC PROD FLMGROUP AC=(P),KEY=Y,ALTC=PRODALTC EMER FLMGROUP AC=(EMER),KEY=Y,PROMOTE=PROD *
Figure 16-8 Project definition showing use of alternate account files
398
We now create matching profiles in EAC for the development level and allow the DEVELOP RACF group to have access to them via all SCLM functions. To do this, we use option 3 within the EAC dialog and then enter the I (Insert) command on the empty list as shown in Figure 16-9. -----------------------------------------------------------------------------Profile Selection Profile not found Command ===> Scroll ===> PAGE Profile Prefix (Use + for all Profiles) + Profile Processing Enter '/' for selection list Profile i ******************************* Bottom of data ********************************
Figure 16-9 Entering your first profile
We define the profile with the same name as the RACF profiles we have created. So the first one we do is the SCLM07.DEV1.** profile. We can also give it a description if we wish. We use the SCLM/ALL Application/Function pair for all SCLM functions. Figure 16-10 shows the profile we have created. -----------------------------------------------------------------------------Profile Maintenance Row 1 from 1 Command ===> Scroll ===> PAGE Profile: SCLM07.DEV1.** Data: EAC profile to protect SCLM07.DEV1.** data sets
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group Access + SCLM ALL DEVELOP UPDATE ******************************* Bottom of data ********************************
Figure 16-10 Adding an EAC profile for SCLM07.DEV1.**
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
399
We save the profile by pressing PF3. Next we create a profile for the account file by entering an I next to the profile we have just created for SCLM07.DEV1.**. The profile is called SCLM07.ACCOUNT.FILE and the rules defined are the same as for SCLM07.DEV1.** as shown in Figure 16-11. -----------------------------------------------------------------------------Profile Maintenance Row 1 from 1 Command ===> Scroll ===> PAGE Profile: SCLM07.ACCOUNT.FILE Data: EAC profile to protect SCLM07 account file
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group Access + SCLM ALL DEVELOP UPDATE ******************************* Bottom of data ********************************
Figure 16-11 Adding an EAC profile for SCLM07.ACCOUNT.FILE
Pressing PF3 saves the profile. Tip: When defining the rules, you can use PF4 to bring up a list of available applications, functions, and access rules. We now need to create some rules for the TEST level in the hierarchy, as the development teams will have authority to promote code up to the TEST group. So again, next to one of the rules we have defined, we enter an I to create new rule for the SCLM07.TEST.** profile. This profile uses the SCLM/PROMOTE application/function, as this is the only function with which the development team is allowed to update the TEST level of the project. Figure 16-12 shows the new profile. This is done similarly for the TEST account file profile. We create a profile in EAC and give the DEVELOP group the same access that we gave to the SCLM07.TEST.** profile. The development team also require read access to PROD to draw down modules, but this is covered by the UACC=READ access on the RACF profile. As well as keeping the EAC rules limited to just the UPDATE rules, it also means that you do not have to define specific applications/functions and rules for any non-SCLM program that might need read access to the data sets. For example, the SuperC function to search through a data set would require a rule defined for it if there were no UACC=READ on the RACF profile. UACC=READ simplifies what you have to specify to EAC.
400
-----------------------------------------------------------------------------Profile Maintenance Row 1 from 1 Command ===> Scroll ===> PAGE Profile: SCLM07.TEST.** Data: EAC profile for the SCLM07.TEST.** data sets and account file
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group Access + SCLM PROMOTE DEVELOP UPDATE ******************************* Bottom of data ********************************
Figure 16-12 EAC profile to allow DEVELOP to update SCLM07.TEST.** on promote
These are all the profiles required for the development team.
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
401
-----------------------------------------------------------------------------Profile Maintenance Row 1 from 2 Command ===> Scroll ===> PAGE Profile: SCLM07.TEST.** Data: EAC profile for the SCLM07.TEST.** data sets and account file
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group SCLM PROMOTE CNGCTRL SCLM PROMOTE DEVELOP ******************************* Bottom of data Access + UPDATE UPDATE ********************************
We now update the profile for the TEST account file to add the rules for the change control team. They need to have update using all SCLM functions, as they will be using the edit, build and promote functions to update the TEST account file. The profile after the rule has been added is shown in Figure 16-14. -----------------------------------------------------------------------------Profile Maintenance Row 1 from 2 Command ===> Scroll ===> PAGE Profile: SCLM07.TEST.ACCOUNT.** Data: Profile for TEST level account file
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group SCLM ALL CNGCTRL SCLM PROMOTE DEVELOP ******************************* Bottom of data Access + UPDATE UPDATE ********************************
Figure 16-14 TEST account file profile with CNGCTRL rule added
402
Next we create a new rule for SCLM07.PROD.**, in the same way as we have done before. The rule definition is shown in Figure 16-15. Similarly, we have to create the SCLM07.PROD.ACCOUNT.** profile with the same UPDATE rule. -----------------------------------------------------------------------------Profile Maintenance Row 1 from 1 Command ===> Scroll ===> PAGE Profile: SCLM07.PROD.** Data: EAC profile for the SCLM07.PROD.** data sets and account file
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group Access + SCLM PROMOTE CNGCTRL UPDATE ******************************* Bottom of data ********************************
Figure 16-15 EAC profile to allow CNGCTRL to update SCLM07.PROD.** on promote
One of the other functions to which the change control team are going to require access, is the capability to create a PACKAGE member and build that member, because that is the vehicle that they will use to drive the promote. They must be able to do this at the TEST level, so in SCLM we have created an alternate project to allow the TEST level to be edited as shown in Figure 16-16. * *---------------------------------------------------------------------* * ACCOUNT INFORMATIONS * *---------------------------------------------------------------------* TESTALTC FLMALTC ACCT=SCLM07.TEST.ACCOUNT.FILE, X VERS=SCLM07.VERSION.FILE PRODALTC FLMALTC ACCT=SCLM07.PROD.ACCOUNT.FILE, X VERS=SCLM07.VERSION.FILE * * ************************************************************** * * DEFINE THE GROUPS * * ************************************************************** * TEST FLMGROUP AC=(P),KEY=Y,PROMOTE=PROD,ALTC=TESTALTC PROD FLMGROUP AC=(P),KEY=Y,ALTC=PRODALTC *
Figure 16-16 CNGCTRL alternate project definition
However, we do not want the change control team to have update authority on all data sets in the TEST level of the hierarchy. So we can create a discrete EAC profile that will just provide rules for the SCLM07.TEST.PACKAGE data set.
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
403
As we are using a discrete profile in EAC, we do not need to create this profile in RACF, which will use the SCLM07.TEST.** profile when the package data set is accessed. As there is no access through RACF, the violation is passed through to EAC, and EAC will match on the discrete profile for SCLM07.TEST.PACKAGE before matching on SCLM07.TEST.**. So we create a profile for SCLM07.TEST.PACKAGE that is allowed to be updated by the change control team, using all SCLM functions. This profile is shown in Figure 16-17. -----------------------------------------------------------------------------Profile Maintenance Row 1 from 1 Command ===> Scroll ===> PAGE Profile: SCLM07.TEST.PACKAGE Data: Discrete profile for SCLM07.TEST.PACKAGE
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group Access + SCLM ALL CNGCTRL UPDATE ******************************* Bottom of data ********************************
Figure 16-17 EAC profile to allow CNGCTRL to create packages in SCLM07.TEST.PACKAGE
These are all the required profiles for the change control team. So in summary, the rules we have added are all shown in Figure 16-18. -----------------------------------------------------------------------------Profile Selection Row 1 from 8 Command ===> Scroll ===> PAGE Profile Prefix (Use + for all Profiles) + Profile Processing Enter '/' for selection list Profile SCLM07.ACCOUNT.FILE SCLM07.DEV1.** SCLM07.PROD.** SCLM07.PROD.ACCOUNT.** SCLM07.TEST.** SCLM07.TEST.ACCOUNT.** SCLM07.TEST.PACKAGE ******************************* Bottom of data ********************************
Figure 16-18 List of EAC Rules added
404
The job to load the rules into memory is provided in the SHSSSAMP library in member HSSRLOAD and contains the following JCL as shown in Example 16-3.
Example 16-3 Sample rule load JCL procedure
//* //RULELOAD // // //* //RULELOAD //STEPLIB //HSSLINK //HSSRULES //SYSPRINT // //* //LOAD
PROC HSSLINK=HSS.V1R1.SHSSLINK, RULEFILE=HSS.V1R1.RULEFILE, SSID=HSS# EXEC PGM=HSSSSINT,PARM='SSID=&SSID' DD DISP=SHR,DSN=&HSSLINK DD DISP=SHR,DSN=&HSSLINK DD DISP=SHR,DSN=&RULEFILE DD SYSOUT=* PEND EXEC RULELOAD
Submit the job and the rules you have just created will be loaded into memory. Tip: To make it easier to update the rules in memory, assign a PF Key in the EAC application to submit the rules load job. On the EAC main menu, type KEYS on the command line, then in one of the unused PF Keys, assign a submit command as shown: Key F1 F2 F3 F4 F5 . . . . . . . . . . . . . . . Definition HELP SPLIT EXIT tso sub 'hss.v1r1.instjcl(HSSRLOAD)' Format SHORT NO SHORT LONG Label Help Split Exit Ruleload
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
405
The violation is also logged in EAC. By going to the EAC main menu and selecting option 5 you can see the list of violations since the last IPL. Figure 16-21 shows these violations. -----------------------------------------------------------------------------Violation Selection Row 1 from 5 Command ===> Scroll ===> PAGE Enter a prefix value to limit the display of each column Date Time User Data Set * * * * Enter '/' to view Violation details Date Time User Data Set _ 2007-01-16 20:53:09 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-16 20:52:12 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-16 20:48:47 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-16 20:42:28 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-14 20:09:06 DEVELOP SCLM07.DEV1.COBOL ******************************* Bottom of data ********************************
Figure 16-21 List of EAC violations
Selecting the last violation in the list, we can see more details on the violation the developer just received, shown in Figure 16-22. The violation detail with a reason code of 08 is telling us that there are no rules matching the application/function that had the high and low program used to access the profile.
406
-----------------------------------------------------------------------------Violation Detail Command ===> Validation Details Profile used . . Application . . . Function . . . . User or Group . . Violation reason High-Low programs
: SCLM07.DEV1.** : : : : Reason code 08: The Profile has no Applications with that matched the execution conditions.
. . . .
: : : :
Tip: Position the cursor underneath the Reason code 08 and press PF1 for help. The EAC extended help listing more information on the violation reason codes. Selecting the program chain details, we can see the actual high and low program used, as shown in Figure 16-23. -----------------------------------------------------------------------------Violation Programs Row 1 to 2 of 2 Command ===> Scroll ===> PAGE
Program Library Notes ISPTASK APF, TASKLIB ISREDIT APF, TASKLIB ******************************* Bottom of data ********************************
Figure 16-23 Violation programs panel
This tells us that there are no rules that allow ISPF edit (ISREDIT) to edit the data set protected by the profile SCLM07.DEV1.**. Tip: If you wish to add an application/function for ISPF edit, you can use the information contained in the Violation Programs panel to define a high/low program pair that can then be used by an EAC profile.
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
407
Again, if we check the EAC violations list we can see that there are two new entries in the list of violations, shown below in Figure 16-25. -----------------------------------------------------------------------------Violation Selection Row 1 from 8 Command ===> Scroll ===> PAGE Enter a prefix value to limit the display of each column Date Time User Data Set * * * * Enter '/' to view Violation details Date Time User Data Set _ 2007-01-16 21:21:51 CNGCTRL SCLM07.ACCOUNT.FILE _ 2007-01-16 21:21:51 CNGCTRL SCLM07.DEV1.COBOL _ 2007-01-16 20:56:00 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-16 20:53:09 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-16 20:52:12 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-16 20:48:47 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-16 20:42:28 DEVELOP SCLM07.DEV1.COBOL _ 2007-01-14 20:09:06 DEVELOP SCLM07.DEV1.COBOL ******************************* Bottom of data ********************************
Figure 16-25 Dual violations for change control team
Selecting either one of the CNGCTRL violations, we can see the Violation Detail panel shown in Figure 16-26, showing a violation reason code of 07, which tells us that the user is not in the list of access rules defined for the SCLM07.DEV1.** EAC profile.
408
-----------------------------------------------------------------------------Violation Detail Command ===> Validation Details Profile used . . : SCLM07.DEV1.** Application . . . : Function . . . . : User or Group . . : Violation reason : Reason code 07: The userid, connected RACF groups or * (all users) were not defined within the Profile. No Application matching was performed, as the user could not be granted access. Violation Details Data set . . . Date . . . . . User . . . . . Access required
. . . .
: : : :
There will be similar violations if, for example: The development team try to promote from TEST to PROD. The development team try to edit in TEST. The change control team try to edit something other that SCLM07.TEST.PACKAGE.
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
409
Volume Disposition Act DDname Data Set Name Actions: B E V M F C I Q C$US01 SHR,KEEP > ISPLLIB SCLM.PROJDEFS.LOAD C$US01 SHR,KEEP > BZZ.SBZZLOAD C$US01 SHR,KEEP > ISPF.ZOSR8.APARLOAD C$US01 SHR,KEEP > ISPFLPA.ZOSR8.MLPALIB C$US01 SHR,KEEP > ISPFLPA.ZOSR8.SISPLPA C$US01 SHR,KEEP > ISPFLNK.ZOSR8.SISPLOAD $$SR78 SHR,KEEP > SYS1.DFQLLIB $$SR78 SHR,KEEP > SYS1.DGTLLIB $$SR78 SHR,KEEP > SYS1.SICELINK $$SR78 SHR,KEEP > SYS1.SCBDHENU $$SR78 SHR,KEEP > EOY.SEOYLOAD $D8109 SHR,KEEP > DB2.V810.SDSNLOAD C$US01 SHR,KEEP > AZZ.V1R1.SAZZLOAD -------------------------- End of Allocation List ----------------------------Figure 16-27 ISPLLIB concatenation
Each and every one of the data sets listed in the ISPLLIB must be APF authorized. This can also be checked through DDLIST (TSO ISRDDN) by typing the APF command. This will list all the APF authorized libraries. Compare the list of datasets in ISPLLIB and STEPLIB with what is in the APF list to ensure that all are present.
410
-----------------------------------------------------------------------------Application Maintenance Row 1 to 4 of 4 Command ===> Scroll ===> PAGE Application BREEZE Function . . Data: Application to allow Breeze access
Enter '/' to select option or overtype pairs High Program Low Program BZZSAPD1 BZZSAPD1 BZZSAPV1 BZZSAPV1 CIGS0001 CIGS0001 CIGS0002 CIGS0002 ******************************* Bottom of data ********************************
Figure 16-28 New Application/Function pair for Breeze access
Enter a prefix value to limit the display of each column Application Function User/Group Access * * * * Enter '/' to select option or overtype rules Application + Function + User/Group Access + BREEZE CNGCTRL UPDATE ******************************* Bottom of data ********************************
Figure 16-29 EAC profile to protect Breeze database
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
411
In our example, Breeze only comes into play in the promotion from TEST to PROD. So the CNGCTRL group is the only group that require access, as they will do the voting as well. Additionally you could separate the Breeze function by have a BREEZE/VOTE application/function pair so that you could just give voting authority to other groups.
As shipped, this member is not an ISPF procedure. As such, EAC is going to have problems authorizing the vote program as EAC requires a valid ISPF environment to be in place in order to validate if a user is authorized to use a particular program to access a resource. In order to be able to successfully run the vote job the shipped version of BZZSMPKG needs to be replaced with a version that runs the vote program, BZZSAPV1, within an ISPF environment, for example from IKJEFT01. Example 16-4 shows some sample JCL to do this.
412
//JC1 JOB (ACCT#),'NAME',CLASS=A,REGION=4096K, // MSGCLASS=H,MSGLEVEL=(1,1), //JC1_USER,PASSWORD //* ----------------------------------------------------------------//STEP010 EXEC PGM=IKJEFT01,REGION=300M,TIME=1439,DYNAMNBR=200 //STEPLIB DD DISP=SHR,DSN=BZZ.SBZZLOAD //ISPPROF DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(10,10,10)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE LIBRARY //* //ISPMLIB DD DSN=BZZ.SBZZMENU,DISP=SHR // DD DSN=ISP.SISPMENU,DISP=SHR //* //ISPSLIB DD DSN=BZZ.V1R1.SBZZSENU,DISP=SHR // DD DSN=ISP.SISPSENU,DISP=SHR //* //ISPPLIB DD DSN=BZZ.V1R1.SBZZPENU,DISP=SHR // DD DSN=ISP.SISPPENU,DISP=SHR //* //ISPTLIB DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(10,10,10)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE ENURARY // DD DSN=ISP.SISPTENU,DISP=SHR //* //ISPTABL DD UNIT=VIO,DISP=(NEW,PASS),SPACE=(CYL,(10,10,10)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN= TEMPORARY TABLE LIBRARY //* //ISPLOG DD SYSOUT=*, // DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB) //* //ISPCTL1 DD DISP=NEW,UNIT=SYSDA,SPACE=(CYL,(1,1)), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB) TEMPORARY FILE //* TAILORING DATASET //SYSUDUMP DD SYSOUT=* //SNAPDUMP DD SYSOUT=* //SYSOUT DD SYSOUT=* //CIGLOG DD DSN=&&CLOG, // DISP=(NEW,PASS),UNIT=SYSALLDA, // DCB=(RECFM=FBA,LRECL=133,BLKSIZE=1330), // SPACE=(CYL,(1,5)) //CIGRPT DD SYSOUT=* //CIGIN DD * //SYSPRINT DD SYSOUT=* //ISPLOG DD DUMMY //FLMMSGS DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * ISPSTART PGM(BZZSAPV1) //*
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
413
You can define a second set of access rules stored in a separate VSAM rule file that provide restricted access, for example. An example where this scenario could be used is during a weekend implementation or promotion of SCLM code to production. By using a restricted set of profiles, you can stop users from having update access while the implementation is running. Once complete you can then switch the rule files and load the original rules back into memory. shows the settings panel with multiple rule files to select from. To select a different rule file just enter an S next to the rule file you wish to activate as shown in Figure 16-32. Note: You must still run the rule load job to load the rules from this file into memory as mentioned in 16.3.3, Loading the new rules into memory on page 405.
414
-----------------------------------------------------------------------------Settings Row 1 from 2 Command ===> Scroll ===> PAGE Options Enter '/' to select option Confirm delete of Profile definition Confirm delete of Application Function definition Confirm autosave of Profile Rules updates Confirm autosave of Application updates / Allow Administrator access Specify Enhanced Access Control for SCLM Load Library SHSSLINK data set . . 'HSS.V1R1.SHSSLINK' Current Rule File . . . . : 'HSS.V1R1.RULEFILE' Specify Rule File Enter '/' to select option _ 'HSS.V1R1.RULEFILE' s 'HSS.RESTRICT.RULEFILE' **End**
Figure 16-32 EAC setting panel with multiple rule files
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
415
If you select the violation you are interested in, you see the violation detail panel as shown in Figure 16-34. -----------------------------------------------------------------------------Violation Detail Command ===> Validation Details Profile used . . Application . . . Function . . . . User or Group . . Violation reason compromised owing
: SCLM07.DEV1.** : : : : Reason code 10: The program environment can be to the presence of an unauthorized asynchronous task.
. . . .
: : : :
Position your cursor underneath any of the fields on the panel and press PF1 for help and you will receive the help panel related to, not just the Violation detail panel, but the specific field you have requested information on. This is particularly useful for finding additional information on the violation reason code. Positioning the cursor under the violation information and pressing PF1 brings up the Violation Reason field help panel as shown in Figure 16-35.
416
-----------------------------------------------------------------------------Violation Detail Command ===> Validation Details Profile used . . : SCLM07.DEV1.** Application . . . : Function . . . . : User or Group . . : Violation reason : Reason code 10: The program environment can be .-----------------------------------------------------------------------------. | Validation Reason: Field Help | | | | More: + | | VIOLATION REASON is a display field that describes the reason why Enhanced | | Access Control for SCLM has failed the data set access control request. | | | | Tab to one of the following topics and press HELP to obtain more | | information: | | | | > RC=01 Opening program not APF or attached as a subtask | | > RC=02 Opening program not APF or assigned a subtask task library | | > RC=03 Opening program not APF and task libraries have defaulted | | > RC=04 Opening program not APF - an APF program must be used | | > RC=05 Low Program not APF | | > RC=06 A non-APF program found in the High to Low Program chain | | > RC=07 User-id, RACF Group or * not found in Profile | | > RC=08 Profile has no Applications matching the execution conditions | | > RC=09 User's assigned privilege was less than that required | | > RC=10 Environment compromised by unauthorized asynchronous task | | > RC=11 Invalid TSO/ISPF environment found during APF program checks | | > RC=12 Invalid TSO/ISPF environment for an APF program execution | | > RC=13 ISPF subroutines module is invalid | '-----------------------------------------------------------------------------'
Figure 16-35 Violation reason field help panel
Chapter 16. Enhanced Access Control: Bridging the gap - SCLM to RACF
417
Then, by again positioning the cursor on the particular violation you are interested in and then pressing PF1 again, you can see the detailed help text for that particular violation. Figure 16-36 shows the additional information for a violation reason code 10 after PF1 has been pressed. -----------------------------------------------------------------------------Violation Detail Command ===> Validation Details Profile used . . : SCLM07.DEV1.** Application . . . : Function . . . . : User or Group . . : Violation reason : Reason code 10: The program environment can be .-----------------------------------------------------------------------------. | Violation Reason Code 10 | | | | More: + | | RC=10 Environment compromised by unauthorized asynchronous task | | | | The Validation Routine checks and withholds access if the SCLM program | | environment appears compromised. During this checking, an unauthorized | | asynchronous task was found in the program environment. Therefore the | | data set access request was denied. This type of problem cannot be | | resolved by changes to the Profile access rules; nor is it caused by the | | installation of the Enhanced Access Control for SCLM software. The | | problem is specific to the program execution conditions at the time of the | | data set access request. | | | | This problem may occur in an online TSO/ISPF environment, where other | | tasks (possibly in split sessions) are present. One of these tasks has | | the capability of interrupting or compromising the SCLM environment. | | Closing the split session or logging off then onto TSO may resolve the | | problem. The problem may be intermittent, depending upon the mix of tasks | | in the TSO/ISPF environment. If the problem persists, contact your IBM | | representative for help. | | | '-----------------------------------------------------------------------------'
Figure 16-36 Help for Violation reason code 10
418
Part 5
Part
419
420
17
Chapter 17.
Merge Tool
Merge Tool is a product that is sold as part of the SCLM Advanced Edition. A Merge utility belongs in the suite of Software Change Management, but as an add-on tool, Merge Tool is not fully integrated with SCLM. In this section we look at how Merge Tool processing can be performed in tandem with SCLM using the product as it ships. However we also look at a sample utility that utilizes standard ISPF techniques to fully integrate the Merge Tool into SCLM at a member by member level.
421
422
IBM Merge Tool for Z/OS and z/OS Row 1 to 9 of 9 C .--------------------- Merge Tool Set Libraries ---------------------. PAGE | COMMAND ===> | ion. M | | ences - | INPUT LIBRARIES (FILE1, FILE2 AND BASE1 REQUIRED) | ----_ | FILE1......... 'SCLM07.DEV1.COBOL' | atch) | FILE2......... 'SCLM07.EMER.COBOL' | " | Base1......... 'SCLM07.PROD.COBOL' | _ | Base2........ 'SCLM07.TEST.COBOL' | _ | Base3....... | _ | Base4...... | _ | | _ | Output Libraries (Required) | _ | Work.......... 'SCLM07.DEV1.COBOL.WORK' | _ | Merge......... 'SCLM07.DEV1.COBOL.MERGE' | _ | | _ | Output Report Files (Optional) | * | Member Stats.. 'SCLM07.DEV1.STATS' | ***** | Disp: mod | | Summary Stats. 'SCLM07.DEV1.SUMMARY' | | Disp: mod | | Log........... 'SCLM07.DEV1.LOG' | | Disp: mod | | | '--------------------------------------------------------------------'
Figure 17-1 Merge Tool Set Libraries option
Merge Tool also needs to know the format of the files to enable it to correctly be able to do the compares. This is done through the Source Type option. There are number of default types to chose from such as COBOL, PL/I and ASM. Or if you are comparing a type not covered by the defaults then you can use column specifications to define the area of comparison. This is shown in Figure 17-2.
423
IBM Merge Tool for Z/OS and z/OS Row 1 to 9 of 9 C .-------------------- Specify Source Type --------------------. ll ===> PAGE | | ect option. M | Command ===> | Preferences - | | -----------_ | Specify Type: COBOL (COBOL, ASM, JCL, DATA, PL1) | nd 2. Batch) | | " | COLUMNS FOR COBOL ARE 7:72 | _ | | _ | or | _ | | _ | Specify compare column start and end | _ | | _ | | _ | | _ | | _ '-------------------------------------------------------------' ******************************* Bottom of data ********************************
Figure 17-2 Merge Tool Source Type option
Next we populate the list of members that we want to work with. By entering * in the Member field, all members that are in File 1 will be listed with information as to whether File 2 and Base members exist for them. This is shown in Figure 17-3.
IBM Merge Tool for Z/OS and z/OS Row 1 to 3 of 3 Command ===> _______________________________________________ Scroll ===> PAGE Enter "/" to select option. Member: ________ _ Append to list _ Set Libraries _ Source Type _ Preferences --------------------------------------------------------- -------------------__ Group Action _ View Reports 1 Exec Mode ( 1. Foreground 2. Batch) File1 File2 Base Have Have Source "/" Member Action Member Member Work Merge Type __ RDBKC01 YES -----COBOL__ __ RDBKC02 YES -----COBOL__ __ STARTAPP YES YES COBOL__ ******************************* Bottom of data *******************************
Figure 17-3 Merge Tool member display
We now want to generate work and merge files. The work file is Merge Tools own source file that contains the source compares from all three libraries along with some mark-up tags to tell you the results of the compare. It is good practice to generate the work file first to confirm that the merge is going to do what you expect it to do. The generate work (GW) and generate merge (GM) commands can be performed on individual members or by doing a group action for all members. Next to the STARTAPP program we perform a GW command to generate the work file. Once the Merge Tool has finished, the main panel is updated to show that we now have a work file. Next enter the EW command next to the STARTAPP program to edit the work file as shown in Figure 17-4. Alternatively you can view the work file with the BW command.
424
IBM Merge Tool for Z/OS and z/OS Row 1 to 3 of 3 Command ===> _______________________________________________ Scroll ===> PAGE Enter "/" to select option. Member: ________ _ Append to list _ Set Libraries _ Source Type _ Preferences --------------------------------------------------------- -------------------__ Group Action _ View Reports 1 Exec Mode ( 1. Foreground 2. Batch) File1 File2 Base Have Have Source "/" Member Action Member Member Work Merge Type __ RDBKC01 ----------COBOL__ __ RDBKC02 ----------COBOL__ EW STARTAPP YES YES YES COBOL__ ******************************* Bottom of data *******************************
Figure 17-4 Editing the generated work file
You are put into ISPF edit on the workfile where you can see the results of the merge. The results from this action are shown in Figure 17-5 on page 426. The work file contains information on which files were used to generate the work file. in columns 1 through 7 there are tags that define what has occurred during the merge. In the example below we see the lines that have been added or removed by file 2, the SCLM07.EMER.COBOL, denoted by the +2 and -2 tags. Similarly the lines that have been modified in file 1, SCLM07.DEV1.COBOL are marked with the +1 and -1 tags. For example there is a change to line 003400 where Move "Q" to Input-name has been changed to Move "Q" to Input-name . Merge Tool shows this as removing a line and adding a line. Once you are happy with the changes in the work file, you press PF3 to save the member and then issue the GM (Generate Merge) command to create the merge file based on the contents of the work file. Based on our settings above, the Merge file is stored outside of SCLM control in SCLM07.DEV1.COBOL.MERGE.
425
------------------------------------------------------------------------------EDIT SCLM07.DEV1.COBOL.WORK(STARTAPP) - 01.00 Columns 00001 00072 Command ===> Scroll ===> PAGE ****** ***************************** Top of Data ****************************** 000001 .---- **** IBM MERGE TOOL FOR z/OS AND z/OS WORKFILE **** 000002 .---- BASELINE: SCLM07.PROD.COBOL(STARTAPP) 000003 .---- FILE 1 : SCLM07.DEV1.COBOL(STARTAPP) 000004 .---- FILE 2 : SCLM07.EMER.COBOL(STARTAPP) 000005 .---- ....+....1....+....2....+....3....+....4....+....5....+....6....+. 000006 000100* --------------------------------------------------000007 000200* IDE Sample Program 000008 000300* --------------------------------------------------000009 000400 Identification Division. 000010 000500 Program-ID. StartApp. 000011 000600 000012 000700 Data Division. 000013 000800 Working-Storage Section. 000014 000900 000015 001000 COPY STARTCPY. 000016 002000 000017 002100 Procedure Division. 000018 002200 000019 002300 Initialize Program-pass-fields 000020 002400 Program-other-fields 000021 002500 Program-flags. 000022 002600 000023 . +2 002700* Move "ITSO Redbooks team" to Input-name 000024 . -2 002700 Move "ITSO Redbooks team" to Input-name 000025 002800 Perform until Loop-done 000026 . +2 002900 Display " " 000027 . +2 003000 Display "Enter a name or Q to quit:" 000028 . +2 003100 Move Spaces to Input-name 000029 . +2 003200 Accept Input-name 000030 . -2 002900* Display " " 000031 . -2 003000* Display "Enter a name or Q to quit:" 000032 . -2 003100* Move Spaces to Input-name 000033 . -2 003200* Accept Input-name 000034 003300 IF Input-name = Spaces 000035 . +1 003400 Move "E" to Input-name 000036 . -1 003400 Move "Q" to Input-name 000037 003500 End-IF 000038 003600
Figure 17-5 Example of Merge Tool workfile
426
Merge Tool does not have a documented API, however the merge process can be executed in a batch mode by allocating the required files and passing the list of members to the process in a SYSIN type file. This method of calling the Merge Tool can be invoked in a foreground mode by using REXX to allocate the files, build the SYSIN file, and then call the merge process.
Immediately a pop-up panel will appear requesting some information that Merge Tool requires. The supplied sample will determine much of this information based on the information about the member. The following fields are required, as shown in Figure 17-7.
Base file
This is the base file for the comparison. The sample looks up the hierarchy from the development member you are working on and places the first found member into this field. You can change this value if you want a different file to be used as the base file.
File 1
This is defaulted to the current development file; that is, the file you are currently editing.
File 2
Initially this field is blank, as SCLM does not know which other file you wish to use in the compare. Once entered, the value is stored in your ISPF profile and is reused whenever you use this option. In the example below this has been set to SCLM07.EMER.COBOL, which is the emergency level of our hierarchy. This would be a common scenario.
427
Source type
This is the Merge Tool specified option that allows Merge Tool to correctly run the compare. The sample exec determines the SCLM language of the member, then based on that sets the source type.
Pressing Enter will invoke the Merge Tool. With the setting we have specified above, the work file will be generated and the sample exec will place us in edit on the generated work file, which is stored in a temporary data set, as shown in Figure 17-8.
428
File Edit Edit_Settings Menu Utilities Compilers Test Help sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss EDIT DOHERTL.CIGWORK(STARTAPP) - 01.00 Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ****************************** 000001 .---- **** IBM MERGE TOOL FOR z/OS AND z/OS WORKFILE **** 000002 .---- BASELINE: SCLM07.PROD.COBOL(STARTAPP) 000003 .---- FILE 1 : SCLM07.DEV1.COBOL(STARTAPP) 000004 .---- FILE 2 : SCLM07.EMER.COBOL(STARTAPP) 000005 .---- ....+....1....+....2....+....3....+....4....+....5....+....6....+. 000006 000100* --------------------------------------------------000007 000200* IDE Sample Program 000008 000300* --------------------------------------------------000009 000400 Identification Division. 000010 000500 Program-ID. StartApp.
Figure 17-8 Temporary data set containing the work file
You can make any required changes. Then press PF3 to end and exit out of the temporary member. At this point the process will display a pop-up confirmation panel if you have chosen to perform the merge and store the file back in SCLM, as shown in Figure 17-9. ------------------------------------------------------------------------------EDIT SCLM07.DEV1.COBOL(STARTAPP) - 01.03 Columns 00001 00072 Command ===> merge Scroll ===> CSR ****** ***************************** Top of Data ****************************** 000100 000100 .------------- SCLM Merge Confirmation -------------. 000200 000200 | | 000300 000300 | Do you want to generate the merge file and | 000400 000400 | replace the SCLM member (Y/N) ===> N | 000500 000500 | | 000600 000600 | | 000700 000700 '---------------------------------------------------' 000800 000800 Working-Storage Section. 000900 000900 001000 001000 COPY STARTCPY. 002000 002000 002100 002100 Procedure Division.
Figure 17-9 Pop-up panel to confirm the replacement of the SCLM member
Selecting Y to replace the member in SCLM will do just that. The current contents are deleted and the merge file you have just generated is placed in the member you are working on. At this time you still have the option to cancel out of the edit session and not replace the member if the merge file looks incorrect. The advantage of using this sample method over the standard Merge Tool is that all the actions are done within the member in SCLM, so therefore under the control of SCLM. Also, the file settings and options settings are mostly derived for you. Obviously this is an interactive member by member option, so the multiple member processing and batch facility in Merge Tool do not come into play.
429
430
18
Chapter 18.
431
432
Daemons
A daemon is like an z/OS started task it is a long-running task that runs in the background and is not associated with any particular user. It starts work (or performs the work itself) on behalf of a user request, such as an rlogin request on an IP port, or a user shell script run at a scheduled time each day. Daemons usually run authorized and can issue authorized functions, such as changing the identity of the user associated with a process. You can think of the VTAM started task as a daemon.
433
the bottom. This file system is similar to the file structures in the Windows platform. It is a collection of files and directories. z/OS programs and data are delivered to you in z/OS data sets and in this new file structure. After the installation is complete, more directories and files will be created for use by application developers. z/OS has implemented the file systems in the following way. It uses z/OS data sets of a type called HFS, a type created for z/OS UNIX. System programmers create and maintain the HFS data sets. These data sets can only be used through z/OS UNIX. This use is no different from how a z/OS program would use a VSAM data set. The way to make an HFS data set accessible is by mounting it. After you finish with a data set, you can unmount it. The z/OS UNIX mount is not the same as the traditional volume mount; internally, z/OS allocates and opens a data set. For the unmount, z/OS closes the data set and deallocates it.
By matching the user's UID and GID against this security information, RACF determines who should be allowed to read, write, and execute the file. In this case the permission bit 755 means that the owner can read the file, write to the file, and execute the file; members of the owning group can read and execute the file, as can all users. The owner can write to the file; no one else can. 434
A Practical Guide to Setting Up and Using SCLM
Superuser authority
Just like all UNIX systems, the installation defines certain system administrators as superusers, having UID(0), who can change the contents of any file, manage processes, and perform other administrative activities. This can be restricted based on RACF profiles. When not doing activities that require superuser authority, system administrators can change to user authority, which permits access to his or her own files and other files, according to the permission bits. Do not confuse superuser authority with z/OS supervisor state. Being a superuser does not increase the ability to do things in z/OS. Remember the point about no wall between z/OS and UNIX? Well, where security is concerned, the wall is actually there.
18.1.5 Guidelines for installing products into the z/OS UNIX file system
There are a number of packaging guidelines that IBM products follow as they install code into the z/OS UNIX file system. There are certain guidelines for where parts of a product are installed to protect the delivered code but also to ensure any local tailoring is not compromised by upgrades to the product. During the installation of SCLM Developer Toolkit and SCLM Administrator Toolkit you will see certain directories being used for certain things. So let us look at some of the directory locations in the z/OS UNIX file system to understand what they are used for.
435
/usr/lpp
This directory is where product code is normally installed. It is also possible that if you have a service or maintenance procedure, then you may precede the /usr/lpp directory with a prefix director such as /apc/SCLMDT/usr/lpp/SCLMDT/. For example, when you set up your SMP/E job, it will assume that you are installing into /usr/lpp and will create the products own directory structure after that, /SCLMDT/bin/. But during SMP/E setup you can tell SMP/E that you are using a path prefix. Normally you will give a product its own HFS data set to contain the product code and you will mount this file at a certain directory location. Let us assume we have a path prefix of /apc/SCLMDT/usr/lpp rather than just /usr/lpp. When doing the install we make the root directory Read/Write (RDWR) and create the SCLMDT/usr/lpp directory. We then mount a HFS file at this directory location and again make it Read/Write, for the duration of the install. In our SMP/E job we tell SMP/E our path prefix is /apc/SCLMDT/usr/lpp. The SMP/E jobs will then create the required directories under here, so /usr/lpp/SCLMDT/bin. The full path will be /apc/SCLMDT/usr/lpp/SCLMDT/bin. The SMP/E APPLY job will then copy the product files to this directory location. Once the install is complete you unmount and mount the directory as Read-only (READ). This is part of the IBM scheme to keep local customer data separate from shipped code. On z/OS, /usr/lpp/ is supposed to contain only code shipped by IBM (or whoever). This way, after install is complete, many systems within a sysplex can share the same physical copy of /usr/lpp. Each system in a sysplex will have its own copy of its system-specific code (like /etc and /var, and others). This is different than on some other platforms, which allow local customer data to also live within /usr/lpp. If you are porting a product from a platform which expects to write a local data into /usr/lpp, then consider using a symlink to point from /usr/lpp/productname/config.file to /etc/productname/config.file. This can usually be done without any change to the ported code. To see what HFS files are mounted at what directory locations, issue the following operator command: D OMVS,F In the system log, you will see a list of files returned with their mount points and whether they are read or write as shown in Figure 18-2.
436
TYPENAME DEVICE ----------STATUS----------- MODE HFS 18 ACTIVE RDWR NAME=AUZ.V310.OMVS.HFS PATH=/apc/sclmat/V310 HFS 16 ACTIVE READ NAME=WD4Z.V700.OMVS.HFS PATH=/apc/wd4z700/usr/lpp/wd4z HFS 15 ACTIVE READ NAME=IXM.V190.OMVS.HFS PATH=/apc/txml190 HFS 13 ACTIVE READ NAME=WEBSPHER.V601.SBBOHFS PATH=/apc/WebSphere.V601/usr/lpp/zWebSphere/V6R0 HFS 12 ACTIVE READ NAME=JAVAOMVS.V142.UK07860.HFS PATH=/apc/java142-UK07860/usr/lpp/java
MOUNTED LATCHES 12/08/2006 L=28 15.39.13 Q=0 12/08/2006 15.39.13 12/08/2006 15.39.13 12/08/2006 15.39.13 12/08/2006 15.39.13 L=27 Q=0 L=26 Q=0 L=24 Q=0 L=23 Q=0
/etc
/etc contains local data that must be preserved from one release to the next. This is configuration data, setup info, the your local data. To avoid re-configuring everything when IBM or other customers ship new code, this data must be kept separate from the code that ships. So it is separate from the shipped code in /usr/lpp or pathprefix/usr/lpp. For example, SCLM Developer Toolkit after SMP/E installation provides a job to set up the /etc directory. A directory called /SCLMDT/CONFIG is created under /etc and contains such things as the http configuration files. Generally these file will not change once set up is complete, and must be preserved between IPLs.
/var
/var contains data that is created during the normal running of a product, that must be preserved from one IPL to the next. One example of this type data is lists of files queued to a printer. Ideally, the product will create and populate its /var directories on the fly. This makes packaging, installing, and documenting the product easier for everyone. Actions may still be needed to migrate /var from one release to another, or between systems in a sysplex. Again using SCLM Developer Toolkit as an example, after SMP/E installation a job is run to set up the /SCLMDT/WORKAREA and /SCLMDT/LOGS directories under the /var directory. The data in these directories is temporary and is only valid for the action that is taking place. So for SCLMDT this data could actually be lost between IPLs, but that may not always be the same for all products.
437
Java is a programming language, however, it is unique in that code written in Java will work on any platform that has a Java Virtual Machine. When you compile a Java program, it does not compile into native code, but instead into Java bytecode, that is interpreted at runtime by the JVM (Java Virtual Machine). You can think of the JVM as a platform on its own, bytecode as its native instruction set. Java has a compiler like any other high level language, called javac. It is invoked, passing it a number of parameters to assist the compile. Java source goes in, class files come out. Class files are like the OBJ or load modules to COBOL source. J2EE is a specification and rich set of Java APIs for developing modern Enterprise class applications. The purpose of J2EE is to factor out the common problems of developing things like Web based services, such as load balancing, persistence, etc. J2EE allows programmers to focus on the business logic, data model, and user interface, and forget about the complexities of managing the interactions of the three and worrying about the server and its performance. While J2EE is a kind of standard, multiple vendors provide different implementations of application servers that support J2EE applications, such as WebSphere Application Server (WAS), TomKat, JBoss. Let us look at some of the other terms that are associated with Java/J2EE development: J2EE JAR WAR Stands for Java 2 Platform, Enterprise Edition and it defines the standard for developing component-based multi-tier enterprise applications. Java Archive. A file format for storing information for or about Java programs. Web Archive. Much the same as a jar, except it relates to Web type applications.
EJB Stands for Enterprise Java Beans. Java Beans are reusable objects, like subroutines. EJBs take this a step further and are designed to be platform independent. But these are basically a type of JAR file. EAR Enterprise Archive. This is just a deployment container. It will contain jars, wars and additional files that are going to be deployed to a server.
To explain these in more depth, an important aspect of project development, particularly in J2EE projects, is that a number of different forms of application executables can be created. Java project executables are often packaged as JAR, WAR, or EAR files. JAR files typically relate to standard Java applications or Enterprise Java Beans (EJB). WAR files are created for Web resources. Typically these are composed of Java servlets, JSPs, and HTML files. WAR applications are often the front end of Web-based applications. These applications may reference other JARs such as EJBs for specific services. Each WAR file contains a web.xml file. This describes the composition of the WAR application in terms of Java, HTML, and the library services that it uses. EAR files represent enterprise applications. These applications are composed of JAR and WAR files. In J2EE language, the creation of the EAR file is the assembly of its constituent JAR, and WAR files. This method of assembly allows EAR applications to be created which are in effect made up of specific components (JAR/WAR). The actual composition of the application is described in the application.xml file. The EAR file itself is not a standalone executable object. The EAR file must be installed in a J2EE compatible application server such as WebSphere Application Server (WAS). The installation of the EAR file is referred to as deployment. A deployed EAR application can be accessed via the WAS environment. Deployment is a separate process from that of the build. Deployment involves the physical installation of the EAR application. When developing J2EE applications it is therefore possible that it will involve the development of a number of separate components such as WAR and JAR files. These files are then assembled together into an EAR file. The EAR file is then ready for deployment into a J2EE container (for example, WAS) for operation. 438
A Practical Guide to Setting Up and Using SCLM
18.3 What are Eclipse, Rational Application Developer, and WebSphere Developer for System z?
SCLM Developer Toolkit and SCLM Administrator Toolkit run as plug-ins in the Eclipse framework. Eclipse is an Interactive Development Environment that provides tools to enable you to develop Java applications and more. It is also Open Source. IBM has its own version of Eclipse which IBM products use to ship with their products. For example, you can install SCLM Developer Toolkit as a stand-alone product and it will plug-in to the Eclipse that ships with it. Rational Application Developer (RAD) is an IBM product that extends Eclipse with visual construction development to help Java developers rapidly design, develop, assemble, test, profile and deploy high quality Java/J2EE, Portal, Web, Web services, and SOA applications. WebSphere Developer for System z (WD/z) is a product that further extends the functionality of Eclipse and RAD to add many features such as: Traditional development in an IDE of COBOL and PL/I High-level Enterprise Generation Language, The z/IDE, a portal to z/OS to allow you to work with your z/OS data sets and members Remote debugging capabilities for z/OS applications so that they can utilize the power of the IDE debugger Much more that would be out of the scope of this book. What this section will do, is give you an introduction to the IDE, be it Eclipse, RAD or WD/z and some of the terminology used when working in the Eclipse IDE. More information can be found in the on-line help in any of these products.
439
Important: Although workspace metadata stores configuration information, this does not mean that the metadata can be transferred between workspaces. In general, we do not recommend copying or using the metadata in one workspace, with another one. The recommended approach is to create a new workspace and then configure it appropriately. Additionally, if you are seeing some strange results, for example, if you have opened up an old workspace with a newer Eclipse, it may be a good idea to switch to a brand new workspace. Eclipse allows you to open more than one Workbench at a time. It opens another window into the same Workbench, allowing you to work in two differing perspectives. Changes that are made in one window will be reflected back to the other windows, and you are not permitted to work in more that one window at a time. That is, you cannot switch between windows while in the process of using a wizard in one window. Opening a new Workbench in another window is done by selecting Window New Window, and a new Workbench with the same perspective will open in a new window. You can also start multiple Eclipse IDEs thus allowing you to work in different workspaces. When you are asked the name of your workspace just select a different one. For example, you may use different workspaces for different versions of your applications. The default workspace can be started on first startup of the Eclipse IDE by specifying the workspace location on the local machine and selecting the check box Use this as the default and do not ask again, as shown in Figure 18-3.
This will ensure on the next startup of The Eclipse IDE that the workspace will automatically use the directory specified initially, and it will not prompt for the workspace in the future. If you do set the check box on this startup panel to not ask again, there is a procedure to re-initiate this, described as follows: 1. Select Window Preferences General Startup and Shutdown. 2. .Check the Prompt for workspace on startup check box as shown in Figure 18-4, click Apply, and then click OK.
440
Figure 18-4 Setting the prompt dialog box for workspace selection on startup
On the next startup of Eclipse the workspace prompt dialog will appear asking the user which workspace to load up. The other way to enforce the use of a particular workspace is by using the -data <workspace> command-line argument on Eclipse startup, where <workspace> is a path name on the local machine where the workspace is located and should be a full path name to remove any ambiguity of location of the workspace. Tip: On a machine where there are multiple workspaces used by the developer, a shortcut would be the recommended approach in setting up the starting workspace location. The target would be <Eclipse Install Dir>\eclipse.exe -data <workspace>. By using the -data argument you can start a second instance of Eclipse that uses a different workspace. For example, if your second instance should use the NewWorkspace workspace folder, you can launch Eclipse with this command (assuming that the product has been installed in the default installation directory): "C:\Program Files\IBM\SDP70\eclipse.exe" -data C:\temp\tempspace
441
In Eclipse, the IDE is called the Workbench. Eclipses Workbench provides customizable perspectives that support role-based development. It provides a common way for all members of a project team to create, manage, and navigate resources easily. It consists of a number of interrelated views and editors. Views provide different ways of looking at the resource you are working on, whereas editors allow you to create and modify the resource. Perspectives are a combination of views and editors that show various aspects of the project resource, and are organized by developer role or task. For example, a Java developer would work most often in the Java perspective, a Web designer would work in the Web perspective and a z/OS developer would work in the z/OS projects view if they were using WD/z. Several perspectives are provided in the different versions of Eclipse, and team members also can customize them, according to their current role of preference. You can open more than one perspective at a time, and switch perspectives while you are working with Eclipse. If you find that a particular perspective does not contain the views or editors you require, you can add them to the perspective and position them to suit your preference. Before describing the perspectives, we take a look at Eclipses help feature.
442
In the help window you see the available books in the left pane and the content in the right pane. When you select a book in the left pane, the appropriate table of contents opens up and you can select a topic within the book. When a page is selected, the page content is displayed in the right pane. You can navigate through the help documents by using the Go Back and Go Forward buttons in the toolbar for the right pane. There are other buttons in this toolbar: Show in Table of Contents: Synchronizes the navigation frame with the current topic, which is helpful if you have followed several links to related topics in several files, and want to see where the current topic fits into the navigation path. Bookmark Document: Adds a bookmark to the Bookmarks view in the left pane. Print Page. Prints a page. Maximize: Maximizes the left pane to fill the whole help window. Figure 18-6 shows the help window with the table of contents for the book, Using the SCLM developer toolkit.
The Search field allows you to do a search over all books by default. The Search Scope link opens a dialog box where you can select a scope for your search. If you have previously defined a search list, this list of books and topics can be selected from the dialog, allowing you to choose from particular selections of books that you have found useful in the past. This is shown in Figure 18-7.
443
To create a search list, click the New... button and enter a name for the list, or click Edit... if you wish to modify an existing search list. In either case, a dialog similar to the one shown in Figure 18-8 allows you to make your selection of books and topics.
444
Note: The first time you search the online help, the help system initiates an index-generation process. This process builds the indexes for the search engine to use, which will probably take several minutes. Unlike WebSphere Studio Application Developer, the index is not rebuilt when the product is opened with a different workspace. It is also possible to prebuild the index: See the help entry under Navigating and customizing the workbench Extending the workbench (advanced) Extending the platform Reference Other reference information Pre-built documentation index. Enter your search expression in the Search field and click Go to start your search.
Perspectives
Perspectives provide a convenient grouping of views and editors that match the way you use Rational Application Developer. Depending on the role you are in and the task you have to do, you open a different perspective. A perspective defines an initial set and layout of views and editors for performing a particular set of development activities (for example, EJB development or profiling). You can change the layout and the preferences and save a perspective that you can have customized, so that you can open it again later. We will see how to do this later in this chapter.
Views
Views provide different presentations of resources or ways of navigating through the information in your workspace. For example, the Navigator view displays projects and other resources that you are working as a folder hierarchy, like a file system view. Rational Application Developer provides synchronization between different views and editors. Some views display information obtained from other software products, such as database systems or software configuration management (SCM) systems. A view might appear by itself, or stacked with other views in a tabbed notebook arrangement. A perspective determines the initial set of views that you are likely to need. For example, the Java perspective includes the Package Explorer and the Hierarchy views to help you work with Java packages and hierarchies.
Editors
When you open a file, Rational Application Developer automatically opens the editor that is associated with that file type. For example, the Page Designer editor is opened for .html, .htm, and .jsp files, while the Java editor is opened for .java and .jpage files. Editors that have been associated with specific file types will open in the editor area of the Workbench. By default, editors are stacked in a notebook arrangement inside the editor area. If there is no associated editor for a resource, Rational Application Developer will open the file in the default editor, which is a text editor.
Perspective layout
Many of Eclipses perspectives use a similar layout. Figure 18-9 shows the layout of the SCLM Developer Toolkit perspective. Other perspectives have many of the same views such as the Editor, Navigator and Properties views. There are also views that are specific to a single perspective, such as the SCLM Explorer view.
445
Properties
On the left side are views for navigating through the workspace and checking the properties of members or files. In the middle or top right of the Workbench is larger pane, usually the source editor or the design pane, which allows you to change the code and design of files in your project. Different perspectives may have the properties in a different place or may have additional views such as a tasklist. You can also change the size of each of the panes to suite the way you use the IDE. The content of the views is synchronized. For example, if you change a value in the Properties view, the update will automatically be reflected in the Editor view.
Switching perspectives
There are two ways to open another perspective: Click the Open a perspective icon ( ) in the top right corner of the Workbench working area and select the appropriate perspective from the list. Select Window Open Perspective. In either case, there is also an Other... option, which displays the Select Perspective dialog, as shown in Figure 18-10. Select the required perspective and click OK.
446
A button appears in the top left corner of the Workbench (an area known as the shortcut bar) for each open perspective, as shown in Figure 18-11. To switch to a particular perspective, click the appropriate button.
Tips: The name of the perspective is shown in the window title area along with the name of the file open in the editor, which is currently at the front. To close a perspective, right-click the perspective's button on the shortcut bar (top right) and select Close. To display only the icons for the perspectives, right-click somewhere in the shortcut bar and deselect Show Text. Each perspective requires memory, so it is a good practice to close perspectives when not being used to improve performance.
447
Context menus
Context menus are pop up menus that contain a list of options that are relevant in the context of the item, or node, being processed. They are activated by clicking the right mouse button on the item, and the menu ill then pop up. Figure 18-12 shows the context menu for opening a project in the Developer Toolkit SCLM view. It was activated by right clicking on the SCLM node.
More information
For more detailed information on the perspectives you are likely to work in, see the online help for the Eclipse plug-in that you are using. Additional information on many of the standard plug-ins can be found in the Redbooks publication, Rational Application Developer V6 Programming Guide, SG24-6449.
448
19
Chapter 19.
449
19.1 Overview
SCLM Developer Toolkit is split into two parts: Using SCLM for traditional mainframe development through an Eclipse IDE Using SCLM on z/OS to store and manage your Java/J2EE and other open systems development applications The advantage of using SCLM Developer Toolkit for both mainframe and distributed development is that all of your code, for your full enterprise application, is stored and managed in one place, on z/OS. The security, stability, and backup/recoverability of the z/OS system is one of the reasons that many customers are looking for this in an SCM solution. Additionally, many newer developers are not as familiar with the z/OS interface for software development. However, the z/OS platform is as strong as ever. To better utilize the skills of these developers as they begin to work in the marketplace, we can provide them with tools that they have been used to using during their training. To this end, providing them with an IDE to allow them to do their work will shorten the time they need to become productive. They no longer have to learn all aspects of the z/OS platform in one go. Coupled with SCLM Developer Toolkit other z/OS functions are provided through the z/IDE available with WebSphere Developer for System z (WD/z). So editing non-SCLM data sets and members is also possible as well as submitting jobs, checking on the status of completed batch jobs among other tasks such as utilizing editors with context sensitive help. Using WD/z users can also develop their COBOL or PL/I programs in isolation on their workstation, using the available debugger, before moving their code into a secure SCLM environment on the mainframe. At which point normal SCLM Edit, Build, and Promote development can be used, in addition to utilizing the remote debugging facilities provided by Debug Tool and WD/z. A more detailed discussion on debugging with SCLM, including using the remote debugger, was covered in Chapter 14, Debugging and fault analysis with SCLM on page 301.
19.2 Setting up SCLM Developer Toolkit and your SCLM projects (Administrator task)
Depending on the type of Eclipse you have installed, SCLM Developer Toolkit into will vary the connection method used. If you are running WD/z, then the connection protocol is Remote Systems Explorer (RSE) as provided with WD/z. Any other Eclipse environment that you install into will activate the HTTP server connection. Once SCLM Developer Toolkit is installed and the required transport mechanism has been configured, your users will be able to start working with their SCLM projects right away. Developer Toolkit uses standard SCLM services to list and work with members so there are no administrator specific tasks that need to be performed. However, there are some project specific tasks that can be performed to tailor the behavior of SCLM Developer Toolkit.
19.2.1 ISPF.conf
In order for SCLM Developer Toolkit to perform the SCLM services, it must first set up an ISPF environment. The ISPF.conf file stored by default in /etc/SCLMDT/CONFIG/ISPF.conf and defines the required ISPF allocation as shown in Example 19-1.
450
* The libraries beginning BZZ.* are for the Breeze product and are * included to show how multiple data sets are added to the concatenations. * These should be removed if the Breeze product is not installed. sysproc=BZZ.SBZZCLIB,ISPF.ZOSR8.SISPCLIB ispmlib=ISPF.ZOSR8.SISPMENU isptlib=ISPF.ZOSR8.SISPTENU ispplib=ISPF.ZOSR8.SISPPENU ispslib=BZZ.SBZZSENU,ISPF.ZOSR8.SISPSENU,ISPF.ZOSR8.SISPSLIB ispllib=BWB.V2R1.SBWBLOAD,BZZ.SBZZLOAD,ISPF.ZOSR8.APARLOAD
* * * * * * * *
OPTIONAL: Include below your own additional user exec for ISPF allocation. The allocation exec will be passed the following parameters PROJECT, PROJECT DEFINITION, USERID. This can add allocation refinement by project or userid . A sample exec job is found in 'BWBISPF2'. If required remove the * below & change HLQ.test.exec to user defined data set.
allocjob = SCLM.PROJDEFS.REXX(SCLMALOC) You should specify any libraries that contain members that might be required by the SCLM processes. For example, if you have a build translator or exit that uses the ISPLNK call method, then the member executed must be in the ISPF concatenation, so the PDS containing the member should be specified here. Additionally, if you are running batch builds, the FLMLIBS member that specifies the ISPF data sets for batch builds should be available in the ISPSLIB concatenation as SCLM Developer Toolkit uses standard file tailoring to include the required SCLM skeletons. If you have a requirement to have SCLM project specific allocations, then this is also possible. SCLM Developer Toolkit provides, in the ISPF.conf, the ability to call an additional exec to perform allocations. This call is also shown above in Example 19-1. There is a sample version of this file provided in the supplied SBWBSAMP library called BWBISPF2. This file can then make any changes necessary for project specific allocations. It should be noted that at the time this exec is called the ISPF environment has not been set up yet, so you are not able to use the LIBDEF service to make the alteration to the allocation. You can however reallocate the already allocated ISPF DDs by checking the current allocation and then reallocating with your data sets in front. An example of this is shown in Example 19-2.
Example 19-2 Sample REXX to reallocate SYSPROC, ISPSLIB and ISPMLIB
/* REXX */ parse arg $args parse var $args PROJ PROJDEF USERID say '***************************** ' say 'Running DT allocation job' say 'PROJ = 'PROJ say 'PROJDEF = 'PROJDEF say 'USERID = 'USERID say '****************************** '
451
/* Work out current allocations using LISTA */ x = outtrap('out.','*','concat') "lista status" lc = rc x = outtrap('off') /* Specify DDNAMES you need to reallocate DDS = 'ISPPLIB ISPSLIB' DD# = 0 DSN. = '' I = 2 Do While I <> OUT.0 If Substr(OUT.I,1,1) = ' ' Then Do Parse var OUT.I DDN . 12 DISP If DDN = '' Then DSN.DD# = DSN.DD# "'"DSN"'" Else Do DD# = Wordpos(DDN,DDS) DSN.DD# = "'"DSN"'" End End Else Parse var OUT.I DSN . I = I + 1 End /* Perform allocations */ Select When (PROJ = 'SCLM07') Then Do Address TSO "ALTLIB ACTIVATE APPLICATION(EXEC) DATASET('SCLM07.PROJDEFS.REXX')" If rc = 0 Then Say 'SYSEXEC : SCLM07.PROJDEFS.REXX concatenated' "FREE FILE(ISPSLIB)" "ALLOC FILE(ISPSLIB) DATASET('SCLM07.PROJDEFS.SKELS',"DSN.2") SHR REUSE" If rc = 0 Then Do Say 'ISPSLIB : Reallocated with following concatenation -' Say "'SCLM07.PROJDEFS.SKELS',"DSN.2 End End When (PROJ = 'SCLM01') Then Do Address TSO "ALTLIB ACTIVATE APPLICATION(EXEC) DATASET('SCLM01.PROJDEFS.REXX')" If rc = 0 Then Say 'SYSEXEC : SCLM01.PROJDEFS.REXX concatenated' "FREE FILE(ISPMLIB)" */
452
"ALLOC FILE(ISPMLIB) DATASET('SCLM01.PROJDEFS.MESSAGES',"DSN.1") SHR REUSE" If rc = 0 Then Do Say 'ISPMLIB : Reallocated with following concatenation -' Say "'SCLM01.PROJDEFS.MESSAGES',"DSN.1 End "FREE FILE(ISPSLIB)" "ALLOC FILE(ISPSLIB) DATASET('SCLM01.PROJDEFS.SKELS',"DSN.2") SHR REUSE" If rc = 0 Then Do Say 'ISPSLIB : Reallocated with following concatenation -' Say "'SCLM01.PROJDEFS.SKELS',"DSN.2 End End Otherwise NOP End Exit
19.2.2 TRANSLATE.conf
The TRANSLATE.conf file provides keywords to determine how code is stored within SCLM. The TRANSLATE.conf member must exist and must have values set for the ASCII and EBCDIC code pages. If you are only going to be looking at your traditional SCLM types, such as COBOL, then nothing else needs to be set in the TRANSLATE.conf. If you are going to utilize the ability to store ASCII files, such as Word documents, directly in SCLM, then there is a provision to specify the name of the language definition that files being binary transferred and stored are saved with. This is the TRANLANG keyword. Additionally, the SCLM language definitions name also controls whether long name files are converted to suitable valid short hostnames to store in SCLM. This long to short name mapping is controlled by the SCLM long/short name translate file. The keyword to specify if certain languages should be translated from long to short names is LONGLANG. For example, you have a number of Word documents that you want to store in SCLM. In this case, files of this type cannot be edited on the mainframe. So there is no point in translating them to EBCDIC and they should just be stored in ASCII. Perform the following steps: Create an SCLM Language translator based on the sample BWBTRANJ in the SBWBSAMP library. Basically this translator is nothing more than a FLMLANGL macro as shown below in Example 19-3.You could call it BINARY (as this is how it will be stored), or if you want to be specific, call it DOC.
Example 19-3 Example of SCLM Translator for Word documents
*********************************************************************** * WORD DOCUMENT LANGUAGE DEFINITION FOR SCLM * *********************************************************************** FLMLANGL LANG=DOC,VERSION=1.0 * Create an SCLM type in the hierarchy to store these binary objects. For this example create a type of DOC with a DCB of RECFM(VB) and LRECL(256).
453
As this file has a long name on the workstation, such as InstallGuide.doc, you need to make sure this is mapped to a generated short name in the SCLM PDS where you will store it. Therefore create a LONGLANG entry for the BINARY or DOC language, whatever you have called it. For example, LONGLANG BINARY. Add a TRANLANG entry for the BINARY or DOC language, whatever you have called it. For example, TRANLANG BINARY. When the Word document is added to SCLM you assign it a language of DOC. SCLM Developer Toolkit will check the TRANSLATE.conf and see that there is a LONGLANG keyword for the language of DOC, so will generate a short name for the file to be stored in the DOC library. As there is also a TRANLANG keyword for the language of DOC SCZLM Developer Toolkit will not do an ASCII to EBCDIC translation when the member is stored. When the member is checked out in SCLM it will be transferred down to the Eclipse workspace without any EBCDIC to ASCII conversion. Word is then started to work on the file. When changes are complete the Word document is checked back into SCLM and again no ASCII to EBCDIC translation takes place. Example 19-4 below shows an example TRANSLATE.conf member.
Example 19-4 Sample TRANSLATE.conf member
* -------------------- CODEPAGE SECTION ---------------------* * Below change ASCII and EBCDIC codepages * used in ASCII/EBCDIC client/host text translation. * ISO8859-1 is the default ASCII codepage used. * IBM-1047 is the default EBCDIC codepage used. * CODEPAGE ASCII = ISO8859-1 CODEPAGE EBCDIC = IBM-1047 * * ------------ ASCII to EBCDIC TRANSLATION SECTION ----------* * Below add SCLM Language type for no ASCII/EBCDIC * translation to the host (File will be binary transferred). * If files were ASCII text they will remain in that ASCII codepage. * ASCII/EBCDIC translation will take place for files by default. * TRANLANG JAVABIN TRANLANG J2EEBIN TRANLANG J2EEOBJ TRANLANG TEXTBIN TRANLANG BINARY TRANLANG DOC TRANLANG XLS * * ------------ LONG/SHORT NAME TRANSLATION SECTION ----------* * Longname to shortname translation implies the longname file on the * Client (including directory package structure) will be mapped to * a valid host member name of 8 characters and stored in SCLM using * this translated host short name. * No translation involves the Client file already being in host * short name format (8 characters or less) and stored as is. * * Add Language types for longname to shortname translation
454
* using the keyword LONGLANG. * LONGLANG JAVA LONGLANG J2EEPART LONGLANG JAVABIN LONGLANG J2EEBIN LONGLANG J2EEOBJ LONGLANG DOC LONGLANG XLS *
455
ASCII/EBCDIC These parameters allow you to override at a project level, the default ASCII and EBCDIC codepages specified in the TRANSLATE.conf. This means that on a single installation it is possible to run multiple SCLM projects that contain members that use different codepages. For example, during bidirectional testing we used two separate SCLM projects, one to hold Hebrew source and the other to hold Arabic source. By using the project configuration file we had separate code pages for both. TRANLANG/NOTRANLANG These options add or remove TRANLANG keywords that have been set previously in the TRANSLATE.conf LONGLANG/NOLONGLANG These options add or remove LONGLANG keywords that have been set previously in the TRANSLATE.conf
* Project - SCLM07 * Below are a number of project specific options used to * determine the behaviour of the Eclipse front-end. * * These will override the SITE.CONF file * * * SCM Approver processing applies to this project? BUILDAPPROVER=BREEZE PROMOTEAPPROVER=BREEZE * * Change Code entry on check-in is mandatory? CCODE=Y * * Foreground or On-line builds/promotes allowed for this project? FOREGROUNDBUILD=N FOREGROUNDPROMOTE=N * * Batch Build default jobcard BATCHBUILD1=//SCLMBILD JOB (#ACCT),'SCLM BUILD',CLASS=A,MSGCLASS=X, BATCHBUILD2=// NOTIFY=&SYSUID,REGION=512M BATCHBUILD3=//* BATCHBUILD4=//* * * Batch Promote default jobcard BATCHPROMOTE1=//SCLMPROM JOB (#ACCT),'SCLM PROMOTE',CLASS=A,MSGCLASS=X, BATCHPROMOTE2=// NOTIFY=&SYSUID,REGION=128M BATCHPROMOTE3=//* BATCHPROMOTE4=//* * * BUILD Security flag for SAF/RACF security call/Surrogate ID switch BUILDSECURITY=N
456
* PROMOTE Security flag for SAF/RACF security call/Surrogate ID switch PROMOTESECURITY=N * J2EE DEPLOY security flag for SAF/RACF security call/Surrogate ID switch DEPLOYSECURITY=N * * Arabic Codepage overrides * ASCII=UTF-8 EBCDIC=IBM-420 * * Project specific TRANLANG and LONGLANG entries * TRANLANG=DOC LONGLANG=DOC The ASCII/EBCDIC codepages will ensure that code transferred to and from the Eclipse IDE will be translated correctly between the Arabic codepages. The SCLM Language definition of DOC will be added to default TRANLANG and LONGLANG specified in the TRANSLATE.conf file.
457
The SCLM Preferences page allows you to specify the following settings: Display results dialog for successful operations The SCLM service operations return a dialog with a return code and process description. It is possible to suppress this dialogue by checking the return dialog selection. If this is checked, all process returns will be presented from the Eclipse Task list. Check for SCLM perspective each time mapping a project Enable the SCLM perspective each time SCLM is mapped to a project in the IDE view. Zip File Size The maximum size of the zip file for multi-file transfers, which enables a user to specify the upper limits of the zip file. On some systems, an unlimited amount causes a file truncation error in transmission. If the transfer is greater than the set amount, multiple files are used. SCLM Configuration Project Name The name of the configuration project being used. This is a temporary project that SCLM Developer Toolkit creates in the IDE View to facilitate using the functions of Eclipse for items in the SCLM View. The user does not need to work directly with this project. Save SCLM View Whether to save the SCLM view between sessions.
458
Explorer Mode/Developer Mode Which SCLM View mode to use. Developer Mode provides a view based on type, similar to SCLM 3.1 is ISPF. Explorer Mode provides a full listing of SCLM members by group, type and member. Log SCLM Operations Whether SCLM operations are logged, which enables the viewing of operations in terms of parameters passed and SCLM output. Even if you chose not to show a return code dialog for successful operations, they will still be logged if this box is checked Log Location The location of the SCLM log file. Enable Batch Job Monitor Whether the batch monitor is active. The batch monitor is a daemon that periodically checks for jobs listed in the Batch Job List (click View Batch Jobs). If a job is in the list, one it completes, the Batch Job Monitor will pop up a message dialog to the user telling them the job has finished. Prompt to enable batch job monitor.... If the Monitor is turned off, you will be prompted with a dialog to turn it on when you submit a batch job. Batch job monitor interval How often the batch job monitor polls checking for job status. Batch Monitor buttons The current jobs being monitored can be listed and deleted if necessary. Also, the monitor can be restarted, for example, when a more frequent time interval is specified. Refresh cached project information The complete list of cached project information can be viewed and cleared if required. SCLM Developer Toolkit will automatically retrieve project information for projects being accessed that it does not have information for. Additionally, the project information can be selected to be refreshed when the first SCLM operation is performed in that session.
459
To add an extension, click the New button on the Language Extension preference panel and enter the SCLM Language and the extension that it will relate to. A common example is to associate a COBOL language, COBE, to a .cbl extension. This can be seen in Figure 19-2.
By checking the associations that *.cbl has in the base eclipse file types, you can associate more advanced editors to work on your code. Select Windows Preferences General Editors File Associations to see a listing of file extensions. If the one you want is not displayed, such as *.cbl, you can add it by clicking the Add box next to the File Types window. Highlight the language you have just added and click the Add button next to the Associated Editors. From here you can select an internal Editor or an External program. The completed dialog for the .cbl extension is shown in Figure 19-3. For example, if you are using WebSphere Developer for System z, the LPEX editor is installed as a plug-in. You can associate this, if it is not done so already, with the .cbl extension. This way when you edit your SCLM COBOL program, the LPEX editor is used instead of a text editor. This can give you the look and feel of a z/OS editor, such as ISPF or XEDIT, as well as color coding to assist in development. Another example is to associate the .doc extension with Microsoft Word, By default this will not be set up in Eclipse. Add the *.doc extension as detailed above. Then click the Add button next to the Associated Editors and select the External program radio button. Finally select the Microsoft Word program from the list. This is shown in Figure 19-4. With this example it is not necessary to associate an SCLM language with the extension. This is because with SCLM Developer Toolkit, you will associate Word documents with a language type that will invoke long to short name translation. So SCLM itself will know that Word documents stored in SCLM have a long name and as such will open these files with their long names, at which point Eclipse will use the file extension to open the correct editor. Additional file type associations can be added in for *.xls, *.pdf. Also if you have any additional normal members in SCLM that you wish to open with a special editor, add entries in the Language Extension preferences panel.
460
461
462
20
Chapter 20.
463
464
The operations log is available by clicking the Mode , or by right-clicking on any node and selecting the Operations Log option. The operations log dialog will be displayed where you see the entries stored by date. Expand the date node in the tree and you see there is a log entry for each operation that was performed. If the operation failed, then there is a red cross next to the operation. Information that is available in the operations log includes: SCLM messages and reports, such as build messages and reports Output from user exits, such as CCVFY or build and promote user exits SCLM Developer Toolkit connection information Trace information for each action that may be useful in debugging if there is a problem The operations log can be seen in Figure 20-2.
Additionally, you can zip up the logs, for example, to send to IBM if support is required.
465
install into will activate the HTTP server connection. Start by double-clicking the SCLM... node or right-click and select Add Project Filter to View. If you are not already connected, you will be presented with the connection dialog. If you are connecting via WD/z, this will include a list of already configured RSE connections as shown in Figure 20-3. Select the connection you want to use from the list, and enter the SCLM project you want to add to the Explorer View. If you have not logged in, you will be asked for your Mainframe userid and password.
If you are connecting using another Eclipse such as RAD, you are prompted for the IP address and port number of the http server that Developer Toolkit is using. As with the RSE connection, you must also enter the SCLM project that you are interested in using. This location specification is shown in Figure 20-4.
466
Double-click the project node, SCLM07 in the above example, or right-click and select Populate Project Filtered View from the displayed context menu. The first time you work with a specific project or an alternate project, SCLM Developer Toolkit needs to go and collect information about the project. This is to store in cache in your workspace so that subsequent actions on that project are performed quicker. The cached information is used to propagate drop-down lists for example and includes information such as: Group, type, language, and authcode information from SCLM ASCII/EBCDIC codepage from TRANSLATE.conf or the site/project configuration files TRANLANG/LONGLANG information from TRANSLATE.conf or the site/project configuration files Other site and project specific configuration information from the site/project configuration files So whenever a project new to you in this workspace is accessed, the following progress dialog shown in Figure 20-6 is seen.
Once project information is retrieved, the project information panel shown in Figure 20-7 is displayed for you to enter an alternate project if required. This panel already has the group pull-down populated for the base SCLM project. If you enter an alternate project, then project information will be retrieved from cache, or from the host if this is the first time you have referenced the alternate. On this panel you will also enter your default development group. This panel is very similar to the ISPF SCLM main panel.
Click OK and you are now shown the filters page. This panel is where we now decide what information we want to retrieve from SCLM. There are two ways to retrieve information from SCLM, either by entering certain filter values, or by populating by an ARCHDEF. Let us look at each of these population methods in turn.
467
Populating by filter
Use this option if you want to bring up a list of members based on certain filter criteria. You can use wild cards on all of the available fields. You can also use the retrieve buttons to retrieve type and language information from the cached project information. Figure 20-8 shows the filter dialog filtering on a type of COBOL and members beginning RDBK*.
When OK is clicked, the request is sent to Developer Toolkit back-end services where the list of members matching the criteria is retrieved and returned to the IDE. The SCLM Explorer view is then populated with the list of members. Depending on what mode you have chosen, Explorer or Developer (which is the startup default), the member list will be displayed slightly differently. For the example above, the member list returned is shown in Figure 20-9. The filters used are shown in the project note under the connection node. Also the time the population was performed is shown. This is because this view is a snapshot at a point in time. It is possible that another developer may be editing, building and promoting members included in your filter scope. If this is the case it is good practice to refresh the list occasionally. The results shown below are shown in Developer mode, so there is a type node, in the example showing COBOL. Below the type node, the members are shown, showing the member name, the members language, and the group where the member resides.
468
Populating by ARCHDEF
Alternatively the SCLM Explorer view can be populated by specifying an ARCHDEF. This feature will read through the ARCHDEF and the SCLM build map, if available, to provide a list of all members that are included in the ARCHDEF. The ARCHDEF radio button at the top of the filter panel is selected and this will activate the ARCHDEF options, and deactivate the normal filter options. If you know the name of the ARCHDEF member name you can enter it in the ARCHDEF name field. The group and type can be left blank as the group will default to your development group and the type to a type of ARCHDEF. You can change these if you want to display the contents of an ARCHDEF that resides higher in the hierarchy, or in a different SCLM type, such as PACKAGE. Populating by ARCHDEF is shown in Figure 20-10.
469
If you do not know the name of the ARCHDEF, you can click the Browse button and that will bring up an SCLM Member selection page. Click the Refresh Members button and an SCLM Project Filter Page is displayed. Enter the group, type and any other filter patterns that will help you find the ARCHDEF you are looking for. Click OK to begin the search. Figure 20-11 shows the filter panel used to find the ARCHDEF you are looking for.
470
Once complete, the SCLM Member Selection Page will be populated with the groups and members that matched your criteria shown in Figure 20-12.
Figure 20-12 Member selection panel showing ARCHDEFs meeting filter criteria
By then selecting the ARCHDEF you are interested in and clicking the OK button, the ARCHDEF 0ptions on the original Filter page are now populated as shown in Figure 20-13.
Figure 20-13 Populating by ARCHDEF after ARCHDEF has been searched for Chapter 20. SCLM Developer Toolkit for mainframe development
471
When you click OK, the request is sent to SCLM and the list of members contained in your selected ARCHDEF is displayed. The information displayed is the same as populating by filter except all types and members that are included in the ARCHDEF are populated in the view. This is shown in Figure 20-14.
The example above shows a fairly typical scenario in that the ARCHDEF we needed to use is already at the PROD level in the hierarchy. However, when SCLM is populating, it looks from your development group, searching up through the hierarchy. The member list shown above has members from both DEV1 and PROD, as some of the components contained in this ARCHDEF are being worked on in DEV1 already. Populating by ARCHDEF and then working on the populated list is similar to using the Unit of Work processing in SCLM (Option 3.11).
472
Each of these views can then be refreshed independently of the rest by right-clicking the project line to show the context menu and selecting the Refresh Project Filtered View option.
Developer mode
Developer Mode provides a view of SCLM members based on type, similar to SCLM Option 3.1. We saw from the previous examples that the nodes are separated by type. Then within each type the members are listed. Decorators show the group location of the member next to the member. As members are promoted through the hierarchy the decorator will change to show the new location. If you are using the SCLM view for the purpose of code development, building, and promoting, then we recommend that you use Developer Mode view. This provides the suite of functions that support this type of usage.
Explorer mode
Explorer Mode provides a full listing of SCLM members by group, type, and member, and is more suited for exploring the contents of the hierarchy. The display is different, as there is a group node now placed in the view, so the members are shown in the groups where they are found. Developer mode will always start looking up the hierarchy from your specified development group, this cannot be changed. Explorer mode allows you to search any groups individually, all groups, group patterns, or by hierarchical group search, depending on how the group is specified. Table 20-1 shows some examples.
Chapter 20. SCLM Developer Toolkit for mainframe development
473
Table 20-1 Explorer mode group values Group Value DEV1 DEV* DEV1* Description Displays all members matching the filter from the DEV1 group Displays all members matching the filter from groups that begin withe the name DEV Displays the first found member in the hierarchy starting at the DEV1 group and looking up. This is because SCLM knows that the part of the group name before the wildcard is actually also a group Displays all members matching the filter from all groups in the project
The results, using the above values and searching for member BILLINGP, can be seen in Figure 20-16.
474
Double-clicking a member will open the member in a browse mode. This means that the member is not locked in SCLM, so it is not checked out. To begin editing, right-click to bring up the context menu and select the Edit / Check out option. Which editor opens in the editor pane will depend on what language extension mapping you have set. Also, you can maximize the editor pane so that you are editing in full panel, thus giving you more real estate to work with. Without any language extension mapping, the default text editor will open. Editors like LPEX will color-code based on language syntax, to provide visual aids while you are coding. The editor panel can be seen in Figure 20-17. Note: If you are using the LPEX editor that comes with WD/z and you are familiar with the feel of the ISPF editor, or maybe XEDIT, you can change the way the editor interacts to some extent. Go to Window Preferences LPEX Editor and change the Editor profile to one that suits the editor you are used to.
Once you are finished editing the member, go back to the SCLM view and right-click the member name to bring up the context menu. Select the Check In option and the member will be copied back to SCLM on z/OS, saved, and the lock will be released. You can change the language or add a change code for the member at this time. Alternatively, if you do not want to save your changes, select the Cancel Edit / Unlock option from the context menu. If your site uses any CCVFY or CCVER user exits, these will be called prior to the edit session beginning. If there are requirements on entering change codes, for example, then any messages sent from these exits will be written to the operations log.
475
SPROF processing
SPROF in ISPF is an SCLM Edit macro command, so this is not available via the IDE. If you need to change member details such as the language, or add a change code, there are two ways this can be done in Eclipse. Right-click the member and select the Update Member Details option. The panel shown in Figure 20-18 will be displayed.
You can select a different language from the pull-down list, for example, if you want to use a debug language. Also, you can add a change code. The other way to change member details is to use the Update/Reset Account Info context menu item when you right-click the member. This dialog works slightly differently than the Update member details, as it allow you to select multiple members from the SCLM View to process the action against some or all of the members. By selecting multiple members from the list and then right-clicking against the select list, the panel shown in Figure 20-19 will be displayed. By selecting some or all of the members and then clicking the Update Selected button, you can then change the language for the selected members.
476
477
You can get additional information on the member by right-clicking on the member name and selecting the View / Refresh SCLM Status option in the displayed context menu. This option will retrieve all of the account information for the member, including the Include lists, Change code lists, and the build map, if it exists. The full accounting information returned for member RDBKC01 can be seen in Figure 20-21.
Figure 20-21 Account and build map information for selected member
478
To invoke the build of a member, source, or ARCHDEF, right-click the member to bring up the context menu and select the Build action. The panel shown in Figure 20-22 is displayed. Enter the required build options, or take the defaults, and click the OK button to invoke the build.
If your project administrator has restricted on-line builds through the site/project configuration, as documented in 19.2.3, Site and project configuration files on page 455, then you will be informed through a message as shown in Figure 20-23 that you have to use a batch build.
Figure 20-23 Foreground builds have been restricted through Site/Project config files
479
If you are running in on-line mode and you have selected the preference to always return the log on completion, you will see a completion dialog. If you click the Details button, the dialog box is expanded to show you build messages and a list as shown in Figure 20-24.
480
Click OK to store the jobcard and then click OK on the build panel to invoke the build. You will be informed of the job number with which the job as been submitted, as shown in Figure 20-26.
If the batch build monitor is not active, then Developer Toolkit will ask you if you want to turn the monitor on, and you can optionally clear any outstanding build records. The batch monitor keeps a track of the job name and job ID in a table and periodically checks the jobs in the list to see if they have completed. It is possible that a record on this table can get orphaned, so clearing the list occasionally is a good idea. This can be done in Window Preferences Team SCLM Preferences, then click the View batch jobs button. You can then click the Remove buttons to remove any old batch jobs. Once the job finishes, a pop-up panel will appear informing you of this, as shown in Figure 20-27.
By clicking the Retrieve Job Output, the job output is returned in a dialog box.
481
482
Additionally, any output that is written to SYSTSPRT, such as output from user exits, is also available in the log that is returned by SCLM Developer Toolkit. This is the case not just for promote, but for any SCLM operation that may have some SYSTSPRT output, such as an edit verification user exit. For example Figure 20-30 shows the messages written by the Breeze user exit as output in the log.
Figure 20-30 SCLM Developer Toolkit log showing SYSTSPRT output from Breeze user exit
483
Unlike the base SCLM version, which is limited to an FB 80 data set that wraps, the output file generated by Developer Toolkit is as wide as the data returned. Meaningful header names are used instead of the mainframe default of the @@FLM* variable names. Prior to starting the Database contents report option, if you are going to store the reports in a project in the Eclipse IDE, you should create a suitable project. To do this, go to the navigator view. This is the pane that is normally in the top left of the panel. To create a new project, right-click anywhere in the pane to bring up the context menu and select New Project. The new project wizard starts as shown in Figure 20-31.
Select General Project, then click Next. On the next panel in the project name, enter a meaningful name, such as Database Content Reports. Then click Finish. If you are going to be storing your reports as spreadsheet files, then you need to make sure that Eclipse knows to associate the file extension, .xls for example, with the Excel program. Go to Window Preferences... General Editors File Associations and look in the list of file types for .xls (or whatever your spreadsheet extension is). If the one you want is not displayed, you can add it by clicking the Add box next to the File Types window. Highlight the language you have just added and click the Add button next to the Associated Editors.
484
The completed dialog for the *.xls extension is shown in Figure 20-32.
To start the database contents report, right-click any node underneath the connection node in the SCLM view, then select the Database Contents Report option. The database contents report wizard then starts. Enter the name of the report, then select the radio button for an Eclipse Project, if that is where you are going to store it. Click the Browse button and select the Eclipse project where you want to store the report. If you are just creating the report on z/OS and not on your workstation, you can enter the data set name where the report will be stored. You can ignore this if you are storing the report in Eclipse. Finally, select the Save report options check box and browse to a location where you want to store the *.rpt files. The first panel of the wizard is shown in Figure 20-33. Click the Next button when you have reviewed what you have entered.
485
The second panel contains parameters standard to the ISPF interface. Enter the groups you want to report on either individually in the boxes or enter an * in the Group 1 box for all groups. Enter the type you want to report on or * for all types, in our example we enter COBOL for the COBOL type. Finally enter an individual member, a member pattern or * for all members. Click Next to proceed to the third panel of the wizard. On the third panel, enter any additional criteria you may want to limit the report by. For an explanation of these parameters, see the database contents section in the Software Configuration and Library Manager (SCLM) Guide and Reference, SC34-4817. However, the most common usage of these parameters is set as the default. The only parameter on the third panel that is Developer Toolkit specific is the Use Long Header Name parameter. This means that instead of the SCLM metavariable name that you select being used as the header name, as is the case on the ISPF interface, the more meaningful long header name will be used. Click Next to proceed to the fourth panel of the wizard as shown in Figure 20-34. On the fourth panel, select the column delimiting you want to use, blank, tab (/t) or comma, or enter your own delimiting character. Select also the file extension, such as .xls or .csv. There are two reports produced, the default report and the tailored report. The tailored report is the one that will be tab delimited and will contain a spreadsheet style report. You can choose not to produce the normal report if you do not require it. You can also include the headers on the tailored report and sum up any numeric fields, such as lines of code counted.
486
The main part of the tailored report is the variable that you select. These can be set up in two ways. One is to just select them from the list of variables. If you click the Select... button, a list of the most common variables is displayed as shown in Figure 20-34.
You can click the Additional variables button to get a full list of all the available variables. By clicking OK, the variables selected will be added back to the tailored report contents area. You can just run the report like this, or if you prefer, you can change the order of these variables using cut and paste. To do this, click the Free Format Text Entry radio button, which will make this area editable. You can now cut and paste variables to move them around. You can also add your own text strings in between the variables. However, if you use the free format, the tab delimiting option will be overridden. So if you want to utilize the tab delimiting, then always select the variables. The completed fourth panel of the wizard is shown in Figure 20-35. Click Finish to run the report.
487
When the report finishes running the spreadsheet application, in our example, Excel will start up automatically with the defaults it uses on startup. This means it starts with a proportional font. As this report came from z/OS, a non-proportional font is required to make it more readable. The following options should be performed on the spreadsheet. These instructions relate to Microsoft Excel: 1. Select all the data in the spreadsheet using Ctrl-A. 2. Change the font to Courier New or any other non-proportional font. 3. Select all the rows from the column headings to the last row. 4. From the menu bar, select Format Column AutoFit Selection. This makes the data in the columns more readable. 5. From the menu bar, select File Save As ... And change Save as type to Microsoft Excel Workbook. Say yes to overwriting the file.
488
The spreadsheet after modification looks like the example shown in Figure 20-36.
Once finished, you can close the spreadsheet. The workspace has also been updated. If you chose to produce the default report also, then that has been opened as a file in the editor pane. Also, the Eclipse project that you created now contains the tailored spreadsheet that was just created. This can be seen in Figure 20-37.
Figure 20-37 Workspace containing .xls file in the selected Eclipse project
489
Listing versions
There are two options available: Version information only: From the member context menu, select Retrieve Versioning Information. Audit and version information: From the member context menu, select Retrieve Audit and Versioning Information. The Audit information and Version information are differentiated by a different node icon as can be seen in the example shown in Figure 20-39. In this instance audit and versioning has been retrieved for member STARTAPP in the TEST group. The audit information is represented by the , icon and the versioning by the , icon.
In the above example, we see that STARTAPP has two versions, with the version at the top of the list, the 06/12/19, being the current version. There is also an additional audit record.
490
Figure 20-40 Audit context menu (left) and version context menu (right)
For Audit records, select the Browse Audit Information menu item from the Audit context menu and the audit information for the record will be retrieved from cache, as it was already stored when the audit and versions were listed, and displayed as shown in Figure 20-41.
491
Version records implicitly have audit information stored with the record, so selecting the version record by selecting Display Version Information from the version context menu will actually show the audit and version details for the record. The additional information shown for a version record is shown in Figure 20-42.
Comparing versions
There are two ways to invoke the comparison utility. The first is to select a single version and then select the Compare with the Latest context menu item in the versioning context menu. The other is to select two versions from the list of versions and select the Show Differences context menu option. We can see that in both context menus shown in Figure 20-43, the Show Differences option is greyed out. This is because we need to select the two versions we want to compare from the list by using the Ctrl key, at which point the Show Differences option will become active. Once the versions required are selected, right-click to bring up the version context menu and select the Show Differences option. Or we can just select a single version and then select the Compare with the Latest option. At this point SCLM Developer Toolkit retrieves both versions from SCLM and then uses the Eclipse compare facility to show the differences, as shown in Figure 20-43.
492
Browsing versions
You can browse any version you want by selecting the Browse context menu option from the version context menu. SCLM Developer Toolkit will retrieve the selected version and open an editor window for the version, shown in Figure 20-44.
493
We need to switch to the Explorer mode in order to recover deleted versions. So we populate the view as we would normally with our required filters. In the example shown in Figure 20-46, we have a program called STARTAPP that is at PROD, but there was a version at TEST that was deleted. We need to list and browse the version that was at TEST.
We only have versioning turned on at TEST in this project. However, there are no members that match out filters at TEST, so we need to add the TEST group to the view to enable us to invoke the version list. Of course if we had widened the scope of our filters and the TEST group was in the view, we would not need to do this. To add the TEST group to the view, on the project node, right-click and select Add Group to View. The panel shown in Figure 20-47 is displayed, where you can select the group you want to add from the drop-down list. In our case we select the TEST group.
The group node is added to the list with no type nodes under it. So we now need to perform the same action for the type that we are interested in. So we right-click the TEST group we have just added and select Add Type to View. A similar panel as before is displayed where we select the type we are interested in, as shown in Figure 20-48.
494
We now have the TEST group and COBOL type in the view, so now we can list the deleted versions. Right-click the COBOL type node under the TEST group node and select Retrieve Deleted Member Information as shown in Figure 20-49.
SCLM Developer Toolkit will now retrieve both normal version records as well as deleted version records, but will add a member node for the deleted members. All members in the specified type that have a deleted version record will be listed under the type node. In our example there is only one member, STARTAPP shown in Figure 20-50. From here we can browse the version or recover the version using the available context menu options.
Recovering versions
Once you have a list of versions, you can then recover any of those versions to your development group. If the version you want to recover is a deleted version, then select the Recover Deleted Version from the deleted version context menu, or if this is a non-deleted version, select the Recover Version option from the version context menu shown in Figure 20-51. Both options perform the same function. Developer Toolkit will restore the selected version into your development group and then refresh your view to show the development group, if it was not in the view, plus the recovered member. Using the example above, we recover the 06/12/16 version of STARTAPP into our development group. The View after the action is complete is shown in Figure 20-51. If the member already exists in the development group, you will be asked whether you want to overwrite it, at which point you can cancel.
495
496
The group and type entry fields are greyed out as we invoked the add new member option from the type node. If we had invoked the add new member option from the project node, then the type entry fields would allow us to enter the required type for the member. The tree view would then be repopulated to add that type to the view. We also need to enter a language for the member and the member name. The language can be selected from the drop-down list. Optionally an authorization code can be entered, or left blank to take the default primary authcode. Once we click OK the member is locked in SCLM in an INITIAL state to stop another user from creating the same member, and the Editor pane is opened with the empty member. This can be seen in Figure 20-53.
Once the code or text has been entered into the member through the editor pane, we can save the member by right-clicking on the new member in the SCLM view and selecting the Check In option. You can enter a change code if required, or change the language and select OK, at which point the member will be stored in SCLM.
497
Select all the files you want to migrate to SCLM and click Open. You are then presented with the panel shown in Figure 20-55 where you assign a language to all the members that will be added to SCLM.
Developer Toolkit will zip all the selected files up and send them up to z/OS where they are unzipped and migrated into SCLM with the selected language. If you want to store members with different languages, then these must be grouped together and a number of separate migration actions will have to be performed.
498
The member specification (*) or (member pattern), if used, will cause the members that match the pattern to also be returned. The panel is populated with the returned list of data sets and members as shown in Figure 20-56.
499
If a complete list of members is required, then the library in the list can be selected by clicking the data set name. This in turn activates the Retrieve data set members button, which can be clicked to retrieve members matching a specified pattern or all members. This is shown in Figure 20-57.
When the OK button is selected, the list of members previously retrieved will be replaced with the newly retrieved member list. It is also possible to build up the list of data sets that will contain members to migrate. For example, if there were members from a number of external COBOL libraries that were all going to be migrated into the same SCLM type, this could be specified by specifying the different data sets for migration until they were all listed. then member patterns for each data set could be used to build a complete list. Once you have a complete list of data sets and members, you select the members to migrate by checking the box next to the member name. Alternatively, check the box next to the data set name to migrate all of the members in the list. If you only have data set names in your list, so you have not specified a member pattern, then all members in the checked data set will be migrated into SCLM. Clicking the Next button will bring up the next panel of the wizard where you can specify the required language an SCLM type where the members will be migrated into. If all members will have the same language and type, use the Select All button to select all the members in the list, or use standard Windows techniques of using the Shift and Ctrl keys to select the members you want. Then click the Update Selected button to show the panel where you can specify the type and language, as shown in Figure 20-58.
500
Once you click OK, the Add member property page, as shown in Figure 20-59, is updated with the required type and language information. You can now specify an authcode and/or change code if required that will be applied to all members in the list. Clicking Finish will add all the members to the specified types in SCLM.
If some of the members already exist in SCLM, you will need to select the Enable Forced Migrate check box for the migrate to work. If you were migrating a whole data set, such that you did not specify a member pattern on the first panel of the wizard, then the language and type will be applied to all members in the selected data set as shown in Figure 20-60.
501
502
If the one you want is not displayed, such as *.doc, you can add it by clicking the Add box next to the File Types window. By default, extensions such as *.doc and *.xls will not be set up in Eclipse, so you will have to do this. A panel will be displayed as shown in Figure 20-62, where you can enter the extension you require, such as *.doc or *.xls.
Once you have added the extension, you can now associate it with an editor. Highlight the language you have just added and click the Add button next to the Associated Editors. From here you can select an Internal Editor or an External Program. For Word, you will select the External Programs radio button and then select the Microsoft Word program from the list as shown in Figure 20-63. Add extensions for all of the long name file types that you are working with, such as *.doc, *.xls and *.pdf.
503
504
Once you click OK, the files will be added to SCLM, and the SCLM view will be updated to reflect the new members that have been added. The short name that SCLM has generated will be visible, as will the long name that is associated with the member, as in Figure 20-65.
In the above example we see that when the member was added to SCLM, it was assigned a short name of DB000001. You can toggle the long name on and off by using the , icon.
Clicking OK will cause SCLM to generate a short name for the new file name and then open the associated editor for the specified extension, in the example above, .doc. Figure 20-67 shows the message SCLM sends back informing you of the short name generated.
Figure 20-67 Generated short name for the new long name file being added
505
Microsoft Word starts automatically with an empty Word document where you can start working on the new document. Additionally, the SCLM view is updated with the new member name showing that the member is locked to your userid, as shown in Figure 20-68.
Once you have finished editing the new word document, you can just save it. However, you may have to ensure that the type is saved as a Word Document in the Save as panel. Once saved, you can now check the file back into SCLM by using the Check In option on the context menu for the member as shown in Figure 20-69.
Selecting this option brings up the panel in Figure 20-71 to allow you to start adding members to the ARCHDEF.
507
Click the Add button and standard SCLM Developer Toolkit search panel is displayed where you can list the members you want to include in the ARCHDEF. Enter a type of DOC and click OK and the documents that exist in this type in SCLM will be listed in a panel, shown in Figure 20-72.
From here we can select the members we want, by selecting all or deselecting all and selecting individual members. We can also change the Include Type to PROM instead of INCLD. Additionally, if you were to use the filter page to list ARCHDEF members, then the Include Type would be set to INCL as per normal SCLM rules. Once you have selected the members you are interested in, click the OK button and the selected members are added to the selection list as shown in Figure 20-73.
Figure 20-73 List of selected members to add to the architecture definition member
508
At this point you can click the Add button again to go and search for additional members to include in this ARCHDEF. Once finished, clicking the OK button will bring you back to the Editor pane on the ARCHDEF with the selected members added to the ARCHDEF, as shown in Figure 20-74.
Once again, at this point you can right-click and go through the architecture definition wizard to add additional members.
509
How to code, test, and debug traditional COBOL and PL/I modules through WebSphere Developer for System z (WD/z) is out of the scope of this book. So let us assume that we have already performed unit test on a COBOL module on out workstation using the tools provided for us by WD/z as shown in Figure 20-75. What we now want to do is add that source program to SCLM.
Once we have finished developing and testing our COBOL program in WD/z, we can add the module or modules to SCLM. The difference between a COBOL application developed in WD/z and a Java Application developed in WD/z is that many of the additional files the IDE uses, such as the .project file, may not be required. If the ultimate destination for the COBOL program is z/OS, then all that is required is to migrate the COBOL programs into SCLM. Using the SCLM IDE view utilizes the Eclipse Team options. This is a standard interface that various Software Configuration Managers (SCMs) can hook into and many functions are provided via the standard context menus.
510
Many of the Eclipse perspectives offer a view that SCLM Developer toolkit calls the IDE View. For example: Working with the z/OS projects perspective, you see the z/OS projects view as shown in Figure 20-75 on page 510. In the Resource perspective or the SCLM perspective, you see the Navigator view as show here in Figure 20-76.
In the Java perspective you see the package Explorer view as shown in Figure 20-77.
Each of these views can offer different options relevant to the types of projects displayed within them, but all of the views offer the team context menu item. So regardless of how you work in the IDE, you will have access to the team options and subsequently the SCLM Developer Toolkit options.
511
Associate the project in the IDE view with SCLM as the SCM provider
The first task is to associate the project and the parts contained in the project with SCLM as the SCM provider. This is the action of sharing the project. Taking the COBOL Sample project shown in the previous figures, we right-click the Project name, then expand the Team menu item to select the Share Project ... menu item as shown in Figure 20-78.
This then gives us a list of SCM providers to choose from. SCLM will be listed there as shown in Figure 20-79 if the SCLM Developer Toolkit plug-in has been installed.
512
You now need to associate the Eclipse project with and SCLM project as this is where the selected code will be stored. Click the Next button and you can then select the machine ID where the SCLM project exists from the pull down. If you are not already connected to that system through your RSE or HTTP connection, you will be prompted for a userid and password. You then select an SCLM project from the pull-down list of previously entered projects, or enter a new SCLM project name. Alternatively you can enter a wildcard for the project filter. This panel is shown in Figure 20-80.
Figure 20-80 Selecting the z/OS system and SCLM Project. Filter
Clicking Next with either prompts you for a userid and password if you are not already logged on, or if you are already logged on, you will then be prompted to enter a development group, which can be selected from the pull down list, plus if you are going to use an alternate project definition for this Eclipse project you can enter that, as shown in Figure 20-81.
Figure 20-81 Selecting the SCLM project, Alternate and development group
513
Clicking Finish will associate the Eclipse project with this specific SCLM project. The decorators in the IDE view are updated to reflect this association as shown in Figure 20-82. Any files that are in the Eclipse project will also have a decorator added, [Not in SCLM], to indicate that no files have yet been migrated to the associated SCLM project.
514
Clicking Next then brings up the Add member property page shown in Figure 20-84. This is the panel where we associate SCLM language and type to all the files selected. We can also associate a non-default authorization code and a change code if required. If the member already exists in SCLM, then there is a forced migrate option to migrate over the existing member. Additionally, the migrate can be run in batch mode, for example, if there were a large number of files to add to SCLM.
Select the member(s) that you want to add to SCLM and click the Update Selected ... button, The Language and Type panel is displayed as shown in Figure 20-85. You can select the language and type from pull-down lists and you may need to click the Retrieve button to first populate these lists.
Perform this action for all members in the list. Also, if there are members that you do not want to include in the migration, you can uncheck the Include selected items ... check box shown in the previous figure.
515
Once all the files you want to migrate have had languages and types associated with them as shown in Figure 20-86, you can click the Next button to proceed to the next panel in the migration wizard.
The Project Architectural details panel optionally allows you to create an ARCHDEF that will contain SCLM INCLD statements for all of the files you are migrating into SCLM. At this point you can add any additional INCL or INCLD statements that may be required for members that already exist in SCLM. Figure 20-87 shows the Project Architectural Details panel. Enter the ARCHDEF name you want to create or update and the ARCHDEF type, as the type may actually be called something else such as PACKAGE. If you are updating an existing ARCHDEF you can search for the ARCHDEF name by clicking the Browse button. By clicking the Add... button the standard SCLM Developer Toolkit filter panel is displayed so that you can search for members that match the filter criteria and then add them to the ARCHDEF if required. There are also some Java/J2EE specific fields on this panel that are not required to be filled in for migrating traditional applications. Leave the Include archdef statements for J2EE ... check box unchecked so these Java/J2EE fields are left deactivated. Once you have added any additional SCLM controlled members to the ARCHDEF, if required, you click the Finish button and Developer Toolkit will transfer the selected files over to SCLM and store them in the SCLM controlled library in the development group that you specified when you mapped the project to SCLM. Additionally the ARCHDEF that you specified, if you specified one, will be created if it does not exist or updated if it does exist.
516
The IDE view will be updated to reflect the fact that the member is now in SCLM as shown in Figure 20-88.
Figure 20-88 Eclipse project associated with an SCLM project post migration
517
Once edited, the member can be saved back in SCLM by right-clicking the member and then selecting Team Check In.
518
When you click OK the import process is run and the selected file(s) is then added into the Eclipse project as shown in Figure 20-91.
519
You are then able to edit the file in the same way as any other file in the IDE view by right-clicking the SAMPCOB file to bring up the context menu and then selecting Team Edit / Check Out. Add the required SCLM keywords to allow this application to be built into a load module. You may need some assistance here from your SCLM Administrator, but by default, the default parameters to do this are the LOAD and LMAP keywords as shown in Figure 20-92.
You then check the file back in to SCLM by right-clicking the member and selecting the Team Check In context menu option. To build the member now, right-click the Eclipse project and from the displayed context menu, select Team Archdef Build, which displays the Build panel shown in Figure 20-93. Enter the ARCHDEF name and type and click OK to invoke the build. For more information on Build, see 20.1.5, Building members on page 478.
520
Once the build completes you will be informed. Subsequently you can now make additional changes to the source members and then build the ARCHDEF that generates the load module by using the Team Archdef Build context menu option on your Eclipse project.
521
Promoting the ARCHDEF will move the code from one group to the next in the SCLM hierarchy. There will be no visible change to the files shown in the IDE view. next time you need to check a module out through the IDE view, SCLM Developer Toolkit will lock it and copy it from wherever in the SCLM hierarchy it finds the code.
522
21
Chapter 21.
523
21.1 Overview
IBM SCLM Developer Toolkit is a Source Code Management (SCM) system to manage resources of projects in the Eclipse environment. The product is developed using the Eclipses team plug-in, which defines additional APIs that allow plug-ins to integrate the function of a versioning and configuration management repository. Because of this, SCLM Developer Toolkit provides a consistent user experience to other SCMs available in the Eclipse environment such as CVS, as well as providing additional SCLM specific functionality. Most of the functionality provided by SCLM Developer Toolkit contributes to the standard Eclipses team extension points, hence people who are familiar with an SCM in the Eclipse environment would find it easy to navigate the features of SCLM Developer Toolkit. SCM mapping configuration via Share Project wizard: When registering a project to be managed by SCLM, it is mapped via the standard wizard. In the first page of the wizard, SCLM DT is listed along with other SCM to choose from, as shown in Figure 21-1.
SCM actions accessible via context menu under Team: Most of the DT actions applicable to the resources of a project are accessible via the Team menu item in the pop-up/context menu. Preference page under Team: Configurable parameters can be specified in the SCLM DT preference pages, which are available under the Team preference tab.
524
525
This language definition would be associated with binary based Java/J2EE parts that require no translation when moving between the Client and z/OS host. Binary objects may be generically slotted under this language definition if no particular build parsing is required (such as gif, jar, class, war, or ear). Additionally other J2EE files, as mentioned above (.classpath, and so on) may also be stored under this language definition if source is desired to be stored on the host as ASCII.
526
Special considerations
Special considerations about the implementation details of SCLM Developer Toolkit are discussed in this section.
527
Java/J2EE project
Special annotation for source folders My Java project source com ibm itso SampleClass.java images Image1.gif images/image1.gif Long name registered source /com/ibm/itso/SampleClass.java
Non-Java project
My non Java project My Doc reports 2006 Product proposal.doc Long name registered My Doc/reports/2006/Product proposal.doc
The same treatment is applied with a file name containing special characters under USS; for example, brackets and dollar signs.
528
The actions provided by SCLM DT are available via pop-up menu (right-click against the resources managed by SCLM DT) as shown in Figure 21-3.
Figure 21-3 SCLM Developer Toolkit actions made available via context menu
SCLM Import
Add to SCLM
529
Description Places an exclusive lock against the selected member and makes it available for editing in the local project. The latest copy of the member is copied from the repository by default. Once finished making all the changes required, the contents of the member should be saved back in the repository. This action saves the contents of local resource in the repository and removes the exclusive lock placed on the member via check out action. This action allows you to remove the exclusive lock being placed for the selected member. This action deletes the member from the repository. Retrieves the latest information from the repository for the selected member. Compares the status of all members in the selected project and the members in an SCLM repository. If status differences exist, then they are reported in the synchronize view. Provides version information. Allows you to browse and save operational log of all actions being performed. Displays the cached SCLM information about the selected resources. Allows you to update the authorization code of the selected member. Allows you to change the language type and change code for the selected member. Allows you to upload local files to a directory under USS. This feature can be useful when moving all dependent JAR files from PC to the host. DT caches the project information. This action allows you to view the cached project information Retrieves the latest project information from the host and refresh the cached project information. This function allows you to select various criteria in order to extract information from SCLMs meta data tables. Allows you to compare the contents of the selected local file and the latest version in the repository. Allows you to compare the contents of the selected local file and different versions of the member in the repository (versioning feature must be turned on for this to work correctly). Replaces the contents of selected resource with the contents of corresponding resource in the repository.
Check in Member
Cancel Edit / Un-lock Delete Member from SCLM Get SCLM Status Synchronize Project with SCLM Version Information Operations Log Local Info Update Authorization Code Update Member Details Upload Jar Files View Cached Project Information Update Project Information Generate Database Content Reports Compare with latest version Compare with different version Replace with latest from SCLM
530
21.5 Usage scenarios: End-to-end usage scenario of a typical Java application development lifecycle
In this section, we describe how to manage a typical Java project using SCLM Developer Toolkit.
Eclipse project
Eclipse project
ARCHDEF: UIPROJ List of source files List of resource files ARCHDEF file name for the business logic project
ARCHDEF: BLPROJ List of source files List of resource files List of dependent JAR files
UISRC
...
BLSRC
...
ARCHDEF
SCLM project
From Eclipses development perspective, the result translates into a number of inter-related projects, and each project represents a logical unit of functionality. Figure 21-4 illustrates a typical configuration of a Java project which consists of two Eclipse projects. One project is concerned with the implementation of user interface components, and another project is concerned with the implementation of business logic. To implement the business logic, it depends on an open source library, which was downloaded from the Web. The UI project depends on the functionality provided by the business logic project.
531
Figure 21-5 shows Eclipses package explorer view, which lists the resources of the two projects described before. BusinessLogicsProject provides three classes, Employee, EmployeesDatabase and SalaryReview, which implement the logic to manage the employees information in a database. utility.jar is an open source library used to implement part of the functionality of the project. UI project contributes one class, EmployeeManagement, which implements a simple user interface to interact with the employee information using the functionality provided by the business logic project. Another file, employee.info, is used to store all employee information.
The dependency between two projects is described in the properties associated with the UI project. That is, the business logic project is included is included in the Java build path of the UI project (right-click on the UI project, select Properties, select Java Build Path, and select Projects. The reference to the business logic project is shown).
532
Table 21-3 Summary of resources and corresponding SCLM type and language Project name: business logic project File name Employee.java EmployeeDatabase.java SalaryReview.java utility.jar .project .classpath Project name: UI project File name EmployeeManagement.java employee.info .project .classpath ARCHDEF name: BLPROJ Type BLSRC BLSRC BLSRC BLSRC BLSRC BLSRC ARCHDEF name: UIPROJ Type UISRC UISRC UISRC UISRC Language JAVA J2EEBIN J2EEPART J2EEPART Language JAVA JAVA JAVA J2EEBIN J2EEPART J2EEPART
It is important to understand the usage of an ARCHDEF file in the context of Java/J2EE projects. An ARCHDEF file is used to describe the resources of a Java project, dependencies to other SCLM managed Java projects, and how to build the project using SCLM build framework with DT extensions to support Java/J2EE projects. Tip: SCLM Developer Toolkit provides an option to store Java/J2EE source members in either EBCDIC or ASCII. To store in EBCDIC, select the language type of JAVA. Otherwise select JAVABIN to store in ASCII format. The build process is able to handle source members stored in either format and able to perform translation appropriately.
533
534
535
2. Migrating members to SCLM: Members in the shared Eclipse project can be migrated to an SCLM repository via a Migrate to SCLM action, which is accessible via the context menu under Team menu. In the first page of the wizard, members to be migrated to SCLM are selected. In the second page of the wizard, as shown in Figure 21-8, SCLM language and type are specified for the members to be migrated to SCLM. In addition to specifying the language and type, authorization code and change code can also be specified in this page. Two additional options are available from this page. Firstly, the Enable Forced Migrate option allows you to overwrite existing members in SCLM. If you do not check this option, and you attempt to migrate a file that already exists in SCLM, the migration will be unsuccessful, and SCLM will retain the member exist in the repository already. Since this option allows you to overwrite any members in SCLM, IBM discourages to use this option, especially migrating a large number of members. Secondly, you can specify the Batch Migrate option which migrates the selected member in batch mode.
Figure 21-8 Specifying language and type for members to be migrated to SCLM
536
In the third page of the wizard, as shown in Figure 21-9, details of ARCHDEF for the project are specified.
As noted earlier, ARCHDEF file captures the essential information needed to manage your Java project. When ARCHDEF name and ARCHDEF type are specified, all members included in the migration are included in the specified ARCHDEF file. If the ARCHDEF does not exist, a new member is created in the specified type. If the member exists already, then new members are added without duplication. Optionally, you can also choose to generate a new build script for the project. By selecting the check box for the option, you are presented with the dialog to enter the information required to generate the build script for your project, as shown in Figure 21-10. It is possible to generate build scripts for Java projects, Web projects, EJB projects, and EAR projects. For our example, we choose the Java Project option. The generated build script shares the member name with the ARCHDEF member which represents your project and stored in type J2EEBLD. In addition, you are able to select an option to include the build map information in the resultant archive file (JAR, WAR, and EAR files). This is useful as the map contains an inventory of the components included in the JAR/WAR/EAR file during assembly. It is also possible to include the source file in the resultant archive file.
537
Figure 21-10 Build script generator for the selected ARCHDEF file
Tip: Some parameters that are used by the build script generator can be customized, since these parameters can vary between installations. See Build Script Parameter Options under Team SCLM Preferences Build Script Options. Once a project is shared using DT, status information of members are displayed using decorators. Figure 21-11 shows projects being decorated by DT. The decorator against BusinessLogicProject indicates that it is shared with an SCLM project called SCLM07, with project alternate of SCLM07 and the user development group of DEV1. All members of the project indicate that they are managed by SCLM (no decorator when a member is managed by SLCM and no further status information to display), except that Employee.java is being marked as checked out. In comparison, UIProjects members indicate that they are not managed by SCLM despite the fact the project itself is shared with an SCLM repository. All members of the project need to be migrated to SCLM following the steps described above.
538
A summary of status of members of an SCLM managed project can be viewed using Local Information action which is accessible via the context menu. It displays a list of status information of the selected members in the project. Figure 21-12 shows an example of status summary after migrating the members to SCLM. Columns in the table can be sorted by clicking on the table headings. A previous version of a member can be viewed by right-clicking on a member in the table.
539
3. Compare with the latest copy in the SCLM repository to make sure the changes made to the checked out member are correct (Compare with Latest from SCLM). This invokes the Eclipses compare editor which highlights the differences between the local file and the latest copy in the repository. 4. Save (check in) the changes back to the repository (Team Check-in).
SCMs typically implement the optimistic approach today in which multiple users are allowed to modify a file concurrently and the changes made by different users are merged when the file is checked back in to the repository. If a SCM is unable to merge the changes automatically, it asks the user to resolve the conflicts manually.
540
Delete action only deletes the selected member at the specified development group. For example, if a member exists in two development groups, they must be deleted at both levels explicitly. Furthermore, it does not delete the member information from an ARCHDEF file that contains the reference to the deleted member. Such ARCHDEF files must be updated manually to reflect the changes. Tip: DT does not currently provide an action to change the name of a member being stored in the repository. This is true for both short names and associated long names. Consequently, when the name of a file has to be changed (for example, the Java class name or package name), then it must be deleted from the repository first and re-migrated.
Additional actions concerned with versioning are available in the SCLM view.
541
Some steps to consider are summarized next: Making dependent JAR files available: A Java project typically has dependencies to JAR files containing Java classes which are used by the application. For example, it is common to download an open source project library and used in a project. In the sample project described above, it uses such a library, which is called utility.jar. Such JAR files need to be included in the CLASSPATH environmental variable when building the project. JAR files used by the project can easily uploaded to a directory under USS using Upload JAR files action (Team Upload JAR files). Figure 21-14 illustrates a dialog used to specify JAR files to be copied to a directory under USS. The specified directory must matched the directory where JAR files are included during the build process which is specified via CLASSPATH_JARS property in the build script. The default location is /var/SCLMDT/CLASSPATH (which is specified in the preference page), however it should be customized depending on the build script used by the build process.
Figure 21-14 Dialog used to select JAR files to be copied to a directory under USS
Ensuring ARCHDEF contains the list of all members of the Java project and dependencies to other projects are specified: All members of a Java project needs to be included in an ARCHDEF file in order to produce a JAR file for the project. The ARCHDEF file a Java project is typically configured during the migrate process and maintained as new members are added to the repository. However, it is possible that the file gets out of sync and does not represent the list of members. If the number of members of a project is small, then it can easily be updated manually to reflect the changes. However, it become a daunting task as the number of members of a project increases. DT provides a wizard to create a new ARCHDEF file for the project based on the members in the local project with additional references to the resources in the repository (Team Generate ARCHDEF).
542
Figure 21-15 illustrates the steps required to generate a new ARCHDEF file for the selected project.
Information to be included in the new ARCHDEF file
Figure 21-15 Steps for generating new ARCHDEF file for the project
The wizard pre-populate the table based on the SCLM managed resources available in the selected project and enables you to add additional resources required by the project in the repository. For example, as shown in Example 21-1, if you want to generate a new ARCHDEF file for the UI project from the example discussed above, you need to include the reference to the business logic project since UI project relies on the functionality provided by the business logic project. That is, you should include an ARCHDEF file representing the business logic project in the ARCHDEF file for the UI project using the INCL keyword. Example 21-1 shows a sample ARCHDEF file for the UI project. When the dependencies to another project is specified using the INCL keyword, the build process ensures that the dependent project is also up-to-date when the project is built. That is, if any member of the dependent project is not built correctly or out-dated, then the build process builds the dependent project first before building the project. The wizard creates a new ARCHDEF file in the root directory of the selected project with the specified name.
543
Example 21-1 Example of an ARCHDEF file which shows dependencies to another project in SCLM
* * Initially generated on 25/11/2006 by SCLM DT V2 client * LKED J2EEOBJ * J2EE Build translator * * Source to include in build * INCLD XX000001 UISRC * .classpath INCLD XX000002 UISRC * .project INCLD EM000003 UISRC * com/ibm/itso/EmployeeManagement.java INCLD EM000004 UISRC * employee.info * * References to other resources in SCLM * INCL BLPROJ ARCHDEF * BLPROJ * * Build script and generated outputs * SINC MYARCH J2EEBLD OUT1 * J2EEJAR LIST * J2EELIST
* * * *
Ensuring that the build script is configured: The ARCHDEF build framework provided by DT involves a number of different components that must be configured correctly in order to build a project successfully. Figure 21-16 illustrates an overview of the build process. a. The build process is invoked against an ARCHDEF file. b. All members in the selected ARCHDEF file are copied to a directory under USS for build. c. The selected ARCHDEF file includes a statement that specifies the build script parameter files to be used by the build process (SINC keyword). d. The build parameter file specifies the base build script. The contents of parameter file are overlayed at the beginning of the base build script to create a tailored build script file in a USS directory, which is used by the ANT build process. e. The project members are built using the build script and results are stored back in the repository.
544
Specifies the base build script Build parameters SCLM repository Parameter overlayed build.xml
If the steps described above are followed correctly, then the build process should succeed and produce the output. A typical output from a Java project is a JAR file that is stored under J2EEJAR type in the repository. Tip: The build process against a Java project typically takes a long time to complete. IBM recommends to build such projects in batch mode, which can be specified in the build action dialog. The status of the batch build process can be monitored using the batch job monitor feature of DT, which periodically checks the status of jobs submitted to the system. The user is notified when the job is completed and its output can be retrieved.
545
When a small number of files must be copied to a project from the repository, importing by using an SCLM view might be more convenient. Figure 21-17 illustrates an overview of the process. From the SCLM view, it is possible to browse members in the repository without importing them to a project. Once you have found a member to import, it is possible to import a member to a project directly from the view.
Browsing a remote file
The recommendation is to store all members of an Eclipse project under one SCLM type.
546
2. Filter by ARCHDEF member: This approach allows you to select a ARCHDEF member whose contents are read to retrieve the status information from the SCLM repository. This approach is useful when the members of your project belong to multiple types and a set of filters is not sufficient to specify all members of the selected project. The result of action is displayed in the synchronize view, which provides two different views of the status information. Figure 21-18 illustrates IDE view which shows the status of members which have different status information compared with the corresponding members in SCLM. Table 21-5 summarizes different status information that can appear in the Synchronize view and the recommended actions to follow for each situation.
Figure 21-18 Synchronize - IDE view summarizing the status of members in workspace
Outdated
Conflict
547
Figure 21-19 illustrates a view which presents a summary of members that are not in the selected Eclipse project. In this particular instance, the README member from BLSRC is missing in the selected member. This typically indicates that someone in the team has added a new member in the repository. Both views should be checked after executing the synchronize action to ensure that all differences are seen.
Figure 21-19 Synchronize - summary of members that are missing in the selected project
548
22
Chapter 22.
549
Secure
In this type of remote z/OS deployment, a secure service is used to transfer the file. The utilities used in the sample deployment scripts are sftp and scp from IBM Ported Tools, and will require the sshd daemon to be running. For scp and sftp to work in non-interactive mode, some additional configuration must be done to enable public-key exchange authentication.
Insecure
In this type of remote z/OS deployment, an insecure service is used to transfer the file. An example of such a service is standard FTP. Data travels unencrypted, and is therefore referred to as insecure.
550
551
This dialog can be accessed via the SCLM view by right-clicking a project node, then clicking Deploy Enterprise Application, as shown in Figure 22-2.
Figure 22-2 Selecting the Enterprise Application Deployment dialog from the project context menu
It is also accessible through the Eclipse project views, again through right-clicking the project node. This time, on the context menu, select Team Deploy Enterprise Application. This is shown in Figure 22-3.
552
Figure 22-3 Selecting the Enterprise Application Deployment dialog from the Team context menu
The deployment dialog serves as an all-in-one control for deployment. Through the dialog, you can choose to either create a new deployment script, or run one that you have saved earlier. In our discussion of deployment, there will be references to property scripts and action scripts. For clarity, a definition of each is provided. Property script: An XML document consisting of a list of property tags. Each property represents some variable in the deployment process, such as the name of the application to deploy, or the host you wish to deploy it to. Action script: An XML document consisting of a project tag under which the particulars of the operation are defined. At the time of invocation, the properties from the property script are overlayed in a predefined ANTXML section of the action script. This script can reference and call other scripts and programs it needs to get the job done.
553
On ANT
For a description of ANT, we turn to the online ANT manual and review: http://ant.apache.org/manual/index.html Apache Ant is a Java-based build tool. In theory, it is kind of like make, but without make's wrinkles. The files ANT uses to specify the configuration details of the application to be built are written in XML. A discussion of ANT tasks, elements, syntax and semantics can be found in the online ANT manual (see the Web site listed above).
554
From here, locate your script in the usual manner. Once selected, the script will be displayed in the script editor window for you to make changes.
555
<ANTXML> <project name="WAS Deployment" default="deploy" basedir="."> <property name="SCLM_ANTXML" value="BWBDEPLA"/> <property name="JACL_SCRIPT_NAME" value="/etc/SCLMDT/CONFIG/scripts/deploy.jacl"/> <property name="SCLM_ARCHDEF" value="TODO"/> <property name="EAR_FILE_NAME" value="TODO"/> <property name="APPLICATION_NAME" value="TODO"/> <property name="HOST_NAME" value="TODO"/> <property name="PORT_NUMBER" value="TODO"/> <property name="CELL_NAME" value="TODO"/> <property name="NODE_NAME" value="TODO"/> <property name="SERVER_NAME" value="TODO"/> <property name="WSADMIN" value="/u/WebSphere/V5R1M0/AppServer/bin/wsadmin.sh"/> </ANTXML> Table 22-1 shows the sample deploy skeleton properties.
Table 22-1 Sample deploy skeleton properties Property Name SCLM_ANTXML JACL_SCRIPT_NAME SCLM_ARCHDEF EAR_FILE_NAME APPLICATION_NAME HOST_NAME PORT_NUMBER CELL_NAME SERVER_NAME WSADMIN Description The action script to execute with properties defined by this property script The location of the WAS JACL deployment script supplied with SCLM DT The name of an SCLM ARCHDEF to associate with the script The file name (long) of the EAR to be deployed Name of the application being deployed The z/OS host name The port number the WebSphere application server is listening on Name of the application server cell to deploy to Name of the application server server to deploy to The location of the WebSphere administration shell script on the Z/OS hosts hierarchical file system Default Value BWBDEPLA /path/deploy.jacl TODO TODO TODO TODO TODO TODO TODO Taken from local settings available in Windows...Preferences
556
name="ANT_BIN" value="/u/WebSphere/V6R0/AppServer/bin/ws_ant.sh" /> name="WAS_EAR" value="TODO"/> name="WAS_HOST" value="TODO"/> name="WAS_PORT" value="TODO"/> name="WAS_HOME" value="/u/WebSphere/V6R0/AppServer"/> name="SCLM_ANTXML" value="BWBRDEPL"/>
The filename (long) of the EAR to deploy The Application Servers host name The Application Servers port number The location of the AppServer of your z/OS Application Server. This is a location on the z/OS USS file system The action script to execute with properties defined by this property script
SCLM_ANTXML
BWBSCOPY, which is the SCP implementation. Change to BWBSFTP for SFTP version.
name="LOCAL_FILE_PATH" value="TODO"/> name="REMOTE_FILE_PATH" value="TODO"/> name="SCLM_ANTXML" value="BWBSCOPY"/> name="TARGET_HOST_NAME" value="TODO"/> name="TARGET_USER_NAME" value="TODO"/> name="SSH_BIN_DIR" value="/bin"/>
557
558
559
dest="/var/SCLMDT/DEPLOYMENT"/> </ANTXML> At TEST, we require the application to be copied to another z/OS host, where it can be accessed by testers. An example script is shown in Example 22-5. (See , Secure Deploy Skeleton button on page 557 for more details).
Example 22-5 Sample secure deployment script to deploy from TEST
<ANTXML> <property name="LOCAL_FILE_PATH" value="/var/SCLMDT/DEPLOYMENT/Util.jar"/> <property name="REMOTE_FILE_PATH" value="/u/bhorwoo/testing/"/> <property name="SCLM_ANTXML" value="BWBSCOPY"/> <property name="TARGET_HOST_NAME" value="PTHISD1"/> <property name="TARGET_USER_NAME" value="BHORWOO"/> <property name="SSH_BIN_DIR" value="/bin"/> <property longname="Util.jar" shortname="UT000002" group="TEST" type="J2EEJAR" dest="/var/SCLMDT/DEPLOYMENT/"/> </ANTXML> So now we must ask the question: how do we combine these two into a single script, while retaining the group-sensitive behavior? The answer is by using group tags. Examine Example 22-6 that implements the behavior of both scripts. It is quite straightforward. The properties for DEV1 are placed inside a pair of DEV1 tags. The properties for TEST are placed inside a pair of TEST tags. Both DEV1 and TEST tags are placed inside ANTXML tags.
Example 22-6 Sample deployment script to deploy from both DEV1 and TEST
<ANTXML> <DEV1> <property longname="Util.jar" shortname="UT000002" group="DEV1" type="J2EEJAR" dest="/var/SCLMDT/DEPLOYMENT/"/> </DEV1> <TEST> <property name="LOCAL_FILE_PATH" value="/var/SCLMDT/DEPLOYMENT/Util.jar"/> <property name="REMOTE_FILE_PATH" value="/u/bhorwoo/testing/"/> <property name="SCLM_ANTXML" value="BWBSCOPY"/> <property name="TARGET_HOST_NAME" value="PTHISD1"/> <property name="TARGET_USER_NAME" value="BHORWOO"/> <property name="SSH_BIN_DIR" value="/bin"/> <property longname="Util.jar" shortname="UT000002" group="TEST" type="J2EEJAR" dest="/var/SCLMDT/DEPLOYMENT/"/> </TEST> </ANTXML> Tip: When using hierarchy sensitive scripts, if one property is placed inside a group tag, all other properties must be inside group tags too.
560
The control is a drop-down list that is populated with the various groups from the current SCLM Project. To initiate a deployment on a particular group, carry out all deployment steps as normal, but specify that group using the drop-down list. What if you are not initiating deployment from Eclipse? For example, let us say you want to deploy in a user exit. In that case you will need to know the arguments that are passed to the deployment service BWBJ2DPY as shown in Table 22-4: BWBJ2DPY PREFIX PROJ PROJDEF GROUP GROUPDEV MEMBER GROUPDPY DEPSEC DEPMODE SUBMIT
Table 22-4 Arguments Argument Name Description The users TSO prefix SCLM Project HLQ Project definition HLQ Group in which script rests Development group of the project Member name of the script The name of the deployment group (hierarchy sensitive) Deployment security (Y/N) Mode of deployment Use online processing, or batch processing
PREFIX PROJ PROJDEF GROUP GROUPDEV MEMBER GROUPDPY DEPSEC DEPMODE SUBMIT
Below is an example taken from the JCL of a batch deployment job. The projects name is SCLM10, which is the same name as the project definition HLQ. The TSO prefix is BHORWOO. The development group and script location group are the same: DEV1. The deployment properties group is TEST, there is no build security, and the deployment script's member name is COMBO. ISPSTART CMD(BWBJ2DPY + BHORWOO SCLM10 SCLM10 DEV1 DEV1 COMBO TEST N NONE NONE) + LANG(CREX)
561
Introduction
The description of this scenario is as follows; we are developing a JAR that contains some utility services. We want SCLM to place the JAR onto the z/OS USS file system at deploy time, so that we can run tests on it and debug the code.
Preparation
To begin, we require the following components: Java source code that produces the JAR An ARCHDEF describing the JARs resources A build script specifying the Java JAR builder You will need to create a new Java project in SCLM DT. If you do not know how to create a Java project in Eclipse, take a look at the documentation on the Web site: http://www.eclipse.org
Tip: After creating a new Java project, the .classpath file created might not have a path set for the output location. If you keep it this way, all locally compiled classes will be stored in the same directory as the source. To make the migration process easier, specify a path here such as bin/. This way, in the first dialog of the migration wizard, you can uncheck the bin/ directory to avoid adding pre-built objects to SCLM, shown in Figure 22-5.
Figure 22-5 Specifying bin/ as the output path in the .classpath file
Create a new class to go into this project. In our example we will use the reliable and timeless Hello World program, implemented in a class called DeployTest, as shown in Figure 22-6.
562
Map the project to an SCLM project by right-clicking Team Share Project as shown in Figure 22-7.
Add all the project resources to SCLM by right-clicking Team Add to SCLM. This is shown in Figure 22-8.
Chapter 22. Deployment with SCLM Developer Toolkit
563
Figure 22-8 Selecting the Add to SCLM option from the Team context menu
Finally, build the project's ARCHDEF by right-clicking Team Archdef Build. By populating the SCLM Developer view, we can now see the built JAR object sitting comfortably in SCLM as shown in Figure 22-9.
564
The following script is pasted into the script editing pane. <ANTXML> <property longname="Util.jar" shortname="UT000002" group="DEV1" type="J2EEJAR" dest="TODO"/> </ANTXML> All that has to be done is to replace the TODO value with a location on the z/OS USS file system. For this example, we choose to place it in /var/SCLMDT/DEPLOYMENT/ so we specify that location as follows: <ANTXML> <property longname="Util.jar" shortname="UT000002" group="DEV1" type="J2EEJAR"
Chapter 22. Deployment with SCLM Developer Toolkit
565
dest="/var/SCLMDT/DEPLOYMENT/"/> </ANTXML> As discussed in 22.2.4, Naming your script on page 558, we now need to specify the name of the member to store the script in, and the member's language. We have chosen to call the script DEP1. We recommend that you always use the TEXT language. Figure 22-11 shows specifying the options to store the script.
Tip: Avoid giving a deployment script the same name as an ARCHDEF. Java/J2EE ARCHDEFs will have a build script with the same member name in type J2EEBLD. If you name a deployment script after the ARCHDEF, the build script will be overwritten, causing subsequent builds to fail.
566
Click OK to begin the deployment. A short time later you will be notified of the result. You should see a success dialog, if you have it enabled under Windows Preferences SCLM Preferences. The following lines of text in the log confirm that the copy worked: shortname = UT000002 type = J2EEJAR Member located at SCLM GROUP=DEV1 Location=SCLM10.DEV1.J2EEJAR(UT000002) OPUT 'SCLM10.DEV1.J2EEJAR(UT000002)' '/var/SCLMDT/DEPLOYMENT/Util.jar' BINARY IGD103I SMS ALLOCATED TO DDNAME SYSXXXXX
567
Unless you configure deployment from a build exit, this is how you will trigger future deployments when new versions of the JAR become available.
Introduction
Since writing and building J2EE applications is a complex area on its own, we run through this example using a simple EAR project. Our concern is deployment rather than J2EE development. For a more detailed walk-through of J2EE on WebSphere Application Server, you can start with the Redbooks publication, Experience J2EE! Using WebSphere Application Server V6.1, SG24-7297, published 31 January 2007. In addition, the WebSphere Application Server deployment samples are most likely of all samples to require customization to fit your requirements. This is due to the variety of possible installation steps that could be required, depending on the type of project.
Preparation
To begin with, we need an EAR. The example EAR in this scenario is a very basic one. It wraps a WAR file that contains a file called hello.jsp - a trivial Web page that displays some details about the requester. For HelloWeb, the Uniform Resource Identifier (URI) used to access the application is set in the EARs /META-INF/application.xml, as shown in Example 22-7.
568
<?xml version="1.0" encoding="UTF-8"?> <application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"> <display-name>HelloEAR</display-name> <module id="WebModule_1166063054921"> <web> <web-uri>HelloWeb.war</web-uri> <context-root>HelloWeb</context-root> </web> </module> </application> By browsing or editing this file we can determine, or set, the Web address that needs to be used to access the application. The URI consists of: http://(server name) : (port number)/(context-root)/ In application.xml, the <module> tag specifies the details of the WAR module embedded within the EAR. In this case the EAR contains a single WAR module, where the context-root has been set to HelloWeb. The <web-uri> tag specifies the internal URI of the WAR module relative to the root of the EAR. In this case our EAR contains HelloWeb.war in its root directory, so the value is HelloWeb.war. So, assuming our host name is http://myserver.com and port is 9080, the URI to access the application will be: http://myserver.com:9080/HelloWeb/ Much of the information provided in deployment descriptors is vendor specific, but for more information regarding the J2EE specification, see http://java.sun.com. In Eclipse, use the project wizards to create a dynamic Web application (WAR) and a J2EE EAR. Link them both together. The source code to hello.jsp is provided in Example 22-8.
Example 22-8 hello.jsp sample source code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>hello</title> <meta http-equiv="Content-Type" content="text/html; ISO-8859-1"> <meta name="GENERATOR" content="Eclipse Platform"> <%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> </head> <body> <table align="center">
569
<tr>Hello <%= request.getRemoteHost()%> ! </tr> <tr><td> Protocol </td><td><%= request.getProtocol() %></td></tr> <tr><td> Auth Type </td><td><%= request.getAuthType() %></td></tr> <tr><td> Content-Length </td><td><%= request.getContentLength() %></td></tr> <tr><td> Content-Type </td><td><%= request.getContentType() %></td></tr> <tr><td> Context Path </td><td><%= request.getContextPath() %></td></tr> <tr><td> Remote Address </td><td><%= request.getRemoteAddr() %></td></tr> <tr><td> Remote Port </td><td><%= request.getRemotePort() %></td></tr> <tr><td> Remote User </td><td><%= request.getRemoteUser() %></td></tr> <tr><td> Scheme </td><td><%= request.getScheme() %></td></tr> <tr><td> Locale </td><td><%= request.getLocale() %></td></tr> <tr><td> Local Name </td><td><%= request.getLocalName() %></td></tr> <tr><td> Local Port </td><td><%= request.getLocalPort() %></td></tr> <tr><td> Local Address </td><td><%= request.getLocalAddr() %></td></tr> <tr><td> Path Info </td><td><%= request.getPathInfo() %></td></tr> <tr><td> User Principle </td><td><%= request.getUserPrincipal() %></td></tr> </table> </body> </html> Once this is successfully configured in Eclipse, add the two projects to SCLM DT under separate ARCHDEFs. Remember that using the standard build method, the EAR's ARCHDEF must INCL the WAR's ARCHDEF to be a nested component. Build the EAR ARCHDEF. If you have configured everything correctly, you are ready to create the deployment script.
<ANTXML> <project name="WAS Deployment" default="deploy" basedir="."> <property name="SCLM_ANTXML" value="BWBDEPLA"/> <property name="SCLM_BLDMODE" value="Forced"/> <property name="JACL_SCRIPT_NAME" value="/etc/SCLMDT/CONFIG/scripts/deploy.jacl"/> <property name="SCLM_ARCHDEF" value="TODO"/> <property name="EAR_FILE_NAME" value="TODO"/> <property name="APPLICATION_NAME" value="TODO"/> <property name="HOST_NAME" value="TODO"/> <property name="PORT_NUMBER" value="TODO"/> <property name="CELL_NAME" value="TODO"/> <property name="NODE_NAME" value="TODO"/> <property name="SERVER_NAME" value="TODO"/> <property name="WSADMIN" value="/u/WebSphere/V5R1M0/AppServer/bin/wsadmin.sh"/> </ANTXML>
570
As with our previous scenario, we replace all instances of the text TODO with real values. For this scenario, the following completed script, shown in Example 22-10, was created.
Example 22-10 Creating the deployment script: after tailoring
<ANTXML> <project name="WAS Deployment" default="deploy" basedir="."> <property name="SCLM_ANTXML" value="BWBDEPLA"/> <property name="SCLM_BLDMODE" value="Forced"/> <property name="JACL_SCRIPT_NAME" value="/etc/SCLMDT/CONFIG/scripts/deploy.jacl"/> <property name="SCLM_ARCHDEF" value="DEPLEAR"/> <property name="EAR_FILE_NAME" value="HelloEAR.ear"/> <property name="APPLICATION_NAME" value="HelloApp"/> <property name="HOST_NAME" value="pthapc1"/> <property name="PORT_NUMBER" value="8880"/> <property name="CELL_NAME" value="APC1"/> <property name="NODE_NAME" value="APC1"/> <property name="SERVER_NAME" value="server1"/> <property name="WSADMIN" value="/u/WebSphere/V6R0/AppServer/bin/wsadmin.sh"/> </ANTXML> As discussed in 22.2.4, Naming your script on page 558, we now have to specify the name of the member to store the script in, and the member's language. We have chosen to call the script DEP1. We recommend that you always use the TEXT language. Tip: Avoid giving a deployment script the same name as an ARCHDEF. Java/J2EE ARCHDEFs will have a build script with the same member name in type J2EEBLD. If you name a deployment script after the ARCHDEF, the build script will be overwritten, causing subsequent builds to fail. Click OK to begin the deployment. A short time later, you will be notified of the result. You should see a success dialog, if you have it enabled under Windows Preferences SCLM Preferences.
571
Unless you configure deployment from a build exit, this is how you will trigger future deployments when new versions of the JAR become available.
572
573
574
Part 6
Part
575
576
23
Chapter 23.
577
578
579
Clone
Parse
PDML
Refactor
Script
Synchronized
580
Unsynchronized
The status of a project as displayed in the host-based user interface. This means that the projects Source definition located in <project>.PROJDEFS.SOURCE(<project>) does not match the projects PDML located in data set <project>.PROJDEFS.SETTINGS(<project>). This is usually an indication that either the options of the project have been edited in the Admin Toolkit and not built into the projects Source definition, or there were edits made to the projects Source definition outside of the Admin Toolkit that have not been parsed into PDML.
As a refresher, there are some other SCLM-specific terms that are used throughout the Admin Toolkit section: Alternate Project A project that can use part of a main projects definition contained in the <project>.PROJDEFS.SOURCE data set, and optionally can use some of the same underlying application source code. Abbreviated name for architecture definition. ARCHDEFs tells SCLM where to find the pieces of a program, how it is to be built and where to put the resultant built and completed application program. A data set that exists in the project that holds the projects application source code data. Such a data set could be <project>.DEV.ASM where assembler source code is stored for the group DEV. The process of copying an asset from another project or a partitioned data set to an SCLM-managed projects data sets, and updating the ACCOUNTING and AUDITING data sets with information about the newly migrated asset.
ARCHDEF
Group/Type
Migrate
Each of the members are self-extracting executable programs that, when run, will result in files being created in directories you specified to install the client. The SCLM Admin Toolkit client uses the InstallShield MultiPlatform Installer to install the client onto your PC. During the installation, you will be asked if you have an Eclipse-based application already installed that you would like to use. If you already have Eclipse 1.3.2 on your PC from another application, then you can install the Admin Toolkit as a plug-in. If you do not have Eclipse v1.3.2 or higher on your PC, then Eclipse will be installed as well, and the Admin Toolkit will be installed as a stand-alone application.
581
Once the installation is complete, use the following instructions in this chapter to configure the workstation client to connect to the host. You must configure the client before you begin to use the product. The SCLM Admin Toolkit is not a smart client, but rather is an installable application. The Admin Toolkit workstation-based client can be installed on Linux, AIX, and Windows operating systems, and have the look and feel of the respective operating system. That is, if the client is installed on a Windows-based workstation, then it will look and behave like an application on Windows. Graphical metaphors are used in the workstation-based client wherever possible. That is, behavior such as dragging and dropping, double-clicking to perform an action, and right-clicking to receive additional menus is possible in the workstation-based client.
582
6. To use the RSE Daemon, highlight the RSE radio button and set the port to 4035, which is the default port number specified in the customization jobs. Note: Check with the system administrator who completed the installation of the Admin Toolkit to ensure that the correct port number is specified here. 7. Then click Finish. The new z/OS connection will appear in the Remote Systems view on the left-hand side of the application. 8. To connect to the new system, expand the connection node, and double-click SCLM Admin Toolkit. Enter your user ID and password to log into the host. 9. Once the user ID and password are verified, you are ready to begin using the Administrator Toolkit.
583
584
585
586
24
Chapter 24.
587
588
Figure 24-1 Panel displaying both Primary Option Commands and Line Commands
Primary Command N is specified on the Command Line to navigate to additional panels which are used to manipulate portions of the project, in this case, adding a new translator to a language definition. Line Commands D, E, M, and C are specified next to an object within the Translator Summary panel to perform a specific action against that object. As you move from panel to panel in the ISPF interface by pressing Enter, the panel options are saved in the projects PDML in data set <project>.PROJDEFS.SETTINGS(<project>). Even if panel options are not changed, the projects options are still updated in the SETTINGS data set. Navigating from one function to another in ISPF can easily be done by using the Quick Navigation Menu, or QNav menu. The QNav menu contains a numerical list of functions that are used to create an SCLM project. On any of the main function panels in the Admin Toolkit, you can press PF4 to display the QNav menu and jump to another function.
589
Navigating through the workstation-based user interface is performed through a series of tabs in the Project Editor view within the Administrator Toolkits perspective. Each of the tabs is a function that is used to create an SCLM project and can be accessed by simply clicking the tab. Figure 24-2 shows the Project Editor view.
Figure 24-2 Use the tabs at the bottom of the Project Editor view to navigate through the functions
As you edit options in your project using the client, the changes are not automatically saved as they are in the ISPF user interface. Project changes are only saved when the Save option is selected under File from the Menu Bar or when the disk icon is selected on the Tool Bar.
590
Figure 24-3 Default Data Sets Dialog window from within the Settings tab
591
The second SYSLIB data set is ISP.SISPMACS by default, but may be edited to reflect your shops naming standards. If additional macro data sets are needed, they may be added in fields Data Set 2 through Data Set 10. Figure 24-4 shows the Control Data Sets tab that contains the project control information, as well as alternate control information. Select the appropriate radio button to edit or add Primary Control Information or Alternate Control Information.
Figure 24-4 The Control Data Sets tab allows you to specify project control information
By clicking the Edit button, as shown in Figure 24-5, you can edit the projects primary control information, such as accounting and auditing files, and the versioning data set pattern to use and the number of versions to retain.
592
Figure 24-6 The Types tab allows you to select data set types to include in your project
To add a data set type to your project, highlight the data set in the left-hand frame and click the right arrow button ( > ) to move it to the right-hand frame. To remove a data set type from your project, highlight the data set in the right-hand frame and click the left arrow button ( < ) to move it to the left-hand frame. To add or remove multiple data set types, highlight each of the data set names while holding down the Control key on your keyboard. Then click the right arrow button ( > ) or the left arrow button ( < ) to move the data sets from one frame to the other. To add or remove all default data set types, simply click the double right arrow ( >> ) to add all of them, and click the double left arrow ( << ) to remove them.
593
In the client interface, Group boxes for your project can be created by providing a value in the field Group Name, and clicking the button, Add Group. Once you have add the groups to be included in your project, the group boxes can be dragged around the workspace in the Groups tab to create your projects hierarchy. Figure 24-7 shows the workspace in the Groups tab with a graphical representation of the promotion hierarchy of your project.
Figure 24-7 The Groups tab allows you to drag-and-drop boxes to create a hierarchy
You can change the direction of promotion in your project in one of two ways. The first way is to click a group box so that it is highlighted in blue. Right-click the highlighted group box, then right-click another group box that you want to lower group to promote code to. An arrow will appear to indicate the direction of promotion. To change the promote direction, repeat the process. The second way to establish the promotion hierarchy is to double-click a group box to bring up the Group Dialog window, displayed in Figure 24-8. The promotion hierarchy, as well as other group definition information, can be defined from this Dialog window.
Figure 24-8 Group options are specified in the Group Dialog window
594
The Groups tab also allows you to view a groups definition at a glance by clicking a group box to turn it blue, then hovering your cursor over the blue group box. A small pop-up will appear with the groups definition information, as shown in Figure 24-7 on page 594. To delete a promotion direction, double-click a group box to see the Group Dialog window. Then set the field Promotes To Group to a blank value, and click OK.
Figure 24-9 Group/Type combination data sets are selected from the Group/Type tab
The difference between the Group/Type data set combinations in the left-hand frame and the selected Group/Type data set allocations in the right-hand frame is that the data sets in the right-hand frame will be created by the Admin Toolkit and included in your project. In our example, the available Group/Type combinations have all been selected to be allocated for our project, so the Group/Type data sets in the left-hand frame and the right-hand frame are the same. This means that an ARCHBIND type of data set, an ARCHDEF type of data set, and an ARCHLEC type of data set will be created for each of the groups. However, there may be projects in which not all types of data sets will be needed by each group. For example, group DEV1 may not need an ASM data set type, but group DEV2 does. In this case, you can remove Group/Type data set DEV1.ASM from the right-hand frame by highlighting the data set name and clicking the left arrow button ( < ), preventing it from being created. Or, for example, group DEV2 may not use a COBOL data set type, but group DEV1 will. In this case, the Group/Type data set DEV2.COBOL may be removed from the right-hand frame so that it is not allocated.
595
596
To edit an existing language definition, simply highlight a language definition in the list and click the Edit button. The Language Definition Wizard window appears, as shown in Figure 24-11, and allows you to edit all SCLM macro parameters by navigating through the Wizard using the buttons Back, Next and Finish at the bottom of each Wizard window. At any time, you can cancel out of the Language Definition Wizard without making any changes to your language definition by clicking the Cancel button.
597
To add a new language definition to a project, simply click Add on the right-hand side of the panel as shown in Figure 24-10 on page 596 to display the Language Definition Wizard. The Wizard will allow you to create a new language definition in one of three ways, as shown in Figure 24-12. The first way to add a new language definition to your project, and perhaps the most efficient, is to copy an existing language definition and then edit the definitions parameters to suit the needs of the project. In some cases, no editing will be required, in which case, the language definition is simply added to the project with a reference to the data set it can be found in. The second way to add a new language definition to your project is to create it from existing JCL. If you have third party vendor tools and your languages exist in a JCL job, the Admin Toolkit can parse through the JCL to create a language definition for you. Once the parse has completed, the newly parsed language definition will be displayed for your review. Any edits or changes to the language definition can be made at that time. The third way of creating a language definition is to create it from scratch by navigating through each of the Language Definition Wizard panels using the navigation buttons Back, Next and Finish as shown in Figure 24-12 and Figure 24-13. While this is a more tedious method to create a language definition, the Admin Toolkits Wizards all contain content-sensitive fields which prevent conflicting parameters from being entered.
598
Figure 24-13 Column names help identify the language definitions in your project
The Language Definitions tab contains columns to help identify the languages in your project. The column Name is simply the name of the language definition in your project. The column Copybook is the name of the PDS member of the language definition. The column Library tells the Admin Toolkit where to find the language definition. It may be the case that the language definition is a generic definition provided in the ISPF macro library, the projects source library or another library. This column lets you know at a glance where the language definition is located. The column Active tells you if this language is in use or if it is commented out. If it is in use, that is, if the value is Yes, then it is utilized by base SCLM when building the associated application source code. If it is not in use, that is, if the value is No, then the language definition is commented out in the project definition source and base SCLM will not use that language definition to build artifacts. The Switch Active button on the right-hand side of the frame allows you toggle between uncommenting and commenting out a language definition from the project source. This permits you to have an incomplete Language Definition in your production project without creating an error condition or other possible problems.
599
The example project SCLM07 was not built on an SCLM release level with the NOPROM service available. Therefore you cannot configure the NOPROM service. The NOPROM tab is grayed out as shown in Figure 24-14.
Figure 24-14 The NOPROM Service is not configurable for the example project
600
Figure 24-15 The Refactor tab lets you view or edit your project source
In our example, click the Forward button to edit the highlighted copybook. The name and location of the copybook you are using is displayed at the top of the Refactor tab. Once in the copybook, make any necessary changes. In Figure 24-16, a new FLMTYPE data set was added. Once you are done making changes to your copybook, click the Save button to save your changes and return to the project source SCLM07.PROJDEFS.SOURCE(SCLM07).
601
You can drill down into a copybook that is included in your project source code by highlighting the copybook and clicking the Forward button. This will display the Copybook Output Selection window. The copybook you drilled down to is displayed for you to edit. In the example in Figure 24-16, a new FLMTYPE data set was added, as well as a comment line describing the edit. When you have completed the changes to the copybook and are ready to create a new copybook, specify the name of the member that will contain the edited copybook in the field, New Member, at the left of the window and click OK as shown in Figure 24-17.
When the new member is written to your source data set, the project source definition will be displayed and the new copybook that you created will appear in the project source as shown in Figure 24-18.
602
603
Figure 24-19 Available SCLM exit points are displayed in the Default User Exit frame
The left-hand frame of the window, Default User Exits, lists the available SCLM exit points you can use in your project. The right-hand frame, Selected User Exits, lists those exit points that will be used in your project. To edit or view a User Exit selected to be used in the project, either double-click a Selected User Exit in the right-hand frame of the window, or simply highlight a user exit and click the Edit button on the right-hand side of the window. Figure 24-20 displays the User Exit Dialog window that provides information about what module will be called at the specified SCLM break point, where the module can be found, how the module will be called, and what options are to be used when processing the user exit. All information is editable and may be changed from this window
Figure 24-20 User Exit Dialog window displaying a user exits options
604
You can add a user exit by highlighting a user exit point in the left-hand frame, Default User Exits, and clicking the button with the single right-hand arrow ( > ) in the User Exits tab shown in Figure 24-19 on page 604. The selected user exit will then appear in the Selected User Exit frame. Once the newly selected user exit is moved into the Selected User Exit frame, you can either double-click the user exit, or simply highlight the new user exit and click the Edit button on the right-hand side of the window. The User Exit Dialog window will appear with blank fields for you to populate with the information that should be used to process the user exit. In the event that two or more exits need to use the same SCLM program exit point, something called an Exit Wrapper will be built. An Exit Wrapper is simply a parent user exit that contains two or more child user exits that must use the same exit point. SCLM Admin Toolkit generates source code for the parent exit which includes serial calls to the child exits in the order that they appear in the source code. You can designate which user exit should be called first when creating an Exit Wrapper. An Exit Wrapper can be created in one of two ways. The first way an Exit Wrapper exit will be created is done automatically by the Admin Toolkit when it senses that a user exit has been added to the project using the same SCLM break point as a user exit already defined to the project. In this way, the user is alerted that they have two user exits that are being used in the same SCLM break point and a Wrapper should be used. The second way an Exit Wrapper exit will be created is by highlighting an existing user exit in the User Exits tab as shown in Figure 24-19 on page 604, and clicking the Wrapper button. The User Exit Definition Dialog window shown in Figure 24-21 defines which user exits are to be included in the Wrapper exit. The order in which the user exits appear in the window is the order in which they will be called by the Wrapper exit. You can change the order in which the user exits are called by highlighting an exit in the list and clicking the Up and Down buttons.
Figure 24-21 User exits that use the same SCLM program break point must use a wrapper
605
The buttons Add and Remove allow you to control what user exits are contained in the wrapper. The Add button will give you a blank User Exit Dialog window in which you can specify the user exit parameters to use in your project, as shown in Figure 24-20 on page 604. The Edit button allows you to edit parameters for user exits already defined to the project. The Remove button simply removes the highlighted user exit from the Wrapper and from the project. The Wrapper Params button, on the upper right-hand corner of the User Exit Definition Dialog window, allows you to specify the invocation parameters for the Wrapper exit. When the Wrapper Params button is clicked, the User Exit Definition Dialog window is displayed, as shown in Figure 24-22, allowing you to provide information for the location and invocation of the Wrapper exit.
Figure 24-22 The Exit Wrapper parameter window is similar to the User Exit parameter window
Note: If the Exit Invocation Method is ISPLNK for any child user exits contained within an Exit Wrapper, then the Exit Wrapper itself must use ISPF as the invocation method so the connection to ISPF services is not lost. Once the Exit Wrapper parameters have been specified, then the button Wrapper Source in the upper right-hand corner of the User Exit Definition Dialog window in Figure 24-21 on page 605 will allow you to generate, or regenerate, the source code for the Exit Wrapper. The Exit Wrapper source code shown in Figure 24-23 was generated for our example and placed into the Module Name and Load Data Set specified on the User Exit Wrapper Dialog window. Parameters can be edited from the User Exit Wrapper Source editor window. Any updates made in the editor will be saved in the PDS on the z/OS host.
606
Once a wrapper has been created, the information on the User Exits tab will change to reflect which user exit in the list has been defined as an Exit Wrapper, as shown in Figure 24-24.
Figure 24-24 The column Wrapper reflects those exits designated as Exit Wrappers
607
However, when viewing the projects source on the z/OS host, the PDML is in UTF-8 format and is not viewable on the host. WARNING: The project source PDML is not meant to be edited and should not be modified by the user at any time. Unpredictable results may occur and updates to your projects definition may be lost. When working with IBM support to diagnose any issue with the SCLM Admin Toolkit, the projects PDML is commonly asked for. The member out of <project>.PROJDEFS.SETTINGS may be FTPd to your PC and emailed to IBM support.
608
To create a new language definition, click Add to the right-hand side of the tab. To edit an existing language definition, click the Edit button. The Language Definition Wizard window opens when either the Add or Edit buttons are clicked. All parameters are editable for existing languages as well as new languages, with the exception of the fields Language and Copy Book, as shown in Figure 24-27 on page 611. Those two fields are not editable if you are editing an existing language definition. They are editable, however, if you are adding a new language to a project.
609
In this Language Definition window, you can provide information for the language identifiers and creating rebuild groups. On this panel you can specify: A Description for this language definition. It is for your information only and must be enclosed in check marks. The Version for this language definition. If you change this value, all source members using this language will be rebuilt. A Buffer Size value specifying the memory required to hold the expected number of $list_info records that SCLM allocates for a parse, verify, build, copy or purge translator. The translator returns dependency information in the allocated memory. A Member Limit that specifies the maximum number of source members that can be present in any input list presented to the translator. If you specify 0, then there is no limit on the number of source members. A Default CREF name that identifies the Type that is substituted into the @@FLMCRF variable for include set definitions. This variable can be used in the list of Types to be searched for Includes. A Default Source name that is a type name. It is used to allocate a hierarchical view that is typically used by the translator to resolve references to SCLM hierarchy members. This parameter is ignored if the FLMALLOC macro with an IOTYPE=I and KEYREF=SREF is not used in the language. This parameter is ignored during a build if a CC, Generic or LEC architecture definition is used to build the source member. The Check SYSLIB parameter specifies whether or not the System Library is to be checked to determine whether an include is to be tracked, and if so, when. Checking may occur at either parse or build time, or not at all. Whether COMPOOL Output is required. The Allocate Syslib option to allocate system library data sets for IOTYPE=I. The Archdef Member option if the member passed in this language is an architecture member. The minimum allowable scope. SCLM compares this parameter with the mode specified as input to build and promote functions to allow or disallow processing. The input mode must be of equal or greater value than the language scope. If this language can be assigned to editable members. If you want to Rebuild Dependents of this member when some outputs from the translator for this member were not saved. The FLMRBLD macro at the bottom of the window displays the Rebuild Groups that causes members with a particular language to be rebuilt when they are promoted into particular groups.
610
Provide the FLMTRNSL macro parameters on the Language Definition window, then click Next. You will proceed to the Syslib and Include Parameters window as shown in Figure 24-28. In this Syslib and Include Parameters window, you provide parameters for the System Libraries and Include Sets. In this window you can click the Add buttons to specify: The FLMINCLS macro: The data set Name and a data set Type that contains the includes for the Include Set. Two SCLM variables, @@FLMTYP and @@FLMETP, can be used in the Types list. A Crosslang value of Y or an N to indicate to SCLM if it is to process the Includes of an included member when the Include member has a different language from the source member, that is, whether or not language boundaries are crossed. The FLMSYSLB macro: The Data Set Name that contains the macros or includes from outside the project. The data set name must meet MVS data set naming standards. The name of an Include set on an FLMINCLS macro (from the list at the top of the window). The Volume serial number of a direct access on which the data set is located. You can add comments to each of the items in a macro list by clicking the Comments button. These comments can provide additional information for your use. You can also remove any item from either of the lists by highlighting an item in the lists and clicking the Remove button.
611
A Translator Summary, shown in Figure 24-29, is provided in the Language Definition Wizard to allow you to choose a translator to edit. You can edit the translators in any order, or you can choose to click Finish to exit the Language Definition Wizard if no edits to the language translators are needed. Select the translator you want to work with and click the Edit button.
612
The Translator Parameters window, Figure 24-30 on page 615, is displayed to allow you to edit or add translator parameters. The Wizard assists you in defining the translator parameter options and data sets that will be used by SCLM. You can specify the following parameters: The function that this translator will provide: The Parse function gathers statistics and dependent objects that SCLM uses when building or promoting artifacts. The Verify function performs a validation. The Build function assembles, compiles, links or otherwise processes a source member. The Copy function copies an SCLM-controlled artifact to the next higher group in the projects hierarchy. The Purge function purges data that is related to an SCLM-controlled artifact, but the data is not under SCLM control. The Call Name to name this translator. The Call Method that will be used to call this translator. The field Compile is the name of the program that will be invoked when this translator is used. This program can be a parser, a compiler, an assembler or some other user-supplied program. If you selected a call method of ATTACH, LINK or TSOLNK, then the field Compile should be the name of a REXX Exec, CLIST or a load module. If you selected a call method of ISPLNK, then this value must be SELECT to invoke ISPF services. The Step Label is a name that identifies the job step for this translator.
Chapter 24. Introduction to the IBM SCLM Administrator Toolkit
613
The field Good RC is the number of what you deem is an acceptable return code for this translator step to complete with. PORDER is an integer from 0 to 3 that indicates the parameter order to pass to the translator. The following values are allowed: 0 - no parameters are to be passed. 1 - Only the Option List is to be passed. 2 - Only the DDname substitution list is to be passed. 3 - The Option List is to be passed first, then the DDname substitution list. The Task Library DD name that contains the translator load module. Use this only when youve specified ATTACH as the call method. The No Save External is a return code value that will indicate whether any translator outputs targeted to an external data set were saved. The BUILD processor determines that the external outputs were not saved by the translator if this value is equal to a return code other than zero. The Max Good RC value is used in conjunction with the INPLIST parameter to indicate the maximum value of a good return code for each member of the input list. Specify a Version for the translator. This parameters stored in the account record for each output member saved from the translators. If you do not specify this parameter, SCLM Administrator Toolkit sets it to blank. The Override Options field indicates that developers can override the default translator options. The Input List Processing field indicates that this translator supports input list processing. The PDS Data field indicates that the input members for this translator reside in SCLM-controlled partitioned data sets. If you specify multiple translators for one language definition, then this value must be the same for all translators. The Param Keyword is used in architecture members to specify additional options for this translator. The field Data Set Name is the data set containing the translator load module (COMPILE parameter) being invoked. This parameter is not required if the translator load module resides in the system concatenation. The field Options is a list of options that are passed to the program whose name you specified in the COMPILE parameter. The maximum length of the list, including delimiters, is 255 characters. The options you pass must be acceptable to the program. Delimit the list with single quotes or parentheses. The options can also contain variables to provide dynamic information to the COMPILE program. For example, the variables @@FLMMBR and @@FLMTYPE will be replaced with the name of the member and type of the last SINC, INCL, or INCLD statement in the architecture definition. So if a source member is being built, the variable will be replaced with the name of the source member. The FLMALLOC macro allocates any data sets that are needed by your translator to process the projects artifacts associated with the language you are editing. The IO Type of data set to be allocated is designated along with the DD name and its corresponding Key Ref value. More is explained on the FLMALLOC macro below. The FLMTCOND and FLMTOPTS macros can be accessed by clicking the appropriate button.
614
When you click the FLMTCOND button, the Condition Dialog window is displayed, as shown in Figure 24-31. The FLMTCOND macro dictates if a translator is to be run or skipped based upon the group for which the build takes place and return codes issued from previous translators in the same language definition. You can specify the following parameters in this window: The Group Criteria field indicates the groups to which the conditional criteria are to be applied or excluded, depending on the radio button selected. The name of the Translator step to which the condition will be applied. The Relation field is the operator for the return code. The Return Code is value of the translators return code that must be matched to make the condition true. The Action that is to take place when the condition is met; either run the translator or skip the translator.
615
The FLMTOPTS macro is applicable to BUILD translators only and allows you to specify one or more sets of options to use based on groups. You must specify the following on the Options Dialog window as shown in Figure 24-32: The Group Criteria field indicates which groups are to have the specified options applied to, or excluded from depending on the radio button selected. The Option Sets to be passed to the translator. The Action to take for the listed sets of option; either replace the existing options list in the Translator Parameter Window or append the set of options to the options list.
616
The text box Options Parameters displays the parameters of the currently selected options set, and is not editable. When you click Add in the Options Dialog window, then a separate pop-up window appears where you can enter option parameters. When you click OK, then you will see an Options Set included in the field, Options Set. When you highlight an Options Set, you will see the complete text listed in the Options Parameters text box. Back on the Translator Parameter window, notice the conflict message that appears in the top of the window when a parameters option is set to something that conflicts with another parameters option, as shown in Figure 24-33. In the example below, the option PDS Data was de-selected, causing a problem with the translator. When this type of conflict occurs, you cannot click OK to move forward until the parameter options have been rectified.
Figure 24-33 You cannot click OK when conflicting parameter options have been entered
The Translator Parameters window is also where the FLMALLOC macro values are specified. The FLMALLOC macro allocates any data sets that are needed by your translator to process the projects artifacts associated with the language you are editing. Using the buttons, Add, Remove, and Edit, you can add data sets to the FLMALLOC macro, remove existing data sets from the translator or edit existing ones. When the Add or Edit button is clicked, the Data Set Allocation Dialog window is displayed. Figure 24-34 illustrates how the Wizard ensures users do not enter parameters that are not applicable, as fields in the Wizard windows will be grayed out if they do not apply to the IO Type of the data set being added or edited.
617
Using Figure 24-34 as an example, the top portions of the Allocations Dialog permits you to specify allocation parameters for the translator.
You can specify the following parameters on the Data Set Allocation Dialog window: The IO Type field identifies what kind of data set the translator is to use. The DDname field tells the translator the name to be used for this allocation. The Keyword Reference is a reference to a keyword in a build map or architecture definition that is used by other parameters in this macro. Its value differs depending on the specified IO Type: IOTYPE=L - the member name of the macro passing the DDname substitution list for the translator IOTYPE=S - the input members for the translator IOTYPE=I - determines the type name of the hierarchy to allocate IOTYPE=O or P - identifies the location in the hierarchy for the build function to copy the output created by the translator of the translator is successful. The Disposition of the data set to be used for the allocation in a JCL DD statement. The SCLM Default Type data set for this allocation The Default Member name for the output member. The Record Format that the data set is to be allocated with.
618
The Block Size that the data set is to be allocated with. This parameter is only valid with IOTYPEs W, O, P, and S. The Record Length is the logical record length that the data set is to be allocated with. This parameter is only valid with IOTYPEs W, O, P, and S. Num Records is the number of records this data set is expected to have. This helps to size the data set appropriately. This parameter is only valid with IOTYPEs W, O, P and S. The Dir Blocks field specifies how many directory blocks to allocate the data set with. The Language field is used when you want the build output of one language definition to be verified, built, copied, or purged in another language definition. The Include field specifies the name of an FLMINCLS macro that lists the types to be allocated for this translator. This is only valid for IOTYPE=I. The Print parameter allows you to copy the contents of a sequential data set to the SCLM listings data set. This parameter is only valid with IOTYPEs W, S, or O. The DSN Type field value indicates whether to allocate a temporary partitioned data set as PDS or a PDSE. This parameter is only valid for IOTYPE P. The Member field is the name of a PDS member that contains the output from the translator step. This parameter is only valid for IOTYPE P. The No Save RC field specifies a return code value that will be set by a translator and, if matched, indicates that SCLM is not to store a translator's output in this data set. This parameter is valid for IOTYPE O and P. The Catalog field indicates that this data set is to be catalogued. If you check this box, SCLM temporarily allocates cataloged data sets with a predefined high-level qualifier, the TSO-prefix, and deletes the data set after all translators complete their functions. The field DINIT tells SCLM to create a default member name into this temporary data set. The member that SCLM creates is initialized with a single record containing the string DUMMY FILE, and will have the same name as the Build Map. However, if you specified a value in the Member field, then the member name inserted into this temporary data set is that value, and not a default name. The MALLOC field tells SCLM to generate a sequential output data set with a specific name. If you use this option, you must also define a data set name in an FLMCPYLB macro and use a KEYREF keyword. This parameter is only valid with IOTYPE O and A. The ALLCDEL parameter tells SCLM to delete all data sets associated with this translator upon completion. The VIO parameter tells SCLM to always use VIO when allocating this data set. The FLMCPYLB macro in the Copy Library Definitions portion of the Data Set Allocation Dialog window allows you to allocate a data set with a specific DD name. You can add new data sets by clicking Add, and remove existing data sets by highlighting a data set in the list and clicking Remove. When the Add button is clicked, the next empty Data Set Name field will become active, and your cursor will be positioned in the Name column. The Name field is the DD name of the data set to add to the FLMCPYLB macro and is optional. The Data Set Name field is required and can contain SCLM variables. Once you have completed editing or adding any translators to the Translator Summary window, click Finish to return to the Language Definition tab in the workstation-based client.
619
Figure 24-35 Select Clone Project from the SCLM pull-down menu
When the Clone Project Utility is selected from the SCLM pull-down menu, a pop-up window will allow you to specify the project name, and whether you want to clone the projects source code data as well, as shown in Figure 24-36.
620
The field, Cloning Project Name, is the name of the project you are making a copy of. In our example, we will copy project SCLM07. The field, New Project Name, is the name of the project to be created. In our example, we will create project CSJENNA and copy everything from SCLM07 into CSJENNA. The field, Is the new project an alternate?, is asking if the new project, CSJENNA, is an alternate of the base project, SCLM07. The field, Include project data?, is asking if you want to copy the application source data for project SCLM07 into project CSJENNA. By selecting this option, you are permitting the Admin Toolkit to copy all group/Type data sets and its source code from SCLM07 to CSJENNA so that you have an exact copy of the application source code being developed in project SCLM07s to project CSJENNA. This allows you to begin development effort on a new application using the source code that is already available. If the option is not selected, then only the project definition data sets (<project>.PROJDEFS.*) from project SCLM07 are copied. The field, New Alternate Name, is only applicable if the option, Is the new project an alternate?, is selected. Otherwise, it is ignored. An alternate project is one that uses a different project definition from the base project. It is basically an alternate view of the base project hierarchy. An alternate project definition is used most commonly to migrate artifacts into a project. Because SCLM only allows artifacts to be migrated into the lowest level of a projects hierarchy, an alternate project allows you to define the hierarchy without the development groups so that artifacts can be migrated into the test level, the maintenance level or the production level. For example, in the next section concerning the Migration Utility, we will cover in-depth how to clone a project and migrate assets from other sources into our new project. You will gain a better understanding of when an alternate project is used and how it can benefit your development effort. For now, the Clone Project Utility will be presented to create a new completed project. Once you have clicked OK, the SCLM Admin Toolkit processes your request by copying all SCLM07 project data sets and application source code data sets, and creates data sets beginning with CSJENNA to complete the new project.
621
Figure 24-37 shows the new project CSJENNA in the Remote Systems View frame and opens the project for you to review in the Project Editor frame. Notice that SCLM07, the project that was cloned, is still open. When you are done using project SCLM07, you can close out of the project in the Project Editor frame and make any necessary changes to the new project CSJENNA.
Figure 24-37 The new project appears in the filter list as well as the Project Editor frame
The ISPF Data Set List Utility in Figure 24-38 and Figure 24-39 displays all the CSJENNA.PROJDEFS.* data sets as well as the underlying application source code data sets that were created when project SCLM07 was cloned to create new project CSJENNA.
Figure 24-38 Project definition data sets were cloned from project SCLM07
622
Figure 24-39 Application data sets were cloned from project SCLM07.
623
The opening window of the Migration Wizard is the Migration Assets window, shown in Figure 24-41 on page 624, which lists the data set and member names of the artifacts which are to be migrated into your project. The button, Add, on the right-hand side of the window allows you to add data set and member names, while the button, Remove, simply deletes a highlighted artifact from the window, eliminating it from being migrated.
Figure 24-41 The initial Migration Wizard window lists artifacts to migrate
Click Add to bring up the Data set Selection window as shown in Figure 24-42. You can add multiple members from the same data set by highlighting them. Hold down the Control key as you highlight the members you want to add to the migration. Multiple data sets may also be included.
624
Figure 24-42 Data set Selection Dialog window allows you to select data sets and their members
Specify the following information on the Migrate Asset Options window, shown in Figure 24-43 on page 625: The Group to migrate artifacts into The data set type the members should be migrated into The language that SCLM is to use for the new artifacts being migrated into the project The authorization code that is to be used for the artifacts Optionally, the change code to use with the artifacts The Mode that is to be used to migrate the artifacts The date and time that is to be used to timestamp the artifacts. Note: The parameters supplied in this window will be used for all selected artifacts being migrated into the project. If, for example, you must use a different language for an artifact in the list, then that artifact should be migrated separately.
Figure 24-43 Specify the Migration parameters that are to be used for all artifacts
625
When all options have been set for the selected artifacts, click Next to begin the migration. When the migration has completed, you will receive a migration report as shown in Figure 24-44.
The Migration Report window may be expanded to view more of the migration report. The scroll bars may also be used to view the complete report.
626
Figure 24-45 Navigate to the Resource perspective to access your remote assets
In this example, artifacts are being migrated from another Java project. Select the Resource perspective and click OK as shown in Figure 24-46.
Figure 24-46 Select the perspective that will allow you to access your remote assets
The Resource perspective will open in place of the Remote Systems View perspective. Select the Java project you want to migrate artifacts from to expand it. Find the artifacts you want to migrate by holding the Control key and clicking the artifacts. Right-click the mouse button to see the additional menu appear. Then select Team. When Team is selected, the option Migrate to SCLM will be visible to select as shown in Figure 24-47.
627
Figure 24-47 Highlight the artifacts to migrate, and right-click to get to the Migrate function
The SCLM Remote Migration Wizard window opens allowing you to select as many artifacts as you want to migrate. When you have finished, click Next as shown in Figure 24-48.
628
The window Migration Project opens asking you to select the host system you want to migrate your artifacts to. In addition, select the project name to migrate the artifacts into. Click Next. If you are not already logged into the host system in the Administrator Toolkit, you will be asked to log in as shown in Figure 24-49.
Figure 24-49 Log into the host system you want to migrate the artifacts into
The Migration Options window opens, as shown in Figure 24-50, and appears similar to the Migration Options window for migrating non-remote artifacts as seen in Figure 24-25 on page 608. Provide the following information: The Development Group to migrate artifacts into The authorization code that is to be used for the artifacts Optionally, the change code to use with the artifacts The Mode that is to be used to migrate the artifacts The date and time that is to be used to timestamp the artifacts
629
Click Next when you have provided all necessary parameters. The window Migration File Extension Mapping opens and will display all types of file extensions of those artifacts being migrated in. For example, if you chose to migrate a *.class file type and a *.html file type, they would be listed underneath the file type Java under the column File Extension. Specify the SCLM Type of data set that the Java files should be migrated into. In addition, tell SCLM what language it should use for the artifact once it is in the project. Note: If there is not a suitable language for the artifacts you are migrating in, you must first add a language to the project, then migrate the remote artifacts into the project. The option Perform File Truncation Checking checks the length of the file name to ensure it adheres to the host systems requirement of keeping data set member names to eight characters or less. If an artifact is found to have a name longer than eight characters, the name is truncated and written to a translation table where its original file name is mapped to its newly truncated name. In this way, artifacts whose file names do not adhere to the 8-character limit can still be migrated into an SCLM-managed project with their unique file name as shown in Figure 24-51.
Figure 24-51 Specify the data set type and SCLM language to use for the artifacts
630
Once the options have been specified in the Migration File Extension Mapping window, click Next as shown in Figure 24-52. The artifact names are written to a translation table if they are longer than 8 characters. They are then written to a host-based file and migrated into the project from the file they were written to. A migration report will be returned for your review once the migration has been completed, as shown in Figure 24-52.
To view the migrated artifacts that now reside in your SCLM-managed project data sets, You can go to an ISPF Data Set List Utility to view the members as shown in Figure 24-53.
Figure 24-53 The Java members are now in the specified source code data set
631
Figure 24-54 Select Architecture Definition Wizard from the pull-down menu
When the Architecture Definition Wizard opens, as shown in Figure 24-55, specify the project group you want to create the architecture definition for, and specify the type of data set the Admin Toolkit is to store the architecture definition into. Select the radio button, Create New Architecture Definition, and then click Next as shown in Figure 24-55.
632
When the window, Create Architecture Definition, is displayed, provide the following information to create an architecture definition: The Architecture Definition Name should be the PDS member name that gets generated into the data set name provided on the previous panel Select the check box Multiple Architecture Definition if you will be creating more than one architecture definition at the same time. To view the task flow to create one architecture definition at a time, view the section Creating an ARCHDEF from JCL on page 639. Specify the Kind of architecture definition to create Specify the Language in the project that the Admin Toolkit is to use to create the architecture definition Specify the language to use as the Linkage Editor Language Tell the Admin Toolkit where SCLM is to put the output from building the architecture definition Tell the Admin Toolkit where SCLM is to place the listing from building the architecture definition Select the Authorization Code to use with the artifacts defined to this architecture definition Specify an optional Change Code to associate with this architecture definition Specify the Mode to use when creating this architecture definition Select the radio button, Create from existing JCL, and click Next as shown in Figure 24-56.
633
Figure 24-56 The Create Architecture Definition window specifies how to create the ARCHDEF
Note: When the check box Multiple Architecture Definition is selected, the Admin Toolkit will create multiple architecture definitions of the same kind using the same parameters for all ARCHDEFs. If you must specify different parameters for any of the architecture definitions you will create, you must create those architecture definitions separately. Because the check box, Multiple Architecture Definitions, was selected on the previous window, the window, Multiple ARCHDEF Creation, appears. This allows you to select the project artifacts to include, as shown in Figure 24-57. Upon initially entering this window, the area, Selected Members, will be blank. To add artifacts to the Architecture Definition Wizard, click Add.
634
When the window, Data set Selection Dialog appears, as shown in Figure 24-58, provide the data set name that contains the artifact you want to include. The data set name may be partially wild carded. Click Browse to see a list of data set names matching the pattern provided. These will be displayed in the left-hand frame, Data Set Name. When a data set in the left-hand frame is selected, the associated members will be displayed in the right-hand frame, Member Name. You can select multiple members from the right-hand frame by holding down the Control key while selecting your choices. When you have selected all artifacts you wish to include, click OK.
635
If you must include members from multiple data sets, simply click Add from Figure 24-57 on page 635, specify the data set name, and then its members. Once you have included all members to create architecture definitions for, specify the Source Type of the members. You can only create multiple architecture definitions on artifacts of the same kind. In this example, the artifacts are all LOAD module members. If you must create an architecture definition for an artifact that is of another Source Type, you must create it separately. To Remove an artifact from the Architecture Definition Wizard, simply highlight the data set and member name in the left-hand side of the frame and click Remove. When you have finished adding members to the list, click Next as shown in Figure 24-59.
Figure 24-59 Specify the members to include in the Architecture Definition Wizard
The Architecture Definition Wizard creates the ARCHDEFs and returns a report displaying the status of the architecture definitions as shown in Figure 24-60.
Figure 24-60 The status of creating the ARCHDEFs is returned for your review
636
To view these or any other architecture definitions that have been created for a project, specify the group and data set type to view, and select the radio button, List Architecture Definition. Then click Next as shown in Figure 24-61.
A list of available architecture definitions will be returned for you to make a selection. Highlight an Architecture Definition, then click Next as shown in Figure 24-62.
637
The architecture definition is displayed in an editor where changes to the architecture definition can be made as shown in Figure 24-63.
Click Finish to save your changes and exit from the Architecture Definition Wizard.
638
Provide the options to be used to create the architecture definition as shown in Figure 24-65 on page 640. For a description of the parameters in this window, see the section Creating an ARCHDEF from a load module on page 632. When you have completed specifying the options to use in creating the architecture definition, select the radio button, Create from existing JCL, then click Next.
639
Figure 24-65 The Create Architecture Definition specifies how to create the architecture definition
The Create Architecture Definition window displays a Data Set Name field for you to specify the data set and member name to create the architecture definition for. The data set name can be wild carded with an asterisk. Click Browse to locate the data set as shown in Figure 24-66.
640
Figure 24-67 shows the matching data set names to the pattern provided in as well as the members for which to create the architecture definition. When a data set name is highlighted in the left-hand frame, the corresponding members are displayed in the right-hand frame. Select a member, and click Next.
When the window, Create Architecture Definition, is re-displayed, the data set and member name will be listed in the field, Data Set Name. In the field, Source Types, use the Control key to highlight the data sets where the components can be found for the artifact you are creating an architecture definition for. Then click Next as shown in Figure 24-68.
Figure 24-68 The Source Type field specifies where the artifacts associated assets can be found
641
When the generated architecture definition is returned, as shown in Figure 24-69, the comment Generated by JCL2ARCHDEF indicates that the architecture definition was created by parsing JCL. You can make any necessary edits here and your changes will be saved in the specified data set and member name displayed on the Architecture Definition Editor window.
Click Finish to save your changes and exit from the Architecture Definition Wizard.
642
Figure 24-70 Specify the group and type of data set to create the architecture definition into
The window, Create Architecture Definition, appears. Provide the options to be used to create the architecture definition as shown in Figure 24-71. For a description of the parameters in this window, see the section Creating an ARCHDEF from a load module on page 632. When you have completed specifying the options to use in creating the architecture definition, select the radio button, Create within a text editor, then click Next.
643
Figure 24-71 The Create Architecture Definition window specifies how to create the ARCHDEF
When the window, Architecture Definition Editor, is displayed in Figure 24-72, you can type in the architecture definition text as needed. Your changes will be saved in the specified data set and member name displayed on the Architecture Definition Editor window.
Click Finish to save your changes and exit from the Architecture Definition Wizard.
644
24.7 The EAC Manager and RACF data set profile feature
The SCLM Administrator Toolkit workstation-based user interface contains a feature called the EAC Manager. EAC is the SCLM Advanced Edition product called Enhanced Access Control for SCLM for z/OS. Enhanced Access Control is a product that works in conjunction with RACF to provide security at a program level. Users can define profiles to provide greater security for SCLM and its resources so that authorized modifications to SCLM-managed source code can only be made by an SCLM user or program. The Administrator Toolkit provides a GUI interface for EAC in which users can view access violations, create or edit EAC profiles and add new feature/function pairs. Even though the RACF Data Set Profile node appears under the EAC Manager, you do not have to have EAC installed to create and edit RACF Data Set Profiles. In order to use EAC in the Administrator Toolkit GUI, a Rules File must be specified, and you must have RACF SPECIAL authority. Note: EAC does not have to be installed in order to use the RACF Data Set Profile feature. RACF profiles may be accessed via the Admin Toolkit independent of the EAC Manager feature.
645
With the EAC Manager, you can: Click Profiles to view, edit, create or delete EAC profiles Click Applications to view, edit, create or delete EAC Application/Function pairs Click Violations to view EAC violations
Figure 24-75 You can only Edit a profile if you have authority to do so
646
To edit an existing profile, highlight a profile and then right-click to open a pop-up menu. Select Edit. The EAC Profile Dialog window opens allowing you to edit the profile if you have authority to do so.
When the EAC Profile Dialog window opens as shown in Figure 24-77, specify the following information to create a new EAC Profile: The RACF data set Profile you want to create an EAC Profile for An optional description for the profile The Application/Function pair you want the profile to monitor The user IDs and corresponding access that the profile is to allow
647
When you select the Application/Function pair button, Add, the Application Selection Dialog window opens allowing you to select the application/function pair to use for the EAC profile. An Application/Function pair is a combination of the application you are specifying access to, and the function during which EAC is to enforce the access granted in the profile. Specify the following information on the Application Selection Dialog window as shown in Figure 24-78: The Application/Function that you want added to the EAC Profile The user ID and type of access to grant for the application and function
Figure 24-78 Select the Application/Function pair and the access to grant
Once the required fields are specified, click OK. The EAC Profile Dialog window is displayed with your options filled in. Once you are done specifying the options for your new EAC profile, click OK. The Profiles listed in the Remote Systems View will refresh, showing your newly created EAC profile in the list, as shown in Figure 24-79.
648
Figure 24-79 The new Profile appears in the Remote Systems View
649
To edit an EAC Application, highlight the application name in the Remote Systems View, then right-click the application to access the pop-up menu. Click Edit. When the EAC Application Dialog window opens, you can edit the applications options if you have authority to do so.
650
When the EAC Application Dialog window is displayed as shown in Figure 24-84 on page 651, you can specify the following options to create a new application: The name of the application The name of a function that will be performed within this application A description for the application/function The name of the high and low programs within a program chain that should be associated with this EAC application Click Add Programs to add the high/low program pair to the application, as shown in Figure 24-84. To remove a high/low program pair, highlight the program pair, then click Remove Programs to have them removed from the defined application.
When you have completed defining the parameters to the EAC application you are creating, click OK. The Remote Systems View will display your newly created Application in the tree as shown in Figure 24-85. 651
652
Select the violation you want to view, and then click Next as shown in Figure 24-88.
The Validation Detail Dialog window displays the following information about the violation you selected, shown in Figure 24-89: The fully qualified data set name that EAC used to validate a users access on the resource. The application definition that EAC used to validate a users access on the resource. The function that was defined to the application The user ID or RACF group ID that EAC used to validate a users access on the resource.
653
Click Next to view more information about the violation. The continuation of the Validation Detail Dialog panel displays the following information on the violation you are viewing, as shown in Figure 24-90: The reason for the violation The name of the object that access was attempted on, either the profile name or the data set name that was accessed The date and time the access was attempted The user ID that requested the access The name of the RACF current connect group associated with the access request The access that is required by RACF to allow a request to process The actual privilege returned to RACF by EAC The program in control when the data set access was attempted
654
Click OK to close the Violations Detail Dialog window and return to the Remote Systems View to view another violation.
655
To view a RACF profile, highlight an existing profile, and right-click to get a pop-up menu. Then select View, as shown in Figure 24-92.
Figure 24-92 Select VIEW to see how a RACF profile was defined
To edit a RACF profile, either highlight an existing profile and right-click it to get a pop-up menu. Select Edit to edit the RACF Profile. Or, double-click a RACF profile to open the RACF Data Set Profile Wizard panels. When the RACF Data Set Profile Wizard appears, it will display the options that were specified for the RACF Data Set Profile when it was created. To create a new RACF Data Set Profile, right-click the node RACF Data Set Profile to receive a pop-up menu. Select option New, then select RACF Data Set Profile, as shown in Figure 24-93.
656
The RACF Data Set Profile Wizard opens with the first window. The following information can be specified to create a new RACF Profile: Specify a RACF Profile name up to 44 characters long Set SETROPTS if you want a refresh to update any changes to this profile Set the Warning option if you want to allow users to access the resource but receive a warning message of the violation Set the Erase option if z/OS data management is to physically erase the DASD data set extents if the data set defined to this profile is deleted. Specify the Universal Access for the resource defined in this profile Specify Your Access to this data set Specify the Owner of the profile, either a user ID or a group ID Specify the user ID or group ID to Notify if access to the data set is denied Specify the Resource Owner of the data set that this RACF Profile is defined on Specify the name of the group under which this profile was Created Specify the Dataset profile Type Specify the Unit type that the data set resides on If this is a VSAM data set, then provide the Volume that the data set resides on Specify the security Retention Period Specify the Security Level, which is the minimum level required to access a resource defined by this profile Specify the Security Label that identifies the security category When you have completed entering in the values you want to create your RACF data set profile with, click Next to proceed to the next Wizard window as shown in Figure 24-94.
657
The second window in the RACF Data Set Profile Wizard is displayed with options to define auditing functions, as shown in Figure 24-95. You can specify the following parameters: A security Category name that represents the security level needed to access the RACF resource. Your installation has its own security categories defined. Check with your RACF Administrator for valid security categories. The type of Auditing that should be monitored for all requests on the resource defined to the profile. The type of Access requests that should be monitored. Once you have entered a Category name, click Add to add it to the profile. Also define in your profile what actions should be audited. For example, you can choose to audit only those failed attempts to UPDATE a resource protected by the profile. In this example, select FAILURE from the left-hand drop-down menu under the Auditing section of the window, and then select UPDATE from the right-hand drop-down menu. Then click Add to include the audit in your profile. For both sections of the Wizard window, you can remove a security Category or an Audit action by highlighting the item to remove, then clicking Remove.
Figure 24-95 Specify the auditing parameters for the RACF Profile
When you have set all options you need, click Next to proceed to the last panel in the RACF Data Set Profile Wizard, as shown in Figure 24-96. The last Wizard panel lets you define an access list. On this window, you can provide the following information.
658
Under the area, Standard Access List: Specify the specific user ID and access that the user can have for the resources protected by the profile. Under the area, Conditional Access List: Select the box next to Conditional Access. Specify the User ID or group ID and the type of access to grant. Specify the Key and Value combination to allow a more granular access to the protected resource.. The Conditional Access List is an additional set of criteria that must be met in order for the specified user ID or group ID to access the resource protected by the RACF profile. In the example shown in Figure 24-96 on page 659, the user MDSTIT has READ access to the specified resource in the profile but only if program AUZCPYCB is executing. User MDDECRB has UPDATE access to the resource with no additional conditions.
659
When you have completed setting all options for the new RACF Data Set Profile, click the Finish button. You should now see your new RACF profile in the list in the Remote Systems View as shown in Figure 24-97.
660
25
Chapter 25.
661
662
Select SCLM from the menu bar above, then click Clone Project, as shown in Figure 25-2.
When the Clone Project Utility is selected from the SCLM pull-down menu, a pop-up window, Clone SCLM Project, as shown in Figure 25-3, allows you to specify the following options: The field, Cloning Project Name, is the name of the project you are making a copy of. In our example, we copy project SCLM07. The field, New Project Name, is the name of the project to be created. In our example, we create project CSJENNA and copy everything from SCLM07 into CSJENNA. The field, Is the new project an alternate? is asking if the new project, CSJENNA, is an alternate of the base project, SCLM07. The field, Include project data? is asking if you want to copy the application source data for project SCLM07 into project CSJENNA. The field, New Alternate Name, is only applicable if the option, Is The New Project an Alternate? is selected. Otherwise, it is ignored. By selecting the Include Project Data option, you are permitting the Admin Toolkit to copy all Group/Type data sets and their source code from SCLM07 to CSJENNA so that an exact copy of the application source code being developed in project SCLM07 will exist in project CSJENNA. This allows you to begin development effort on a new application using the source code that is already available. If the option is not selected, then only the project definition data sets (<project>.PROJDEFS.*) from project SCLM07 are copied.
663
Figure 25-3 Specify a new project name, and copy the project data
Once you have clicked OK, the SCLM Admin Toolkit processes your request by copying all SCLM07 project data sets and application source code data sets, and creates data sets beginning with CSJENNA to complete the new project. Figure 25-4 shows the new project CSJENNA in the Remote Systems View frame and opens the project for you to review in the Project Editor frame. Notice that project SCLM07 is still open. Now that we are done using project SCLM07, close that project in the Project Editor frame by clicking the X in the upper right-hand corner of the Project window.
Figure 25-4 The new project is displayed in the Project Editor frame
664
Figure 25-5 The Control Data Sets tab allows you to edit Accounting and Auditing files
The Accounting Dialog window in Figure 25-6 displays the primary control options already established for the project. In this window, you can specify the following information: The Name field defaults to Primary if this is the primary control information. The Data Set Name field is the pattern to use for the application source code data sets when versioning is used. The Primary Accounting data set is the name of the accounting file that will track the activity for the application source code. It contains information such as statistics, dependency information and build maps. The Secondary Accounting field is the backup accounting data set that may be used should something happen to the primary file.
665
The Export Accounting field is the name of the data set that contains information that has been exported from the accounting data set. The Control Data Set contains information about the projects PDS members should they need to be backed up. The Primary Auditing data set is needed when SCLMs auditing capability will be used to track actions on project members The Secondary Auditing file is a backup data set that may be used should something happen to the primary auditing file. The Version Data set field specifies a pattern to use for the PDS data sets that are to have changes tracked. The Version to Retain field specifies the number of PDS data sets to retain. When all options have been specified, click OK.
Figure 25-6 Accounting and auditing data sets track project activity
To add alternate control information, select the radio button next to the option Alternate Control Information on the Control Data Sets tab, and then click the Add button. The Accounting Dialog window in Figure 25-6 displays a blank window for you to provide the alternate control options.
666
Adding a new group to a hierarchy can affect several other groups within the project hierarchy, because the structural promotion path is affected. Each group affected by the newly-added group must be edited to re-establish the promotion path, and permissions must be altered to accommodate the addition of a new group to the project. The Admin Toolkit can simply add a new group to an existing project hierarchy because it automatically updates the affected groups when a new group is added. To add a new group to a project, select the Groups tab in the Project Editor. The project hierarchy appears as a series of linked boxes with the arrows indicating the direction of the hierarchy. To add a new group, enter the new group name in the field Group Name at the top of the frame, then click the Add button. In this example, the group DEVTEST is being added as shown in Figure 25-7.
Figure 25-7 The existing project hierarchy was cloned from another project and may be edited
Once the Add button is clicked, the new group will appear in the tab highlighted in blue. To insert the new group into the hierarchy, right-click the new group box, then right-click the group box you want to be the parent, and a directional arrow will appear between the new group and the parent group you selected. In our example, the group DEVTEST is going to be an integration test group for the development groups and will promote to the group TEST, as shown in Figure 25-8. To establish the hierarchy for the development groups to promote to the new group DEVTEST, click a lower-level development group so that the group box turns blue. Right-click the development group, then right-click DEVTEST. The directional arrow will appear between the development group and the group DEVTEST.
667
To edit the parameters defined for a group, either double-click the group box, or click a group box so that it is highlighted in blue, then click the Edit Group button. The Group Dialog box is displayed. In the Group Dialog box, you can specify the following parameters: The Group name cannot be changed because you are editing this group, not creating it. The Promotes to Group option tells SCLM where the project is in the hierarchy. It specifies which group will receive the code from the selected group when promotes or copies are done. The Alternate Control Options are those project control options the group is to use in place of the Primary Control Options. The Backout Groups name specifies the package backout group defined in the project. The Key check box indicates that data moved to this group is erased from its previous group when it is promoted. If this box is not checked, then data moved to this group is copied upon promotion. The Member Restore check box indicates SCLM will restore individual members rather than a package The Authorizations section of the Group Dialog box allows you to Add Auth Codes to the group. The Available Auth Groups are listed in the left-hand frame, and the Selected Auth Codes are listed in the right-hand frame and will be used for this group in the project. When you have completed editing parameters for this group, click OK, as shown in Figure 25-9.
668
Figure 25-9 These are the defaulted options for the new group in the hierarchy
Figure 25-10 Select the data set group/type combinations to include for the new group
669
Select the data set group/type combinations from the left-hand frame that you want to include in the project for the new group. You can select multiple data sets by holding down the Control key and clicking the data sets you want. When you have selected all the data sets you want to create, click the single right-hand arrow ( > ) to move the selected data sets to the right-hand frame, Group/Type Allocations. You will see the selected data sets in the right-hand frame. The Admin Toolkit will automatically create the new group/type data sets when the project source definition is updated.
The Language Definition Wizard window appears allowing you to make any necessary edits. In this example, we must change the data set specifications in the Translator Call Name $J2EEANT. Click Next until the Translator Summary is displayed. On the Translator Summary panel, shown in Figure 25-12, highlight the Translator Call Name $J2EEANT, and click the Edit button.
670
On the Translator Parameter window, the field Data Set Name must have its value changed from the value SCLM07.TEST.LOAD to CSJENNA.DEVTEST.LOAD as shown in Figure 25-13 and Figure 25-14.
Figure 25-13 Change the field Data Set Name to reflect the new correct
671
Figure 25-14 Change the Data Set Name to the new source code data set
When the Language Definition window, Finish Language Definition, is displayed, click the Finish button exit from the Language Definition Wizard. Each of the Language Definitions that reside in <project>.PROJDEFS.SOURCE data set must be checked to ensure that the customizations made for project SCLM07 are changed for new project CSJENNA.
672
A window with the title of the User Exit will appear, as shown in Figure 25-16, allowing you to change the parameters defined in the User Exit. In this example, the Load Data Set field contains a value that refers to the project SCLM07 that was cloned.
Figure 25-16 Change any values that do not apply to the new project
Change the data set name to reflect the new projects REXX data set, the click OK, as shown in Figure 25-17.
673
Continue editing the remaining user exits to tailor the parameters for the new project.
674
Figure 25-19 The Project Definition Markup Language updates the project source
For example, in the project data set CSJENNA.PROJDEFS.SOURCE(CSJENNA), there is a section that defines the GROUPS in the project. The PDML reflects the change we made to accommodate the new group DEVTEST that was added after cloning project SCLM07. After the build is complete, the projects SOURCE data set contains an updated CSJENNA member with the new group DEVTEST, as shown in Figure 25-20.
675
CSJENNA * * * * * * * * * * DEV1
FLMGROUP PROMOTE=DEVTEST, KEY=Y, AC=(P) DEV2 FLMGROUP PROMOTE=DEVTEST, KEY=Y, AC=(P) DEVTEST FLMGROUP PROMOTE=TEST, KEY=Y, AC=(P) TEST FLMGROUP PROMOTE=PROD, KEY=Y, AC=(P) PROD FLMGROUP KEY=Y, AC=(P) EMER FLMGROUP PROMOTE=PROD, KEY=Y, AC=(EMER) ....
Figure 25-20 The updated CSJENNA source member now contains the new group DEVTEST
676
Migrating an artifact from a z/OS host into an SCLM-managed project on a z/OS host
To begin migrating artifacts from a z/OS host, select SCLM from the menu bar, then select Migration Wizard, as shown in Figure 25-21.
Figure 25-21 Select Migration Wizard to begin migrating an artifact into the open project
The initial Migration Wizard window is displayed, allowing you to add artifacts. Click the Add button to the right-hand side of the frame to begin adding artifacts into the Migration Wizard, as shown in Figure 25-22.
677
Figure 25-22 Select Add to specify artifacts to migrate into the open project
The Data set Selection Dialog window appears allowing you to specify the data set or data sets from which you want to migrate artifacts. The Browse button allows you to search for a partially qualified data set name. The Member Name frame contains the corresponding members from the selected data set. Highlight the members you want to migrate. You can select multiple members by holding down the Control key while clicking the member names. Once you have selected the member or members you want to migrate, click OK to continue as shown in Figure 25-23.
Figure 25-23 Select the member or members to migrate into the open project
678
When you have clicked OK, you are returned to the Migration Assets window with the specified data set and member name filled in. Click Next to continue, as shown in Figure 25-24.
Figure 25-24 The selected artifacts are filled in the Migration Assets window
On the Migrate Asset Option window, specify the following information as shown in Figure 25-25: The Group to migrate artifacts into The data set type the members should be migrated into The language that SCLM is to use for the new artifacts being migrated into the project The authorization code that is to be used for the artifacts Optionally, the change code to use with the artifacts The Mode that is to be used to migrate the artifacts The date and time that is to be used to timestamp the artifacts
679
Figure 25-25 Specify the Migration parameters that are to be used for all artifacts
When all options have been set for the selected artifacts, click Next to begin the migration. When the migration has completed, you will receive a migration report as shown in Figure 25-26.
The Migration Report window may be expanded to view more of the migration report. The scroll bars may also be used to view the complete report.
680
Migrating an artifact from a remote system into an SCLM-managed project on a z/OS host
To begin migrating artifacts from a z/OS host, select Window from the menu bar, then select Open Perspective, as shown in Figure 25-27. Note: The Remote Migration Wizard is only available in the workstation-based user interface.
Figure 25-27 Navigate to the perspective that will allow you to access your remote assets
In this example, artifacts are being migrated from another Java project. Select the Java perspective and click OK as shown in Figure 25-28.
Figure 25-28 Select the perspective that will allow you to access your remote assets
681
The Resource perspective will open in place of the Remote Systems View perspective. Select the Java project you want to migrate artifacts from to expand it. Find the artifacts you want to migrate by holding the Control key and clicking the artifacts. Right-click the mouse button to see the additional menu appear. Then select Team. When Team is selected, the option Migrate to SCLM will be visible to select as shown in Figure 25-29.
Figure 25-29 Highlight the artifacts to migrate, and right-click to get to the Migrate function
The SCLM Remote Migration Wizard window opens allowing you to select as many artifacts as you want to migrate. When you have finished, click Next. When the Resource Selection window appears, highlight the artifacts you want to migrate. Click Next as shown in Figure 25-30.
682
The window Migration Project opens asking you to select the host system you want to migrate your artifacts to. In addition, select the project name to migrate the artifacts into. Click Next. If you are not already logged into the host system you want to migrate artifacts into, the Administrator Toolkit will ask you to log in as shown in Figure 25-31.
Figure 25-31 Log into the host system you want to migrate the artifacts into
The Migration Options window opens, and appears similar to the Migration Options window for migrating non-remote artifacts as seen in Figure 25-25 on page 680. Provide the following information as shown in Figure 25-32: The Development Group to migrate artifacts into The authorization code that is to be used for the artifacts Optionally, the change code to use with the artifacts The Mode that is to be used to migrate the artifacts The date and time that is to be used to timestamp the artifacts
683
Click Next when you have provided all necessary parameters. The window Migration File Extension Mapping opens and will display all types of file extensions of those artifacts being migrated in. For example, if you chose to migrate a *.class file type and a *.html file type, they would be listed underneath the file type Java under the column File Extension. Specify the SCLM Type of data set that the Java files should be migrated into. In addition, tell SCLM what language it should use for the artifact once it is in the project. Note: If there is not a suitable language for the artifacts you are migrating in, you must first add a language to the project, then migrate the remote artifacts into the project. The option Perform File Truncation Checking checks the length of the file name to ensure it adheres to the host systems requirement of keeping data set member names to eight characters or less. If an artifact is found to have a name longer than eight characters, the name is truncated and written to a translation table where its original file name is mapped to its newly truncated name. In this way, artifacts whose file names do not adhere to the 8-character limit can still be migrated into an SCLM-managed project with their unique file name as shown in Figure 25-33.
Figure 25-33 Specify the data set type and SCLM language to use for the artifacts
Once the options have been specified in the Migration File Extension Mapping window, click Next. The artifact names are written to a translation table if they are longer than 8 characters. They are then written to a host-based file and migrated into the project from the file they were written to. A migration report will be returned for your review once the migration has been completed, as shown in Figure 25-34.
684
To view the migrated artifacts that now reside in your SCLM-managed project data sets, you can go to an ISPF Data Set List Utility to view the members.
685
Figure 25-35 Select Architecture Definition Wizard from the pull-down menu
When the Architecture Definition Wizard opens, as shown in Figure 25-36, specify the project group you want to create the architecture definition for, and specify the type of data set the Admin Toolkit is to store the architecture definition into. Select the radio button, Create New Architecture Definition, and then click Next.
686
When the window, Create Architecture Definition, is displayed as shown in Figure 25-37, provide the following information to create an architecture definition: 1. The Architecture Definition Name should be the PDS member name that gets generated into the data set name provided on the previous panel. In this case, we will create an architecture definition called ARCHDEF2. 2. Specify the Kind of architecture definition to create. In our example, we will create a Link-Edit Control architecture definition. 3. Specify the Language in the project that the Admin Toolkit is to use to create the architecture definition. Our example will use language FLM@ARCD, which is a standard language provided by base SCLM. We renamed this language in our project to ARCHDEF. 4. Specify the language to use as the Linkage Editor Language. Our example will use language FLM@L370, which is a standard language provided by base SCLM. We renamed this language in our project to LE370. 5. Tell the Admin Toolkit where SCLM is to put the output from building the architecture definition. Our architecture definition is going to create a LOAD module, so use LOAD as the type of output data set. 6. Tell the Admin Toolkit where SCLM is to place the listing from building the LOAD module. Our example will use LMAP as the type of output data set. 7. Select the Authorization Code to use with the artifacts defined to this architecture definition. 8. Specify an optional Change Code to associate with this architecture definition. 9. Specify the Mode to use when creating this architecture definition. Select the radio button, Create within a text editor, and click Next.
Figure 25-37 The Create Architecture Definition window specifies how to create the ARCHDEF
687
When the window, Architecture Definition Editor, is displayed, we type in the architecture definition text that we need to build a load module. Our changes will be saved in the specified data set and memberCSJENNA.DEV1.ARCHDEF(ARCHDEF2) displayed on the Architecture Definition Editor window as shown in Figure 25-38.
This architecture definition tells base SCLM how it is to process the artifacts SAMPLE1 and SAMPLE2 during a build. This architecture definition is a Link-Edit Control architecture definition and contains instructions on how to produce a complete load module. The keyword LKED identifies the language to be used to process the contents of the architecture definition. In our example, the language that will be used is LE370. The keyword LOAD indentifies the load module name to be created and the type of data set to place the completed load module. The keyword LMAP is optional, but tells base SCLM what group/Type data set to put the linkage editor listings. The value for this example is LMAP. The keyword INCLD identifies other source members that this architecture definition references. The referenced members will be processed before this architecture definition, and their output will be used to create the load module. The keyword PARM passes options to the linkage editor. Click Finish to save your changes and exit from the Architecture Definition Wizard.
688
Part 7
Part
Appendixes
689
690
Appendix A.
Chapter 1 listings
Example: A-1 SCLM01.PROJDEFS.SOURCE(ALLOCDS)
//SCLMADM$ JOB (ACCT#),'ALLOC-DSN',CLASS=A,REGION=4096K, // MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID //*-------------------------------------------------------------------* //* SCLM01.PROJDEFS.SOURCE(ALLOCDS) * //* //* DELETE AND REALLOCATE THE DEMO BASE AND VERSION FILES. * //*-------------------------------------------------------------------* //* //*-------------------------------------------------------------------* //* PROC TO ALLOCATE FIXED OUTPUT LIBRARIES * //* LMAP * //*-------------------------------------------------------------------* //FB121 PROC FILE= //STEP1 EXEC PGM=IEFBR14 //DD01 DD DSN=&FILE, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(CYL,(2,10,10)), // DCB=(RECFM=FBA,LRECL=121,BLKSIZE=0) // PEND //*-------------------------------------------------------------------* //* PROC TO ALLOCATE VARIABLE BLOCK OUTPUT LIBRARIES * //* SOURCLST * //*-------------------------------------------------------------------* //VB137 PROC FILE= //STEP1 EXEC PGM=IEFBR14 //DD01 DD DSN=&FILE, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(CYL,(2,10,10)), // DCB=(RECFM=VBA,LRECL=137,BLKSIZE=0) // PEND //*-------------------------------------------------------------------*
691
//* PROC TO ALLOCATE FIXED OUTPUT LIBRARIES * //* OBJLIB, SOURCE, COPYLIB, ETC. * //*-------------------------------------------------------------------* //FB80 PROC FILE= //STEP1 EXEC PGM=IEFBR14 //DD01 DD DSN=&FILE, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(CYL,(1,5,10)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0) // PEND //*-------------------------------------------------------------------* //* PROC TO ALLOCATE FIXED OUTPUT LIBRARIES * //* LOADLIB * //*-------------------------------------------------------------------* //LOAD PROC FILE= //STEP1 EXEC PGM=IEFBR14 //DD01 DD DSN=&FILE, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(CYL,(2,10,10)), // DCB=(RECFM=U,LRECL=0,BLKSIZE=6144) // PEND //*-------------------------------------------------------------------* //* NOW DO THE ALLOCATES * //*-------------------------------------------------------------------* //FILE01 EXEC FB80,FILE=SCLM01.DEV1.ARCHDEF //FILE02 EXEC FB80,FILE=SCLM01.DEV1.OBJ //FILE03 EXEC FB80,FILE=SCLM01.DEV1.SOURCE //FILE04 EXEC FB80,FILE=SCLM01.DEV1.PLINCL //FILE05 EXEC FB80,FILE=SCLM01.DEV1.COPYLIB //FILE06 EXEC FB80,FILE=SCLM01.DEV1.MACROS //FILE07 EXEC LOAD,FILE=SCLM01.DEV1.LOAD //FILE08 EXEC VB137,FILE=SCLM01.DEV1.LIST //FILE09 EXEC FB121,FILE=SCLM01.DEV1.LMAP //* //FILE11 EXEC FB80,FILE=SCLM01.DEV2.ARCHDEF //FILE12 EXEC FB80,FILE=SCLM01.DEV2.OBJ //FILE13 EXEC FB80,FILE=SCLM01.DEV2.SOURCE //FILE14 EXEC FB80,FILE=SCLM01.DEV2.PLINCL //FILE15 EXEC FB80,FILE=SCLM01.DEV2.COPYLIB //FILE16 EXEC FB80,FILE=SCLM01.DEV2.MACROS //FILE17 EXEC LOAD,FILE=SCLM01.DEV2.LOAD //FILE18 EXEC VB137,FILE=SCLM01.DEV2.LIST //FILE19 EXEC FB121,FILE=SCLM01.DEV2.LMAP //* //FILE21 EXEC FB80,FILE=SCLM01.TEST.ARCHDEF //FILE22 EXEC FB80,FILE=SCLM01.TEST.OBJ //FILE23 EXEC FB80,FILE=SCLM01.TEST.SOURCE //FILE24 EXEC FB80,FILE=SCLM01.TEST.PLINCL //FILE25 EXEC FB80,FILE=SCLM01.TEST.COPYLIB //FILE26 EXEC FB80,FILE=SCLM01.TEST.MACROS //FILE27 EXEC LOAD,FILE=SCLM01.TEST.LOAD //FILE28 EXEC VB137,FILE=SCLM01.TEST.LIST //FILE29 EXEC FB121,FILE=SCLM01.TEST.LMAP
692
//* //FILE31 //FILE32 //FILE33 //FILE34 //FILE35 //FILE36 //FILE37 //FILE38 //FILE39 //*
EXEC FB80,FILE=SCLM01.PROD.ARCHDEF EXEC FB80,FILE=SCLM01.PROD.OBJ EXEC FB80,FILE=SCLM01.PROD.SOURCE EXEC FB80,FILE=SCLM01.PROD.PLINCL EXEC FB80,FILE=SCLM01.PROD.COPYLIB EXEC FB80,FILE=SCLM01.PROD.MACROS EXEC LOAD,FILE=SCLM01.PROD.LOAD EXEC VB137,FILE=SCLM01.PROD.LIST EXEC FB121,FILE=SCLM01.PROD.LMAP
//SCLMADM$ JOB (ACCT#),'ALLOC-DSN',CLASS=A,REGION=4096K, // MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID //*-------------------------------------------------------------------* //* SCLM01.PROJDEFS.SOURCE(ALLOCVER) * //* //* ALLOCATE THE SAMPLE VERSION FILES. * //*-------------------------------------------------------------------* //* PROC TO ALLOCATE VARIABLE BLOCK VERSION LIBRARIES * //* VERSION.* * //*-------------------------------------------------------------------* //VB259 PROC FILE= //STEP1 EXEC PGM=IEFBR14 //DD01 DD DSN=&FILE, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(CYL,(4,20,10)), // DCB=(RECFM=VB,LRECL=259,BLKSIZE=0) // PEND //*-------------------------------------------------------------------* //* NOW DO THE ALLOCATES * //*-------------------------------------------------------------------* //FILE21 EXEC VB259,FILE=SCLM01.TEST.ARCHDEF.VERSION //FILE23 EXEC VB259,FILE=SCLM01.TEST.SOURCE.VERSION //FILE24 EXEC VB259,FILE=SCLM01.TEST.PLINCL.VERSION //FILE25 EXEC VB259,FILE=SCLM01.TEST.COPYLIB.VERSION //FILE26 EXEC VB259,FILE=SCLM01.TEST.MACROS.VERSION //* //FILE31 EXEC VB259,FILE=SCLM01.PROD.ARCHDEF.VERSION //FILE33 EXEC VB259,FILE=SCLM01.PROD.SOURCE.VERSION //FILE34 EXEC VB259,FILE=SCLM01.PROD.PLINCL.VERSION //FILE35 EXEC VB259,FILE=SCLM01.PROD.COPYLIB.VERSION //FILE36 EXEC VB259,FILE=SCLM01.PROD.MACROS.VERSION //*
693
Example: A-3 SCLM01.PROJDEFS.SOURCE(FLM@ARCD) *********************************************************************** * FLM@ARCD - ARCHITECTURE DEFINITIONS * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * THIS IS A PARSER TRANSLATOR AND ONLY USED TO GATHER STATISTICS * * FOR THE ARCHITECTURE DEFINITIONS. * * ITS USE IS OPTIONAL. * * * * BE SURE TO ADD DSNAME PARAMETER IF TRANSLATOR LIES IN A PRIVATE * * LIBRARY. * *********************************************************************** * CHANGE ACTIVITY: * * @01 2005/05/16 - ADDED LANGUAGE DESCRIPTION * * * *********************************************************************** FLMLANGL LANG=ARCHDEF,ARCH=Y,VERSION=1, C LANGDESC='ARCHITECTURE DEFINITION' * FLMTRNSL CALLNAM='ARCHDEF PARSER', C FUNCTN=PARSE, C COMPILE=FLMLSS, C PORDER=1, C OPTIONS=(PTABLEDD=, C SOURCEDD=SOURCE, C TBLNAME=FLMPALST, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C CONTIN=0, C EOLCOL=72) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * 5694-A01 (C) COPYRIGHT IBM CORP 1980, 2006
694
*********************************************************************** * ENTERPRISE COBOL LANGUAGE DEFINITION FOR SCLM * * * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * COBE FLMSYSLB XXXXX.XXXXX.XXXXX * * FLMSYSLB YYYYY.YYYYY.YYYYY * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * CHANGING THE VERSION FIELD ON FLMLANGL WILL CAUSE ALL MEMBERS TO BE * * OUT OF DATE. EACH MEMBER WILL BE RE-BUILT THE NEXT TIME BUILD IS * * INVOKED. * * * * IF YOU DON'T WANT A COMPILER LISTING, CHANGE THE DDNAME=SYSPRINT * * TO AN IOTYPE=W AND REMOVE THE UNNECESSARY PARAMETERS. * * * * THIS LANGUAGE DEFINITION IS COMPATIBLE WITH THE AD/CYCLE COBOL * * COMPILER. * * * *********************************************************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * * --------------------------------------------------------------------* * M42P2691 1994/04/26 - : CHANGED DFLTTYP=COMPLIST TO LIST TO * * MATCH TYPES DEFINED IN EXAMPLE PROJECTS. * * $01 OW03966 - : V4.1 DEVELOPMENT APAR * * $02 OA17586 2006/09/29 RX: REMOVED COB2 COMMENTS, TSLINL, TSSEQP. * * * *********************************************************************** * FLMLANGL LANG=COBE,VERSION=D071115,ALCSYSLB=Y, C LANGDESC='ENTERPRISE COBOL' * *********************************************************************** * --INCLUDE SET SPECIFICATION FOR SAMPLE PROJECT SCLM01-* *********************************************************************** * FLMINCLS TYPES=(COPYLIB) *
Appendix A. Chapter 1 listings
695
* *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C CALLMETH=LINK, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --ENTERPRISE COBOL INTERFACE-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE COBOL COMPILER', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C DSNAME=ECOBOL.V340.SIGYCOMP, C VERSION=3.4.0, C GOODRC=4, C PORDER=1, C OPTIONS=(XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, C RECNUM=5000,DFLTTYP=OBJ * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC * FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT2,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT3,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT4,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT5,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT6,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT7,RECNUM=5000 * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE
696
Example: A-5 SCLM01.PROJDEFS.SOURCE(FLM@HLAS) *********************************************************************** * HIGH LEVEL ASSEMBLER LANGUAGE DEFINITION FOR SCLM * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * HLAS FLMSYSLB XXXXX.XXXXX.XXXXX * * FLMSYSLB YYYYY.YYYYY.YYYYY * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * CHANGING THE VERSION FIELD ON FLMLANGL WILL CAUSE ALL MEMBERS TO BE * * OUT OF DATE. EACH MEMBER WILL BE RE-BUILT THE NEXT TIME BUILD IS * * INVOKED. * * * * IF YOU DON'T WANT A COMPILER LISTING, CHANGE THE DDNAME=SYSPRINT * * TO AN IOTYPE=W AND REMOVE THE UNNECESSARY PARAMETERS. * * * *********************************************************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * * --------------------------------------------------------------------* * $01 2006/10/20 - : ADD LANGUAGE DESCRIPTION. * * $02=OA17586 2006/11/17 RX: SPECIFIED SYSPRINT AS FBA 121. REMOVED * * OS/VS COMMENTS. UPDATED HIGH LEVEL ASSEMBLER VERSION * * FROM 1 TO V1R5. * * *
697
*********************************************************************** HLAS FLMSYSLB SYS1.MACLIB * FLMLANGL LANG=HLAS,VERSION=D071123,ALCSYSLB=Y, C LANGDESC='HIGH LEVEL ASSEMBLER' * *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** FLMTRNSL CALLNAM='SCLM HLAS PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPGEN, C PORDER=1, C OPTIONS=(SOURCEDD=SOURCE, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C LANG=A) *** THIS IS ASSEMBLER ONLY *** * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --BUILD TRANSLATOR(S)-- --HIGH LEVEL ASSEMBLER INTERFACE-- * *********************************************************************** * FLMTRNSL CALLNAM='HL ASM', C FUNCTN=BUILD, C COMPILE=ASMA90, C VERSION=1.5, C GOODRC=0, C PORDER=1, C OPTIONS=(XREF(SHORT),LINECOUNT(75),OBJECT,RENT) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=9000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=15000 * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, C RECNUM=9000,DFLTTYP=OBJ * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC * FLMALLOC IOTYPE=O,DDNAME=SYSPRINT,KEYREF=LIST,PRINT=Y, C RECFM=FBA,LRECL=121, C
698
DFLTTYP=LIST,RECNUM=20000 * * * 5694-A01 * * * * *
Example: A-6 SCLM01.PROJDEFS.SOURCE(FLM@L370) *********************************************************************** * 370/LINKAGE EDITOR LANGUAGE DEFINITION FOR SCLM * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * ADD FLMCPYLB MACROS FOR EACH 'STATIC' INPUT DATASET FOR LINKEDIT * * PROCESSING, TO THE 'SYSLIB' FLMALLOC MACRO. * * MAKE SURE PORDER=3. THE LINK EDIT USES DD NAME LIST SUBSTITUTION. * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * * *********************************************************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * * --------------------------------------------------------------------* * OY34273 1990/08/10 - : CHANGED LRECL=6144 TO LRECL=0 FOR * * SYSLMOD AND SYSUT1. GT4045 - AAB. * * PTR2783 1993/03/08 - : REMOVED COMMENTED LINES THAT DID NOT * * ADD VALUE. : * * M42SLD 1994/04/26 - : ADDED ADDITIONAL LIBRARIES TO SYSLIB * * CONCATENATION TO SUPPORT CICS ENVIRONMENT. * * OW03966 XXXX/XX/XX - : V4.1 DEVELOPMENT APAR * * Z/OS 1.5 XXXX/XX/XX - : R15DEV DEVELOPMENT CLEAN-UP * * $01=Z/OS 1.8 2005/05/16 -: ADD LANGUAGE DESCRIPTION. * * $02=OA17586 2006/10/23 RX: ADDED CEE.SCEELKED TO SYSLIB * * CONCATENATION TO SUPPORT ENTERPRISE COBOL AND PL/I. * * * *********************************************************************** * FLMLANGL LANG=LE370,CANEDIT=N,VERSION=D071108, C LANGDESC='370/LINKAGE EDITOR' * FLMTRNSL CALLNAM='LKED/370', C FUNCTN=BUILD, C COMPILE=IEWL, C VERSION=F64, C GOODRC=0, C PORDER=3, C OPTIONS=(DCBS,MAP)
699
* *
(* SYSLIN *) FLMALLOC IOTYPE=S,KEYREF=INCL,RECFM=FB,LRECL=80, RECNUM=20000,DDNAME=SYSLIN (* LOAD MODULE NAME *) FLMALLOC IOTYPE=L,KEYREF=LOAD (* SYSLMOD *) FLMALLOC IOTYPE=P,KEYREF=LOAD,RECFM=U,LRECL=0, RECNUM=500,DIRBLKS=20,DDNAME=SYSLMOD (* SYSLIB FLMALLOC FLMCPYLB FLMCPYLB FLMCPYLB FLMCPYLB *) IOTYPE=A,DDNAME=SYSLIB CEE.SCEELKED CICS.TS31.CICS.SDFHLOAD DB2.V810.SDSNLOAD SYS1.LINKLIB
* * * *
* *
* * * *
(* N/A *) FLMALLOC IOTYPE=N (* SYSPRINT *) FLMALLOC IOTYPE=O,KEYREF=LMAP,RECFM=FBA,LRECL=121, RECNUM=2500,PRINT=Y,DDNAME=SYSPRINT (* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N (* N/A *) FLMALLOC IOTYPE=N (* SYSTERM *) FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE
* * * * * *
* * 10 * * 11 * * 12
* * * 5694-A01 *
700
Example: A-7 Figure 1-7. SCLM01.PROJDEFS.SOURCE(FLM@PLIE) *********************************************************************** * ENTERPRISE PL/I COMPILER LANGUAGE DEFINITION FOR SCLM * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * PLIE FLMSYSLB XXXXX.XXXXX.XXXXX * * FLMSYSLB YYYYY.YYYYY.YYYYY * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * CHANGING THE VERSION FIELD ON FLMLANGL WILL CAUSE ALL MEMBERS TO BE * * OUT OF DATE. EACH MEMBER WILL BE RE-BUILT THE NEXT TIME BUILD IS * * INVOKED. * * * * IF YOU DON'T WANT A COMPILER LISTING, CHANGE THE DDNAME=SYSPRINT * * TO AN IOTYPE=W AND REMOVE THE UNNECESSARY PARAMETERS. * * * * THE PL/I COMPILER GIVE OUT A NUMBER OF WARNINGS OFTEN RESULTING * * IN A RETURN CODE OF 4. YOU MIGHT WANT TO ADJUST YOUR GOODRC=0 TO * * GOODRC=4 TO ACCOUNT FOR THIS. * * * *********************************************************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * * --------------------------------------------------------------------* * @01 2005/05/16 - ADDED LANGUAGE DESCRIPTION * * $02=OA17586 2006/08/24 RX: REMOVED PLIPRPX DD. REPALCED * * DDNAME=SYSCIN WITH DDNAME=SYSIN. CHANGED BUILD * * TRANSLATOR PORDER TO 1. SPECIFIED SYSPRINT AS VBA 137. * * * *********************************************************************** FLMLANGL LANG=PLIE,VERSION=PLIEV1.0, C LANGDESC='ENTERPRISE PL/I' * *********************************************************************** * --INCLUDE SET SPECIFICATION FOR EXAMPLE PROJECT SCLM01-* *********************************************************************** * FLMINCLS TYPES=(PLINCL) * *
Appendix A. Chapter 1 listings
701
*********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM PL/I PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPGEN, C PORDER=1, C OPTIONS=(SOURCEDD=SOURCE, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C LANG=I) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --PL/I ENTERPRISE INTERFACE-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE PL/I COMPILER', C FUNCTN=BUILD, C COMPILE=IBMZPLI, C DSNAME=EPLI.V350.SIBMZCMP, C VERSION=3.3.0, C GOODRC=0, C PORDER=1, C OPTIONS=(MACRO,OBJECT,SOURCE,XREF) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ,DFLTTYP=OBJ, C RECNUM=5000 * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC * FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 @02C * 2@02D FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=O,DDNAME=SYSPRINT, C KEYREF=LIST,DFLTTYP=LIST, C RECFM=VBA,LRECL=137, C PRINT=Y,RECNUM=5000 * * * * * 5694-A01 COPYRIGHT IBM CORP 1980, 2007 * *
702
*********************************************************************** * UNTRANSLATED TEXT LANGUAGE DEFINITION FOR SCLM * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * *********************************************************************** * * * CUSTOMIZATION IS NOT REQUIRED. * *********************************************************************** * CHANGE ACTIVITY: * * * * @01 2005/05/16 - ADDED LANGUAGE DESCRIPTION * * * *********************************************************************** FLMLANGL LANG=TEXT,VERSION=TEXTV1.0, C LANGDESC='UNTRANSLATED TEXT' * * PARSER TRANSLATOR * FLMTRNSL CALLNAM='SCLM TEXT PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPGEN, C PORDER=1, C OPTIONS=(SOURCEDD=SOURCE, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C LANG=T) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * * BUILD TRANSLATOR(S) * * 5694-A01 (C) COPYRIGHT IBM CORP 1980, 2006
//SCLMACCT JOB (76T12B0,629,671,T12,,N),'SCLMADM',CLASS=A, // NOTIFY=&SYSUID,MSGCLASS=X //* //* SCLM01.PROJDEFS.SOURCE(SCLMACCT) //* //* DELETE, DEFINE AND INITIALIZE SCLM ACCOUNT FILE. //* //ACCOUNT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD *
703
DELETE 'SCLM01.ACCOUNT.FILE' PURGE CLUSTER DEFINE CLUSTER (NAME('SCLM01.ACCOUNT.FILE') CYL(50 10) KEYS(26 0) RECORDSIZE(264 32000) SHAREOPTIONS(4,3) IMBED SPEED UNIQUE SPANNED) INDEX (NAME('SCLM01.ACCOUNT.FILE.INDEX')) DATA (NAME('SCLM01.ACCOUNT.FILE.DATA') CISZ(2048) FREESPACE(50 50)) /* //INITACCT EXEC PGM=IDCAMS,COND=(4,LT) //INPUT DD * VSAM DATABASE INITIALIZATION RECORD /* //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(INPUT) OUTDATASET('SCLM01.ACCOUNT.FILE') /*
Example: A-10 SCLM01.PROJDEFS.SOURCE(SCLMVERS) //SCLMVERS JOB (76T12B0,629,671,T12,,N),'SCLMADM',CLASS=A, // NOTIFY=&SYSUID,MSGCLASS=T //* //* SCLM01.PROJDEFS.SOURCE(SCLMVERS) //* //* DELETE, DEFINE AND INITIALIZE SCLM VERSION FILE. //* //VERSION EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE 'SCLM01.VERSION.FILE' PURGE CLUSTER DEFINE CLUSTER + (NAME('SCLM01.VERSION.FILE') + CYL(10 10) + KEYS(40 0) + IMBED + RECORDSIZE(264 32000) + SHAREOPTIONS(4,3) + SPEED + SPANNED + UNIQUE) + INDEX(NAME('SCLM01.VERSION.FILE.INDEX') ) + DATA(NAME('SCLM01.VERSION.FILE.DATA') CISZ(2048) + FREESPACE(50 50) + ) /* //********************************************************************* //*
704
//* INITIALIZE THE VERSION CONTROL FILE //* //********************************************************************** //INITVERS EXEC PGM=IDCAMS //INPUT DD * SCLM VERSION CONTROL FILE INITIALIZATION RECORD /* //OUTPUT DD DSN=SCLM01.VERSION.FILE,DISP=SHR //SYSPRINT DD SYSOUT=H //SYSIN DD * REPRO INFILE(INPUT) OUTFILE(OUTPUT) /* //*
Example: A-11 SCLM01.PROJDEFS.SOURCE(SCLM01) TITLE '*** PROJECT DEFINITION FOR SCLM01 ***' SCLM01 FLMABEG * * ************************************************************** * * DEFINE THE TYPES * * ************************************************************** * ARCHDEF FLMTYPE SOURCE FLMTYPE COPYLIB FLMTYPE PLINCL FLMTYPE MACROS FLMTYPE LIST FLMTYPE OBJ FLMTYPE LMAP FLMTYPE LOAD FLMTYPE * * ************************************************************** * * DEFINE THE GROUPS * * ************************************************************** * DEV1 FLMGROUP AC=(P,D),KEY=Y,PROMOTE=TEST DEV2 FLMGROUP AC=(P,D),KEY=Y,PROMOTE=TEST TEST FLMGROUP AC=(P),KEY=Y,PROMOTE=PROD PROD FLMGROUP AC=(P),KEY=Y * ********************************************************************** * PROJECT CONTROLS ********************************************************************** * FLMCNTRL ACCT=SCLM01.ACCOUNT.FILE, C VERS=SCLM01.VERSION.FILE, C MAXVIO=999999, C MEMLOCK=Y, C CONTROL=SCLM01.CONTROL.FILE, C ADMINID=DOHERTL, C VIOUNIT=VIO
705
* ********************************************************************** * VERSIONING AND AUDITABILITY * ********************************************************************** * FLMATVER GROUP=TEST, TYPE=SOURCE, VERSION=YES * FLMATVER GROUP=PROD, TYPE=SOURCE, VERSION=YES * ********************************************************************** * LANGUAGE DEFINITION TABLES ********************************************************************** * * USE THE FOLLOWING FORMAT TO COPY IN THE MACROS USED BY YOUR * OWN SYSTEM * COPY FLM@ARCD -- ARCHITECTURE DEFINITION COPY FLM@COBE -- ENTERPRISE COBOL LANGUAGE DEF. COPY FLM@PLIE -- ENTERPRISE PL/I LANGUAGE DEF. COPY FLM@HLAS -- HIGH-LEVEL ASSEMBLER LANG. DEF. COPY FLM@L370 -- LINK EDIT LANG. DEFINITION COPY FLM@TEXT -- TEXT LANGUAGE DEFINITION * FLMAEND
C C
C C
//SCLM01A JOB (ACCOUNT),'NAME', // MSGCLASS=X,CLASS=A,NOTIFY=&SYSUID //* //*-- ASSEMBLE SCLM PROJECT SCLM01 //* //* 5647-A01 (C) COPYRIGHT IBM CORP. 1987 //* //ASMPROJ PROC PROJID=,PROJDEF= //*------------------------------------------------------------------* //* ASSEMBLE AND LINK A PROJECT DEFINITION * //* * //* PROC PARAMETERS: * //* * //* PROJID - HIGH-LEVEL QUALIFIER FOR PROJECT * //* PROJDEF - PROJECT DEFINITION MEMBER NAME * //* * //* NOTE: MODIFY SYSLIB DSNAMES TO GET THE SCLM RELEASE MACROS * //* AND ANY LANGUAGE DEFINITIONS YOU NEED. * //*------------------------------------------------------------------* //ASM EXEC PGM=ASMA90,REGION=4096K,PARM=OBJECT //SYSLIB DD DSN=&PROJID..PROJDEFS.SOURCE,DISP=SHR // DD DSN=ISP.SISPMACS,DISP=SHR //SYSPRINT DD SYSOUT=H 706
A Practical Guide to Setting Up and Using SCLM
//SYSPUNCH DD DUMMY //SYSIN DD DSN=&PROJID..PROJDEFS.SOURCE(&PROJDEF),DISP=SHR //SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(2,2)) //SYSLIN DD DSN=&&INT,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,5)), // DCB=(BLKSIZE=0) //*------------------------------------------------------------------* //LINK EXEC PGM=IEWL,PARM='RENT,LIST,MAP',REGION=512K, // COND=(0,NE,ASM) //SYSPRINT DD SYSOUT=H //SYSLIN DD DSN=&&INT,DISP=(OLD,DELETE) //SYSLIB DD DSN=&PROJID..PROJDEFS.LOAD,DISP=SHR //SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(2,2)) //SYSLMOD DD DISP=SHR,DSN=&PROJID..PROJDEFS.LOAD(&PROJDEF) // PEND //*------------------------------------------------------------------* //ASMLINK EXEC PROC=ASMPROJ,PROJID=SCLM01,PROJDEF=SCLM01 //
SCLM01 FLMABEG . . * ************************************************************** * * DEFINE THE GROUPS * * ************************************************************** * DEV1 FLMGROUP AC=(P,D),KEY=Y,PROMOTE=TEST,ALTC=DEVCNTL DEV2 FLMGROUP AC=(P,D),KEY=Y,PROMOTE=TEST,ALTC=DEVCNTL TEST FLMGROUP AC=(P),KEY=Y,PROMOTE=PROD,ALTC=TESTCNTL PROD FLMGROUP AC=(P),KEY=Y * ********************************************************************** * PROJECT CONTROLS ********************************************************************** * FLMCNTRL ACCT=SCLM01.ACCOUNT.FILE, C VERS=SCLM01.VERSION.FILE, C DSNAME=ISPFSCLM.SCLM01.@@FLMGRP.@@FLMTYP, C VERPDS=@@FLMDSN.VERSION, C MAXVIO=999999, C VIOUNIT=VIO * DEVCNTL FLMALTC ACCT=SCLM01.DEVACCT.FILE, C VERS=SCLM01.DEVVERS.FILE, C DSNAME=ISPFSCLM.DEV.@@FLMPRJ.@@FLMGRP.@@FLMTYP * TESTCNTL FLMALTC ACCT=SCLM01.TESTACCT.FILE, C VERS=SCLM01.TESTVERS.FILE, C DSNAME=ISPFSCLM.TEST.@@FLMPRJ.@@FLMGRP.@@FLMTYP . . FLMAEND
707
********************************************************************* * SCLM Language Definitions ********************************************************************* FLM@ARCD - Architecture definitions FLM@ASM - OS/VS assembler language definition for SCLM FLM@ASMC - SCLM language definition for OS/VS assembler with CICS preprocessor FLM@ASMH - OS/VS assembler 'h' language definition for SCLM FLM@BDO - Language definition for DB2 bind/free clist output FLM@BD2 - Language definition for DB2 bind/free clist FLM@BMS - SCLM language definition for FLM@BOOK - Script 3 processor with bookmaster FLM@CC - SCLM language definition for C/370 with CICS preprocessor FLM@CCBE - SCLM language definition for Enterprise COBOL with CICS preprocessor FLM@CCOB - SCLM language definition for OS COBOL with CICS preprocessor FLM@CICS - SCLM language definition for COBOL II with CICS preprocessor FLM@CLNK - SCLM language definition for C pre-link with link-edit FLM@CLST - Untranslated clist language definition for SCLM FLM@COBL - OS/VS COBOL language definition for SCLM FLM@COBE - Enterprise COBOL language definition for SCLM FLM@COB2 - COBOL II language definition for SCLM FLM@COPY - SCLM language definition to migrate object into SCLM as an Output FLM@CPLK - SCLM language definition for C/370 with C pre-link FLM@CPLE - SCLM language definition for PL/I Enterprise compiler And CICS preprocessor FLM@CPLO - SCLM language definition for OS PL/I optimizer compiler And CICS preprocessor 3.2.1 FLM@C370 - C/370 language definition for SCLM FLM@DTLC - Language Definition Dialog Tag Language (DTL) FLM@EASM - SCLM language definition for OS assembler with DB2 and CICS preprocessor FLM@EC - SCLM language definition for C/370 with DB2 and CICS Preprocessors FLM@ECOB - SCLM language definition OS COBOL with DB2 and CICS Preprocessor FLM@ECO2 - SCLM language definition for COBOL II with DB2 and CICS Preprocessors FLM@EPLO - SCLM language definition for CICS, DB2, and OS PL/I Optimizer compiler FLM@FASM - SCLM language definition for High Level Assembler with IDILANGX output for FAULT ANALYZER FLM@HLAF - SCLM language definition for High Level Assembler with IDILANGX output for FAULT ANALYZER and ASM compile options override on CC architecture member. FLM@FORT - FORTRAN IV H extended language definition for SCLM FLM@FPAS - SCLM language definition for Pascal with IDILANGX output for FAULT ANALYZER FLM@HLAS - OS/VS high level assembler language definition for SCLM FLM@IASM - SCLM language definition for OS assembler with CICS 708
A Practical Guide to Setting Up and Using SCLM
FLM@IC FLM@ICO2 FLM@IPLO FLM@L370 FLM@MVTS FLM@MVUT FLM@OBJ FLM@PLIC FLM@PLIE FLM@PLIO FLM@PSCL FLM@RASM FLM@RCBL FLM@RCIS FLM@RC37 FLM@REXC FLM@REXX FLM@SCRP FLM@TEXT FLM@WBCC FLM@WBRC FLM@WDUM FLM@WEXE FLM@WICC FLM@WIPF FLM@WLNK FLM@WRC FLM@WTLK FLM@WXLC FLM@2ASM FLM@2C FLM@2CBE FLM@2CBF
Preprocessor - SCLM language definition for C/370 with CICS Preprocessor - SCLM language definition for COBOL II with CICS Preprocessor - SCLM language definition for OS PL/I optimizer compiler And CICS preprocessor - 370/linkage editor language definition for SCLM - SCLM language definition for MFS with TEST option - SCLM language definition for MFS with COMPRESS option - SCLM Dummy language definition to migrate object and Load - OS PL/I checkout compiler language definition for SCLM - PL/I Enterprise compiler language definition for SCLM - OS PL/I optimizing compiler language definition for SCLM - VS pascal language definition for SCLM - OS/VS assembler 'h' language definition for SCLM This language definition uses the rexx parser - OS/VS COBOL II language definition for SCLM This language definition uses the rexx parser - SCLM C/370 language definition Using flmlrci parser (C/C++ with include set support) - OS/VS C370 language definition for SCLM This language definition uses the rexx parser - This language definition is for the rexx/370 compiler - Untranslated rexx language definition for SCLM - Script 3 processor - Untranslated text language definition for SCLM - SCLM language definition for BORLAND(tm) C++ for windows - SCLM language definition for BORLAND(tm) C++ for windows - SCLM language definition for IBM CSET/2 or CSET++ for OS/2 Compile dummy object to hold resource dlls - SCLM language definition for workstation links to Generate .exe - SCLM language definition for IBM CSET/2 or CSET++ for OS/2 Compile source to object - SCLM language definition to build OS/2 help - SCLM language definition for workstation link386 command - SCLM language definition for workstation resource Compiler to generate .res - SCLM language definition for BORLAND(tm) C++ for windows - SCLM language definition for IBM CSET++ for AIX Compile source to object - SCLM language definition for DB2 and OS/VS assembler - SCLM language definition for C/370 with DB2 preprocessor - SCLM language definition for Enterprise COBOL with Integrated DB2 Preprocessor - SCLM language definition for Enterprise COBOL compiler with integral DB2 preprocessing and Fault Analyzer side file generation - SCLM language definition for Enterprise COBOL with Integrated DB2 and CICS Preprocessor. - SCLM language definition for OS COBOL with DB2 Preprocessor - SCLM language definition for OS COBOL II with DB2
709
Preprocessor FLM@2FRT - DB2 and FORTRAN IV H extended language definition for SCLM FLM@2PLE - SCLM language definition for Enterprise PL/I with Integrated DB2 Preprocessor FLM@2PLF - SCLM language definition for DB2 and PL/I enterprise compiler and NCAL linkedit to a sub-module library with side file generation. FLM@2PLO - SCLM language definition for SCLM DB2 and OS PL/I Optimizer compiler
SCLM01 * * * * * ARCHDEF SOURCE COPYLIB PLINCL MACROS ARCHPACK LIST OBJ LMAP LOAD DBRM BACKUP * * * * * DEV1 DEV2 TEST BACKGRP PROD . . .
FLMABEG ************************************************************** * DEFINE THE TYPES * ************************************************************** FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE FLMTYPE
************************************************************** * DEFINE THE GROUPS * ************************************************************** FLMGROUP FLMGROUP FLMGROUP FLMGROUP FLMGROUP AC=(P,A,LONGNAME),KEY=Y,PROMOTE=TEST AC=(P,A),KEY=Y,PROMOTE=TEST AC=(P),KEY=Y,PROMOTE=PROD AC=(P),KEY=Y,PROMOTE=PROD AC=(P),KEY=Y,BKGRP=BACKGRP,BKMBRLVL=Y
FLMAEND
710
)CM )CM THIS DEFINES THE STEPLIB AND ISPF LIBRARIES )CM TO BE USED DURING SCLM BATCH OPERATIONS )CM )CM BE SURE TO INCLUDE THE LOAD LIBRARIES CONTAINING ISPF. //* //****************************************************************** //* STEPLIB LIBRARIES //****************************************************************** //* //STEPLIB DD DSN=ISP.SISPLPA,DISP=SHR // DD DSN=ISP.SISPLOAD,DISP=SHR // DD DSN=ISP.SISPSASC,DISP=SHR //* //****************************************************************** //* ISPF LIBRARIES //****************************************************************** //* //ISPMLIB DD DSN=ISP.SISPMXXX,DISP=SHR ISPF MSGS //* //ISPSLIB DD DSN=ISP.SISPSXXX,DISP=SHR ISPF SKELS // DD DSN=ISP.SISPSLIB,DISP=SHR ISPF SKELS //* //ISPPLIB DD DSN=ISP.SISPPXXX,DISP=SHR ISPF PANELS //* //ISPTLIB DD UNIT=&VIOUNIT;,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN=&TABLESP TEMPORARY TABLE LIBRARY // DD DSN=ISP.SISPTXXX,DISP=SHR ISPF TABLES //* //ISPTABL DD UNIT=&VIOUNIT;,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN=&TABLESP TEMPORARY TABLE LIBRARY //* //ISPPROF DD UNIT=&VIOUNIT;,DISP=(NEW,PASS),SPACE=(CYL,(1,1,5)), // DCB=(LRECL=80,BLKSIZE=19040,DSORG=PO,RECFM=FB), // DSN=&TABLESP TEMPORARY TABLE LIBRARY //* //ISPLOG DD SYSOUT=*, // DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB) //* //ISPCTL1 DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB) TEMPORARY FILE //* TAILORING DATASET //* OW01230 //SYSTERM DD SYSOUT=* //* //*-------------------------------------------------------------------//* TEMPORARY CLIST CONTAINING COMMAND TO BE EXECUTED //*-------------------------------------------------------------------//SYSPROC DD DSN=&&&&CLIST&STEP,DISP=(OLD,DELETE) // DD DSN=ISP.SISPCLIB,DISP=SHR CLIST LIBRARY OW01230 //* )CM
Appendix A. Chapter 1 listings
711
//ISPCTL0 DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB) //ISPCTL1 DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB) . . . //ISPCTLW DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB) //* In the above section of JCL, there is one DD for each screen //* defined, based on the value of keyword MAXIMUM_NUMBER_OF_ //* SPLIT_SCREENS in the configuration table. //* The DD name is in the form ISPCTLx, where x can be //* 1-9, A-W. For example, if the keyword value = 8, only //* ISPCTL1 to ISPCTL8 need to be coded. //* ISPCTL0 is a special case, used only by Edit for the Submit //* command. //ISPWRK1 DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=256,BLKSIZE=2560,RECFM=FB) //ISPWRK2 DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=256,BLKSIZE=2560,RECFM=FB) . . . //ISPWRKW DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=256,BLKSIZE=2560,RECFM=FB) //* In the above section of JCL, there is one DD for each screen //* defined, based on the value of keyword MAXIMUM_NUMBER_OF_ //* SPLIT_SCREENS in the configuration table. //* The DD name is in the form ISPWRKx, where x can be //* 1-9, A-W. For example, if the value of the keyword = 8, //* only ISPWRK1 to ISPWRK8 need to be coded. //ISPLST1 DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA) //ISPLST2 DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA) . . . //ISPLSTW DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1)), // DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA) //* In the above section of JCL, there is one DD for each screen //* defined, based on the value of keyword MAXIMUM_NUMBER_OF_ //* SPLIT_SCREENS in the configuration table. //* The DD name is in the form ISPLSTx, where x can be //* 1-9, A-W. For example, if the value of the keyword = 8, //* only ISPLST1 to ISPLST8 need to be coded.
712
Appendix B.
Chapter 2 listings
Example: B-1 SCLM01.PROJDEFS.SOURCE(FLM@CCBE)
*********************************************************************** * SCLM LANGUAGE DEFINITION FOR * * ENTERPRISE COBOL WITH INTEGRATED CICS TRANSLATOR * * * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * CICSCBE FLMSYSLB XXXXX.XXXXX.XXXXX.XXXXX * * FLMSYSLB YYYYY.YYYYY.YYYYY.YYYYY * * * * THE ALCSYSLB=Y ON THE FLMLANGL MACRO WILL AUTOMATICALLY ADD THESE * * DATASETS TO THE CONCATENATION OF IOTYPE=I,KEYREF=SINC ALLOCATIONS. * * CHKSYSLB=BUILD WILL DEFER CHECKING OF FLMSYSLB DATASETS UNTIL * * BUILD TIME. * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * WHEN A NEW TRANSLATOR VERSION REQUIRES TOTAL RECOMPILATION FOR THIS * * LANGUAGE, THE 'VERSION' FIELD ON FLMLANGL SHOULD BE CHANGED. * * * * *
713
*********************************************************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * * --------------------------------------------------------------------* * $01=OA17586 2006/09/14 RX: INTEGRATED CICS COMPILER CHANGES. * * * *********************************************************************** * CICSCBE FLMSYSLB CICS.TS31.CICS.SDFHCOB FLMSYSLB CICS.TS31.CICS.SDFHMAC * FLMLANGL LANG=CICSCBE,VERSION=2,ALCSYSLB=Y,CHKSYSLB=BUILD, C LANGDESC='ENTERPRISE COBOL WITH CICS' * *********************************************************************** * --INCLUDE SET SPECIFICATION FOR EXAMPLE PROJECT SCLM01-* *********************************************************************** * FLMINCLS TYPES=(COPYLIB) * * *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) *M34FN* * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) *M34FN* * - CICS PRECOMPILE CODE LINES *18@01D* * COMMENT LINES *14@01D* * --COBOL INTERFACE-CODE LINES *29@01D* * COMMENT LINES *18@01D* * *********************************************************************** * COBOL COMPILE AND CICS PRE-PROCESS CODE LINES *32@01A* * IN ONE STEP COMMENT LINES *19@01A* *********************************************************************** * FLMTRNSL CALLNAM='COBOL COMPILER WITH CICS PREPROCESS', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C VERSION=3.3.1, C TASKLIB=TASKLIB, C GOODRC=0, C PORDER=1, C OPTIONS=(RENT,NODYNAM,LIB,CICS(''COBOL3'')) * *********************************************************************** * --DDNAME ALLOCATION-*
714
*********************************************************************** * FLMALLOC IOTYPE=O,KEYREF=OBJ,RECFM=FB,LRECL=80, C RECNUM=5000,DFLTTYP=OBJ,DDNAME=SYSLIN * FLMALLOC IOTYPE=I,KEYREF=SINC,DDNAME=SYSLIB * FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80, C DDNAME=SYSIN * FLMALLOC IOTYPE=O,KEYREF=LIST, C RECFM=FBA,LRECL=133, C RECNUM=25000,PRINT=Y,DFLTTYP=LIST,DDNAME=SYSPRINT * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT1 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT2 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT3 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT4 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT5 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT6 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT7 * (* TASKLIB*) FLMALLOC IOTYPE=A,DDNAME=TASKLIB FLMCPYLB ECOBOL.V340.SIGYCOMP FLMCPYLB CICS.TS31.CICS.SDFHLOAD * * * * 5694-A01 COPYRIGHT IBM CORP 1980, 2007 * * *
*********************************************************************** * SCLM LANGUAGE DEFINITION FOR * * ENTERPRISE COBOL WITH CICS PRECOMPILER * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. *
Appendix B. Chapter 2 listings
715
* * ********************* CUSTOMIZATION NOTES ***************************** * * * CICS OUTPUT IS PASSED VIA THE CICSTRAN DD ALLOCATION TO OS COBOL. * * * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * CICSCBE FLMSYSLB XXXXX.XXXXX.XXXXX * * FLMSYSLB YYYYY.YYYYY.YYYYY * * * * THE ALCSYSLB=Y ON THE FLMLANGL MACRO WILL AUTOMATICALLY ADD THESE * * DATASETS TO THE CONCATENATION OF IOTYPE=I,KEYREF=SINC ALLOCATIONS. * * CHKSYSLB=BUILD WILL DEFER CHECKING OF FLMSYSLB DATASETS UNTIL * * BUILD TIME. * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * WHEN A NEW TRANSLATOR VERSION REQUIRES TOTAL RECOMPILATION FOR THIS * * LANGUAGE, THE 'VERSION' FIELD ON FLMLANGL SHOULD BE CHANGED. * * * * * *********************************************************************** * COBCICS FLMSYSLB CICS.TS31.CICS.SDFHCOB FLMSYSLB CICS.TS31.CICS.SDFHMAC * FLMLANGL LANG=COBCICS,VERSION=1,ALCSYSLB=Y,CHKSYSLB=BUILD, C LANGDESC='ENTERPRISE COBOL WITH CICS' * *********************************************************************** * --INCLUDE SET SPECIFICATION FOR EXAMPLE PROJECT SCLM01-* *********************************************************************** * FLMINCLS TYPES=(COPYLIB) * * PARSER TRANSLATOR * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * * BUILD TRANSLATOR(S) * * - CICS PRECOMPILE FLMTRNSL CALLNAM='CICS PRE-COMPILE', C FUNCTN=BUILD, C
716
* * * * *
1 2 3 4 5
COMPILE=DFHECP1$, DSNAME=CICS.TS31.CICS.SDFHLOAD, VERSION=2.1, GOODRC=4, PORDER=3, OPTIONS=(SOURCE,NOSEQ) -- N/A -FLMALLOC IOTYPE=N -- N/A -FLMALLOC IOTYPE=N -- N/A -FLMALLOC IOTYPE=N -- N/A -FLMALLOC IOTYPE=N (* SYSIN *) FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80, DDNAME=SYSIN (* SYSPRINT *) FLMALLOC IOTYPE=O,RECFM=FBA,LRECL=121, RECNUM=35000,PRINT=Y (* SYSPUNCH *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80, RECNUM=5000,DDNAME=CICSTRAN
C C C C C
* * * *
--COBOL INTERFACE-FLMTRNSL CALLNAM='COBOL', FUNCTN=BUILD, COMPILE=IGYCRCTL, DSNAME=ECOBOL.V340.SIGYCOMP, VERSION=3.4.0, GOODRC=4, PORDER=3, OPTIONS=(DMA,PRI,SIZE=512K,APOS,CNT=77,BUF=30K,OPT, XREF,LIB)
C C C C C C C C
* * DDNAME ALLOCATIONS * * 1 (* SYSLIN *) FLMALLOC IOTYPE=O,KEYREF=OBJ,RECFM=FB,LRECL=80, RECNUM=5000,DFLTTYP=OBJ * 2 (* N/A *) FLMALLOC IOTYPE=N * 3 (* N/A *) FLMALLOC IOTYPE=N * 4 (* SYSLIB *) FLMALLOC IOTYPE=I,KEYREF=SINC,DDNAME=SYSLIB * 5 (* SYSIN *) FLMALLOC IOTYPE=U,KEYREF=SINC,DDNAME=CICSTRAN * 6 (* SYSPRINT *) FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=FBA,LRECL=133, RECNUM=25000,PRINT=Y,DFLTTYP=LIST * 7 (* SYSPUNCH *) FLMALLOC IOTYPE=A
717
* *
8 9
* 10 * 11 * 12
* 13
* 14
FLMCPYLB NULLFILE (* SYSUT1 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT2 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT3 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT4 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSTERM *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSUT5 *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSUT6 *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE
/* REXX */ /**********************************************************************/ /* ALLOCDBG EXEC */ /* WRITTEN BY: PETER ECK */ /* 08/31/2006 */ /* */ /* THIS REXX ROUTINE WILL ALLOCATE SYSDEBUG */ /**********************************************************************/ parse upper arg prj grp member /* parse arguments */ dbugdsn = "'"prj"."grp".SYSDEBUG("member")'" /* If sysdebug member does not exist then create it */ If sysdsn(dbugdsn) <> 'OK' Then Do "ALLOC DA("dbugdsn") FI(SYSDEBUG) SHR" out.0 = 1 out.1 = "dummy" "EXECIO * DISKW SYSDEBUG (STEM OUT. FINIS)" If rc > 0 Then Do Say "****** Error creating the dummy sysdebug member, RC="rc Exit 12 End "FREE F(SYSDEBUG)" End Exit 0
718
/* REXX */ Arg Type Member CallMeth If Type = 'SYSDEBUG' Then Do SYSLINE.1 = " COPYGRP OUTDD=OUTDD,INDD=INDD" SYSLINE.2 = " SELECT MEMBER="Member SYSLINE.0 = 2 Address TSO "EXECIO * DISKW SYSIN (STEM SYSLINE. FINIS)" Select When (CallMeth = 'TSOLNK') Then Do Say "Calling IEBCOPY with CALL" "CALL 'SYS1.LINKLIB(IEBCOPY)'" If (rc > 0) then Do Say 'Filecopy failed (IEBCOPY rc='||rc||')' ret_code = 1 End End When (CallMeth = 'ISPLNK') Then Do Say "Calling IEBCOPY with SELECT" Address ISPEXEC "ISPEXEC SELECT PGM(IEBCOPY)" If (rc > 0) then Do Say 'Filecopy failed (IEBCOPY rc='||rc||')' ret_code = 2 End End Otherwise NOP End End Exit
*********************************************************************** * DUMMY LIST TRANSLATOR FOR SYSDEBUG COPY * * * FLMLANGL LANG=LIST, C LANGDESC='DUMMY LIST TO INVOKE SYSDEBUG COPY' * *********************************************************************** * --ALLOCATE SYSDEBUG MEMBER AT PROMOTE TO GROUP IF NEW * *********************************************************************** *
719
FLMTRNSL CALLNAM='ALLOC SYSDEBUG', FUNCTN=COPY, COMPILE=SELECT, DSNAME=SCLM.PROJDEFS.REXX, CALLMETH=ISPLNK, GOODRC=0, PDSDATA=Y, OPTIONS='CMD(EX ''SCLM.PROJDEFS.REXX(ALLOCDBG)'' ''@@FLMPRJ @@FLMTOG @@FLMMBR'')'
C C C C C C C C
* *---------------------------------------------------------------------* *-- COPY SIDE FILE AS MEMBER IS PROMOTED --* *---------------------------------------------------------------------* FLMTRNSL FUNCTN=COPY, C CALLNAM='COPY SIDE FILE', C CALLMETH=TSOLNK, C COMPILE=COPYMEMB, C DSNAME=SCLM.PROJDEFS.REXX, C GOODRC=0, C PDSDATA=Y, C OPTIONS='SYSDEBUG @@FLMMBR TSOLNK' * FLMALLOC IOTYPE=A,DDNAME=INDD,DISP=SHR FLMCPYLB @@FLMPRJ.@@FLMGRP.SYSDEBUG(@@FLMMBR) * FLMALLOC IOTYPE=A,DDNAME=OUTDD,DISP=SHR FLMCPYLB @@FLMPRJ.@@FLMTOG.SYSDEBUG(@@FLMMBR) * FLMALLOC IOTYPE=W,DDNAME=SYSIN,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSPRINT,RECNUM=50000 * * 5694-A01 (C) COPYRIGHT IBM CORP 1990, 2006 * * *
*********************************************************************** * ENTERPRISE COBOL LANGUAGE DEFINITION FOR SCLM * * * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * COBE FLMSYSLB XXXXX.XXXXX.XXXXX * 720
A Practical Guide to Setting Up and Using SCLM
* FLMSYSLB YYYYY.YYYYY.YYYYY * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * CHANGING THE VERSION FIELD ON FLMLANGL WILL CAUSE ALL MEMBERS TO BE * * OUT OF DATE. EACH MEMBER WILL BE RE-BUILT THE NEXT TIME BUILD IS * * INVOKED. * * * * IF YOU DON'T WANT A COMPILER LISTING, CHANGE THE DDNAME=SYSPRINT * * TO AN IOTYPE=W AND REMOVE THE UNNECESSARY PARAMETERS. * * * * THIS LANGUAGE DEFINITION IS COMPATIBLE WITH THE AD/CYCLE COBOL * * COMPILER. * * * *********************************************************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * * --------------------------------------------------------------------* * $01 M42P2691 1994/04/26 - : CHANGED DFLTTYP=COMPLIST TO LIST TO * * MATCH TYPES DEFINED IN EXAMPLE PROJECTS. * * $02 OW03966 - : V4.1 DEVELOPMENT APAR * * $03 OA17586 2006/09/29 RX: REMOVED COB2 COMMENTS. * * * * * *********************************************************************** * * THE LINE LENGTH IS 80 CHARACTERS AND SEQUENCE NUMBERS ARE PLACED * IN COLUMNS 1 TO 6 AND 73 TO 80. THESE ARE ONLY USED BY WSP/2 1.2 * AND HIGHER. SCLM IGNORES THESE PARAMETERS. * FLMLANGL LANG=COBEDTC,ALCSYSLB=Y, C LANGDESC='ENTERPRISE COBOL WITH DEBUG TOOL' * *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C CALLMETH=LINK, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --ALLOCATE SYSDEBUG MEMBER IF NEW * *********************************************************************** * FLMTRNSL CALLNAM='ALLOC SYSDEBUG', C
721
FUNCTN=BUILD, COMPILE=SELECT, DSNAME=SCLM.PROJDEFS.REXX, CALLMETH=ISPLNK, GOODRC=0, PORDER=1, OPTIONS='CMD(EX ''SCLM.PROJDEFS.REXX(ALLOCDBG)'' ''@@FLMPRJ @@FLMGRP @@FLMMBR'')'
C C C C C C C
* *********************************************************************** * --ENTERPRISE COBOL INTERFACE-* *********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE COBOL COMPILER', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C DSNAME=ECOBOL.V340.SIGYCOMP, C VERSION=3.1, C GOODRC=0, C PORDER=1, C OPTIONS=(XREF,LIB,APOST,NODYNAM,LIST,NONUMBER,NOSEQ,TESTC (ALL,SYM,SEP)) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, C RECNUM=5000,DFLTTYP=OBJ * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC * FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT2,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT3,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT4,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT5,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT6,RECNUM=5000 * FLMALLOC IOTYPE=W,DDNAME=SYSUT7,RECNUM=5000 * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=O,DDNAME=SYSPRINT,KEYREF=LIST, C
722
723
724
Appendix C.
Chapter 3 listings
Example: C-1 Common bind exec example
rcode = 0 /* Set standard BIND options */ FLAG ISOLATION CACHESIZE ACQUIRE RELEASE = = = = = 'I' 'CS' '256' 'ALLOCATE' 'DEALLOCATE'
Select When (GRP = 'PROD') Then Do SUBSYS = 'DI11' OWNER = 'PRODDBA' ACTION = 'REP' VALIDATE = 'RUN' ISOLATION = 'CS' EXPLAIN = 'NO' QUALIFIER = 'PRODDBA' PKLIST = 'PROD.*' Call Bind_it
725
End When (GRP = 'TEST') Then Do SUBSYS = 'DI11' OWNER = 'TESTDBA' ACTION = 'REP' VALIDATE = 'BIND' ISOLATION = 'CS' EXPLAIN = 'NO' QUALIFIER = 'TESTDBA' PKLIST = 'TEST.*' Call Bind_it End When (GRP = 'DEV1') Then Do SUBSYS = 'DI11' OWNER = 'DEVDBA' ACTION = 'REP' VALIDATE = 'BIND' ISOLATION = 'CS' EXPLAIN = EXP QUALIFIER = 'DEVDBA' PKLIST = 'DEV1.*' Call Bind_it End When (GRP = 'DEV2') Then NOP /* no bind needed */ Otherwise NOP /* no bind needed */ End Exit RCODE Bind_it: Select When (OPT = 'PLANBIND') Then Do DB2_Line = "BIND PLAN("MEMBER")" " OWNER("OWNER")" " QUALIFIER("QUALIFIER")" " PKLIST("PKLIST")" " VALIDATE("VALIDATE")" " ISOLATION("ISOLATION")" " EXPLAIN("EXPLAIN")" " FLAG("FLAG")" " CACHESIZE("CACHESIZE")" " ACQUIRE("ACQUIRE")" " RELEASE("RELEASE")" " RETAIN" " ENABLE("ENV")"
||, ||, ||, ||, ||, ||, ||, ||, ||, ||, ||, ||,
726
say DB2_line /* /* Write the bind control statement to the data queue and execute DB2I to perform the bind. */ */
queue DB2_Line queue "End" Address TSO "DSN SYSTEM("SUBSYS")" rcode = RC End When (OPT = 'PLANFREE') Then Do /* At this point SCLM passes the from group information so that /* the plan at the from group can be FREEed if required End When (OPT = 'PACKBIND') Then Do DB2_Line = "BIND PACKAGE("GRP") MEMBER("MEMBER")" ||, " OWNER("OWNER")" ||, " ACTION("ACTION")" ||, " VALIDATE("VALIDATE")" ||, " ISOLATION("ISOLATION")" ||, " EXPLAIN("EXPLAIN")" ||, " QUALIFIER("QUALIFIER")"
*/ */
/* /*
Write the bind control statement to the data queue and execute DB2I to perform the bind.
*/ */
queue DB2_Line queue "End" Address TSO "DSN SYSTEM("SUBSYS")" rcode = RC End When (OPT = 'PACKFREE') Then Do /* At this point SCLM passes the from group information so that /* the package at the from group can be FREEed if required End Otherwise NOP End Return
*/ */
727
*********************************************************************** * FLM@BD2 - LANGUAGE DEFINITION FOR DB2 BIND/FREE CLIST * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************** CHANGE ACTIVITY ******************************** * * * Change activity = * * Pn = Reason Release Date Origin Comment * * --------- -------- ------ ------ : ------------------* * $L0 = OY29671 M320 900730 432273 : SCLM CSP/DB2 SPE * * * * OY39985 - 910218 - DB2 PROMOTE PROBLEM. DB2OUT AND DSNTRACE * * ADDED. PROMOTE TRANSLATORS REMOVED. CALLMETH * * = LINK ADDED. GT4045 - AAB * * * * OW03966 - V4.1 DEVELOPMENT APAR * * @01 Z/OS 1.8 - ADDED LANGUAGE DESCRIPTION * * * * * * FLMLANGL LANG=PKGBIND, C LANGDESC='DB2 BIND/FREE PACKAGE TRANSLATOR' * * INCLUDE-SET TO ALLOW DBRMs AND DB2 CLISTs WITH THE SAME NAME * FLMINCLS TYPES=(DBRM) * * PARSER TRANSLATOR * FLMTRNSL CALLNAM='PARSE DB2 CLIST', C FUNCTN=PARSE, C COMPILE=FLMLSS, C PORDER=1, C OPTIONS=(PTABLEDD=, C SOURCEDD=SOURCE, C TBLNAME=FLMPDBRM, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C CONTIN=0, C EOLCOL=72) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * * BUILD TRANSLATOR(S)
728
* FLMTRNSL CALLNAM='DB2 BIND', C FUNCTN=BUILD, C COMPILE=FLMCSPDB, C PORDER=1, C GOODRC=4, C CALLMETH=LINK, C OPTIONS=(FUNCTN=BUILD, C OPTION=BIND, C SCLMINFO=@@FLMINF, C PROJECT=@@FLMPRJ, C ALTPROJ=@@FLMALT, C DBRMTYPE=DBRM, C GROUP=@@FLMGRP, C MEMBER=@@FLMMBR) * 1 -- ISRPROXY -FLMALLOC IOTYPE=S,DDNAME=ISRPROXY,KEYREF=SINC, C CATLG=Y,RECNUM=5000,LRECL=80,RECFM=FB ***** The following lines added for APAR OY39985 ********************** * 2 -- ISRDB2OT -FLMALLOC IOTYPE=O,DDNAME=ISRDB2OT,KEYREF=OUT3,LANG=PKGOUT, C RECNUM=5000,LRECL=80,RECFM=FB,DFLTTYP=PKGOUT * 3 -- DSNTRACE -FLMALLOC IOTYPE=W,DDNAME=DSNTRACE,PRINT=I, C RECFM=F,LRECL=132,BLKSIZE=132 ***** The preceding lines added for APAR OY39985 ********************** * 4 -- DUMMY DD - REQUIRED FOR FLMINCLS MACRO BUT NOT TRANSLATOR FLMALLOC IOTYPE=I,DDNAME=DUMMYDD,KEYREF=SINC * * 5694-A01 (C) COPYRIGHT IBM CORP 1990, 2006
729
*********************************************************************** * FLM@BDO - LANGUAGE DEFINITION FOR DB2 BIND/FREE CLIST OUTPUT * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * *********************** CHANGE ACTIVITY ******************************* * * * Change activity = * * Pn = Reason Release Date Origin Comment * * --------- -------- ------ ------ : ------------------* * $M1 = OY39985 M320 901219 482212 : DB2 Promote - New Lang.* * def. macro added. * * @01 = DEVL z/OS 1.8 050516 : Add Language Descript * * * *********************************************************************** * FLMLANGL LANG=PKGOUT, C LANGDESC='DB2 BIND/FREE PACKAGE TRANSLATOR' * * PROMOTE TRANSLATOR(S) * FLMTRNSL CALLNAM='DB2 PROM BIND', C FUNCTN=COPY, C COMPILE=FLMCSPDB, C PORDER=1, C GOODRC=4, C CALLMETH=LINK, C PDSDATA=Y, C OPTIONS=(FUNCTN=@@FLMFNM, C OPTION=BIND, C SCLMINFO=@@FLMINF, C PROJECT=@@FLMPRJ, C ALTPROJ=@@FLMALT, C DBRMTYPE=DBRM, C GROUP=@@FLMGRP, C TOGROUP=@@FLMTOG, C MEMBER=@@FLMMBR) * 1 -- ISRPROXY -FLMALLOC IOTYPE=A,DDNAME=ISRPROXY FLMCPYLB @@FLMDSF * 2 -- DSNTRACE -FLMALLOC IOTYPE=W,DDNAME=DSNTRACE,PRINT=I, C RECFM=F,LRECL=132,BLKSIZE=132 * FLMTRNSL CALLNAM='DB2 PROM FREE', C FUNCTN=PURGE, C COMPILE=FLMCSPDB, C
730
PORDER=1, GOODRC=4, CALLMETH=LINK, PDSDATA=Y, OPTIONS=(FUNCTN=@@FLMFNM, OPTION=FREE, SCLMINFO=@@FLMINF, PROJECT=@@FLMPRJ, ALTPROJ=@@FLMALT, DBRMTYPE=DBRM, GROUP=@@FLMGRP, TOGROUP=@@FLMTOG, MEMBER=@@FLMMBR) -- ISRPROXY -FLMALLOC IOTYPE=A,DDNAME=ISRPROXY FLMCPYLB @@FLMDSF -- DSNTRACE -FLMALLOC IOTYPE=W,DDNAME=DSNTRACE,PRINT=I, RECFM=F,LRECL=132,BLKSIZE=132
C C C C C C C C C C C C
731
*********************************************************************** * SCLM LANGUAGE DEFINITION FOR * * ENTERPRISE COBOL WITH CICS AND DB2 PREPROCESSOR * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * CICS OUTPUT IS PASSED VIA THE CICSTRAN DD ALLOCATION TO COBOL. * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * CICSCBE FLMSYSLB XXXXX.XXXXX.XXXXX * * FLMSYSLB YYYYY.YYYYY.YYYYY * * * * THE ALCSYSLB=Y ON THE FLMLANGL MACRO WILL AUTOMATICALLY ADD THESE * * DATASETS TO THE CONCATENATION OF IOTYPE=I,KEYREF=SINC ALLOCATIONS. * * CHKSYSLB=BUILD WILL DEFER CHECKING OF FLMSYSLB DATASETS UNTIL * * BUILD TIME. * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * WHEN A NEW TRANSLATOR VERSION REQUIRES TOTAL RECOMPILATION FOR THIS * * LANGUAGE, THE 'VERSION' FIELD ON FLMLANGL SHOULD BE CHANGED. * * * * * *********************************************************************** * COBCICD2 FLMSYSLB CICS.TS31.CICS.SDFHCOB FLMSYSLB CICS.TS31.CICS.SDFHMAC * FLMLANGL LANG=COBCICD2,VERSION=2,ALCSYSLB=Y,CHKSYSLB=BUILD, C LANGDESC='ENTERPRISE COBOL WITH CICS AND DB2' * FLMINCLS TYPES=(COPYLIB,DCLGENC) DCLGENC FLMINCLS TYPES=(DCLGENC) * * PARSER TRANSLATOR * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C 732
* * BUILD TRANSLATORS * * --DB2 PREPROCESSOR INTERFACE-FLMTRNSL CALLNAM='DB2 PREPROCESS', FUNCTN=BUILD, COMPILE=DSNHPC, DSNAME=DB2.V810.SDSNLOAD, VERSION=8.1.0, GOODRC=4, PORDER=3, OPTIONS=(HOST(COB2),APOST) * 1 -- N/A -FLMALLOC IOTYPE=N * 2 -- N/A -FLMALLOC IOTYPE=N * 3 -- N/A -FLMALLOC IOTYPE=N * 4 -- SYSLIB -FLMALLOC IOTYPE=I,KEYREF=SINC,INCLS=DCLGENC * 5 -- SYSIN -FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80, RECNUM=5000 * 6 -- SYSPRINT -FLMALLOC IOTYPE=W,RECFM=FBA,LRECL=133, RECNUM=35000,PRINT=Y * 7 -- N/A -FLMALLOC IOTYPE=N * 8 -- SYSUT1 -FLMALLOC IOTYPE=W,RECFM=FB,LRECL=800,RECNUM=9000 * 9 -- SYSUT2 -FLMALLOC IOTYPE=W,RECFM=FB,LRECL=800,RECNUM=9000 * 10 -- SYSUT3 -FLMALLOC IOTYPE=W,RECFM=FB,LRECL=800,RECNUM=9000 * 11 -- N/A -FLMALLOC IOTYPE=N * 12 -- SYSTERM -FLMALLOC IOTYPE=A FLMCPYLB NULLFILE * 13 -- N/A -FLMALLOC IOTYPE=N * 14 -- SYSCIN -FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80, RECNUM=9000,DDNAME=DB2TRANS * 15 -- N/A -FLMALLOC IOTYPE=N * 16 -- DBRMLIB-FLMALLOC IOTYPE=P,DDNAME=DBRMLIB,MEMBER=@@FLMONM, DFLTTYP=DBRM,KEYREF=OUT1, RECFM=FB,LRECL=80,RECNUM=5000,DIRBLKS=1 *
C C C C C C
C C
733
* BUILD TRANSLATOR(S) * * - CICS PRECOMPILE FLMTRNSL CALLNAM='CICS PRE-COMPILE', FUNCTN=BUILD, COMPILE=DFHECP1$, DSNAME=CICS.TS31.CICS.SDFHLOAD, VERSION=3.1, GOODRC=4, PORDER=3, OPTIONS=(SOURCE,NOSEQ) * 1 -- N/A -FLMALLOC IOTYPE=N * 2 -- N/A -FLMALLOC IOTYPE=N * 3 -- N/A -FLMALLOC IOTYPE=N * 4 -- N/A -FLMALLOC IOTYPE=N * 5 (* SYSIN *) FLMALLOC IOTYPE=U,DDNAME=DB2TRANS * 6 (* SYSPRINT *) FLMALLOC IOTYPE=O,RECFM=FBA,LRECL=121, RECNUM=35000,PRINT=Y * 7 (* SYSPUNCH *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80, RECNUM=5000,DDNAME=CICSTRAN * * * --COBOL INTERFACE-FLMTRNSL CALLNAM='COBOL', FUNCTN=BUILD, COMPILE=IGYCRCTL, DSNAME=ECOBOL.V340.SIGYCOMP, VERSION=3.4.0, GOODRC=4, PORDER=3, OPTIONS=(NONUM,MAP,OFFSET,NOOPTIMIZE, XREF,LIB) * * DDNAME ALLOCATIONS * * 1 (* SYSLIN *) FLMALLOC IOTYPE=O,KEYREF=OBJ,RECFM=FB,LRECL=80, RECNUM=5000,DFLTTYP=OBJ * 2 (* N/A *) FLMALLOC IOTYPE=N * 3 (* N/A *) FLMALLOC IOTYPE=N * 4 (* SYSLIB *) FLMALLOC IOTYPE=I,KEYREF=SINC,DDNAME=SYSLIB * 5 (* SYSIN *) FLMALLOC IOTYPE=U,KEYREF=SINC,DDNAME=CICSTRAN * 6 (* SYSPRINT *) FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=FBA,LRECL=133,
C C C C C C C
C C C C C C C C
734
* *
8 9
* 10 * 11 * 12
* 13 * 14 * 15 * 16
* 17
* 18
* 19
RECNUM=25000,PRINT=Y,DFLTTYP=LIST (* SYSPUNCH *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSUT1 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT2 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT3 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT4 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSTERM *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSUT5 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT6 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSUT7 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 (* SYSADATA *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSJAVA *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSDEBUG *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSMDECK *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE
735
*********************************************************************** * SCLM LANGUAGE DEFINITION FOR * * ENTERPRISE COBOL WITH INTEGRATED CICS TRANSLATOR * * * * * ********************** GENERAL NOTES ******************************** * * * THIS LANGUAGE DEFINITION IS AN EXAMPLE THAT CAN SERVE AS A * * REFERENCE IN THE CONSTRUCTION AND CUSTOMIZATION OF LANGUAGE * * DEFINITIONS FOR A PARTICULAR APPLICATION AND ENVIRONMENT. * * * ********************* CUSTOMIZATION NOTES ***************************** * * * LIST EACH "STATIC" COPY DATASET UNDER THE FLMSYSLB MACRO. * * USE THE LANGUAGE NAME (VALUE OF THE LANG KEYWORD) FOR THE LABEL * * ON THE FIRST FLMSYSLB MACRO. * * EXAMPLE: * * CICSCBE FLMSYSLB XXXXX.XXXXX.XXXXX.XXXXX * * FLMSYSLB YYYYY.YYYYY.YYYYY.YYYYY * * * * THE ALCSYSLB=Y ON THE FLMLANGL MACRO WILL AUTOMATICALLY ADD THESE * * DATASETS TO THE CONCATENATION OF IOTYPE=I,KEYREF=SINC ALLOCATIONS. * * CHKSYSLB=BUILD WILL DEFER CHECKING OF FLMSYSLB DATASETS UNTIL * * BUILD TIME. * * * * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * * * * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * * * * WHEN A NEW TRANSLATOR VERSION REQUIRES TOTAL RECOMPILATION FOR THIS * * LANGUAGE, THE 'VERSION' FIELD ON FLMLANGL SHOULD BE CHANGED. * * * * * *********************************************************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * * --------------------------------------------------------------------* * $01=OA17586 2006/09/14 RX: INTEGRATED CICS TRANSLATOR CHANGES. * * * * * *********************************************************************** * COBCICD2 FLMSYSLB CICS.TS31.CICS.SDFHCOB * @01C* FLMSYSLB CICS.TS31.CICS.SDFHMAC * @01C* * FLMLANGL LANG=COBCICD2,VERSION=2,ALCSYSLB=Y,CHKSYSLB=BUILD, C LANGDESC='ENTERPRISE COBOL WITH CICS AND DB2' * FLMINCLS TYPES=(SOURCE,COPYLIB,DCLGENC) 736
DCLGENC FLMINCLS TYPES=(DCLGENC) * *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,SQL=DCLGENC,INCLSET) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) *M34FN* * - CICS PRECOMPILE CODE LINES *18@01D* * COMMENT LINES *14@01D* * --COBOL INTERFACE-CODE LINES *29@01D* * COMMENT LINES *18@01D* * *********************************************************************** * COBOL COMPILE AND CICS PRE-PROCESS CODE LINES *32@01A* * IN ONE STEP COMMENT LINES *19@01A* *********************************************************************** * FLMTRNSL CALLNAM='COBOL COMPILER WITH CICS PREPROCESS', C FUNCTN=BUILD, C COMPILE=IGYCRCTL, C VERSION=1.0, C TASKLIB=TASKLIB, C GOODRC=4, C PORDER=1, C OPTIONS=(NONUM,LIB,XREF(FULL),MAP,OFFSET,NOOPTIMIZE,CICSC (''COBOL3''),SQL) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,KEYREF=OBJ,RECFM=FB,LRECL=80, C RECNUM=5000,DFLTTYP=OBJ,DDNAME=SYSLIN * FLMALLOC IOTYPE=I,KEYREF=SINC,DDNAME=SYSLIB * FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80, C DDNAME=SYSIN * FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=FBA,LRECL=133, C RECNUM=25000,PRINT=Y,DFLTTYP=LIST,DDNAME=SYSPRINT * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT1 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, C DDNAME=SYSUT2 *
737
FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, DDNAME=SYSUT3 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, DDNAME=SYSUT4 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, DDNAME=SYSUT5 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, DDNAME=SYSUT6 * FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000, DDNAME=SYSUT7 * FLMALLOC IOTYPE=P,DDNAME=DBRMLIB,MEMBER=@@FLMONM, DFLTTYP=DBRM,KEYREF=OUT1, RECFM=FB,LRECL=80,RECNUM=5000,DIRBLKS=1 * FLMALLOC * * IOTYPE=I,DDNAME=DCLGENC,KEYREF=SINC,INCLS=DCLGENC
C C
(* TASKLIB*) FLMALLOC IOTYPE=A,DDNAME=TASKLIB FLMCPYLB ECOBOL.V340.SIGYCOMP FLMCPYLB CICS.TS31.CICS.SDFHLOAD FLMCPYLB DB2.V810.SDSNLOAD FLMCPYLB DB2.V810.SDSNEXIT * * * *
738
*********************************************************************** * SAMPLE SCLM LANGUAGE DEFINITION FOR * * PL/I WITH INTEGRAL DB2 PRE-PROCESSING * * * * ENTERPRISE PL/I AND DB2 V7.1 AND HIGHER * * * * UTILISE THE TASKLIB DDNAME IF BOTH YOUR PL/I COMPILER AND * * DB2 PRE-PROCESSOR DO NOT RESIDE IN THE LINKLIST AS YOU CAN * * ONLY SPECIFY ONE LIBRARY ON THE DSNAME PARAMETER * * * * NOTE: IF YOU DO NOT WANT DB2 PRE-PROCESSING, REMOVE THE SQL OPTION * * FROM THE PARMS AND COMMENT OUT THE DBRMLIB FLMALLOC * * * * * ********************** GENERAL NOTES ******************************** *---------------------------------------------------------------------* * CHANGE ACTIVITY: * * FLAG=REASON DATE ID DESCRIPTION * *---------------------------------------------------------------------* * $01 OA04093 2003/08/05 : NEW RELEASE * * $02 2005/05/16 : ADDED LANGUAGE DESCRIPTION * * $03 OA17586 2006/09/29 RX: INTEGRATED COMPILER. * * ADDED DB2*.**.SDSNEXIT TO THE TASKLIB TO INCLUDE * * CORRECT DSNHDECP MODULE. * * * *********************************************************************** FLMLANGL LANG=PLEDB2,VERSION=1,ALCSYSLB=Y,CHKSYSLB=BUILD, C LANGDESC='PLI ENTERPRIZE WITH DB2' * FLMINCLS TYPES=(PLI,PLINCL,DCLGENP) DB2DCLS FLMINCLS TYPES=(DCLGENP) * *********************************************************************** * --PARSER TRANSLATOR-* *********************************************************************** * FLMTRNSL CALLNAM='SCLM PL/I PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPGEN, C PORDER=1, C OPTIONS=(SOURCEDD=SOURCE, C STATINFO=@@FLMSTP, C LISTINFO=@@FLMLIS, C LISTSIZE=@@FLMSIZ, C LANG=I(I)) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * *********************************************************************** * --ENTERPRISE PL/I-*
739
*********************************************************************** * FLMTRNSL CALLNAM='ENTERPRISE PL/I COMPILER', C FUNCTN=BUILD, C COMPILE=IBMZPLI, C TASKLIB=TASKLIB, C VERSION=4.0, C GOODRC=4, C PORDER=1, C OPTIONS=(MACRO,OBJECT,SOURCE,XREF,PP(SQL)) * *********************************************************************** * --DDNAME ALLOCATION-* *********************************************************************** * FLMALLOC IOTYPE=O,DDNAME=SYSLIN,KEYREF=OBJ, C RECNUM=5000,DFLTTYP=OBJ * FLMALLOC IOTYPE=I,DDNAME=SYSLIB,KEYREF=SINC * FLMALLOC IOTYPE=W,DDNAME=SYSUT1,RECNUM=5000 * FLMALLOC IOTYPE=S,DDNAME=SYSIN,KEYREF=SINC,RECNUM=2000 * FLMALLOC IOTYPE=A,DDNAME=SYSTERM FLMCPYLB NULLFILE * FLMALLOC IOTYPE=A,DDNAME=SYSPUNCH FLMCPYLB NULLFILE * FLMALLOC IOTYPE=O,DDNAME=SYSPRINT,KEYREF=LIST, C DFLTTYP=LIST,PRINT=Y,RECNUM=5000 * FLMALLOC IOTYPE=P,DDNAME=DBRMLIB,MEMBER=@@FLMONM, C DFLTTYP=DBRM,KEYREF=OUT1, C RECFM=FB,LRECL=80,RECNUM=5000,DIRBLKS=1 * FLMALLOC IOTYPE=A,DDNAME=TASKLIB FLMCPYLB EPLI.V350.SIBMZCMP FLMCPYLB DB2.V810.SDSNEXIT FLMCPYLB DB2.V810.SDSNLOAD * FLMALLOC IOTYPE=I,DDNAME=DB2DCLS,KEYREF=SINC,INCLS=DB2DCLS * * * 5694-A01 (C) COPYRIGHT IBM CORP 1980, 2006 * * *
740
Appendix D.
Chapter 13 listings
Example: D-1 JCL: Invoke CICS Preprocessor and COBOL Compiler
//USERIDC JOB (AS05CR,T12,C531),'USERID',NOTIFY=USERID,CLASS=A, // MSGCLASS=O,MSGLEVEL=(1,1) //* //* THIS PROCEDURE CONTAINS 2 STEPS //* 1. EXEC THE CICS TS PREPROCESSOR //* 2. EXEC THE ENTERPRISE COBOL COMPILER //* //* CHANGE THE JOB NAME AND THE ACCOUNTING INFORMATION TO MEET THE //* REQUIREMENTS OF YOUR INSTALLATION. //* //* CHANGE 'PROGNAME' TO THE NAME OF THE CICS/COBOL PROGRAM YOU //* WANT TO COMPILE. CHANGE 'USERID' TO YOUR USERID. //* //* CHANGE 'DEVLEV' TO THE GROUP THAT CONTAINS THE PROGRAM TO BE COMPILED. //* //* STEP 1: TRN STATEMENT; STEP 2: EXEC PGM STATEMENT //* //TRN EXEC PGM=DFHECP1$, //* //* STEP 3: STEPLIB STATEMENT //* // REGION=2048K //STEPLIB DD DSN=CICS.TS31.CICS.SDFHLOAD,DISP=SHR //* //* STEP 4: SYSIN STATEMENT //* //SYSIN DD DSN=USERID.DEVLEV.SOURCE(PROGNAME),DISP=SHR //* //* STEP 5: SYSPRINT STATEMENT //* //SYSPRINT DD SYSOUT=* //*
741
//* STEP 6: SYSPUNCH STATEMENT //* //SYSPUNCH DD DSN=&&SYSCIN, // DISP=(,PASS),UNIT=SYSDA, // DCB=BLKSIZE=0, // SPACE=(CYL,(5,2)) //* //* STEP 7: COB STATEMENT; STEP 8: EXEC PGM STATEMENT //* STEP 9: PARM STATEMENT; STEP 10: COND STATEMENT //* //COB EXEC PGM=IGYCRTCL,REGION=2048K,COND=(4,GT), // PARM='NOTRUNC,NODYNAM,LIB,SIZE=256K,BUF=32K,APOST,DMAP,XREF' //* //* STEP 11: STEPLIB STATEMENT //* //STEPLIB DD DSN=Ecobol.V340.Sigycomp,DISP=SHR //* //* STEP 12: SYSLIB STATEMENT; STEP 13: DD STATEMENT CONCATENATION //* //SYSLIB DD DSN=CICS.TS31.CICS.SDFHCOB,DISP=SHR // DD DSN=CICS.TS31.CICS.SDFHMAC,DISP=SHR //* //* STEP 14: SYSPRINT STATEMENT //* //SYSPRINT DD SYSOUT=* //* //* STEP 15: SYSIN STATEMENT //* //SYSIN DD DSN=&&SYSCIN,DISP=(OLD,DELETE) //* //* STEP 16: SYSLIN STATEMENT //* //SYSLIN DD DSN=USERID.DEVLEV.OBJ(PROGNAME),DISP=SHR //* //* STEP 17: SYSUT1 STATEMENT //* //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 18: SYSUT2 STATEMENT //* //SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 19: SYSUT3 STATEMENT //* //SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 20: SYSUT4 STATEMENT //* //SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(5,2)) //* //* STEP 21: SYSUT5 STATEMENT //* //SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(5,2))
742
Example: D-2 SCLM Language Definition: Invoke CICS Preprocessor and COBOL
*********************************************************************** * SCLM LANGUAGE DEFINITION FOR * ENTERPRISE COBOL WITH CICS TS PREPROCESSOR 3.1 * * CICS TS OUTPUT IS PASSED VIA THE CICSTRAN DD ALLOCATION TO ENTERPRISE COBOL. * * POINT THE FLMSYSLB MACRO(S) AT ALL 'STATIC' COPY DATASETS. * CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS. * ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY. * WHEN A NEW TRANSLATOR VERSION REQUIRES TOTAL RECOMPILATION FOR THIS * LANGUAGE, THE 'VERSION' FIELD ON FLMLANGL SHOULD BE CHANGED. *********************************************************************** * COBCICS FLMSYSLB CICS.TS31.CICS.SDFHCOB * FLMLANGL LANG=COBCICS,VERSION=CICSTS31,ALCSYSLB=Y * * PARSER TRANSLATOR * FLMTRNSL CALLNAM='SCLM COBOL PARSE', C FUNCTN=PARSE, C COMPILE=FLMLPCBL, C PORDER=1, C OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,) * (* SOURCE *) FLMALLOC IOTYPE=A,DDNAME=SOURCE FLMCPYLB @@FLMDSN(@@FLMMBR) * * BUILD TRANSLATORS * - CICS PRECOMPILE - STEP NAME TRN * * STEP 1 FLMTRNSL CALLNAM='CICS PRE-COMPILE', C FUNCTN=BUILD, C * STEP 2 COMPILE=DFHECP1$, C * STEP 3 (* STEPLIB *) DSNAME=CICS.TS31.CICS.SDFHLOAD, C VERSION=3.1, C * STEP 10 (* COND *) GOODRC=4, C PORDER=1 * STEP 4 (* SYSIN *) FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80, C DDNAME=SYSIN * STEP 5 (* SYSPRINT *) FLMALLOC IOTYPE=O,RECFM=FBA,LRECL=121, C RECNUM=35000,PRINT=Y,DDNAME=SYSPRINT * * STEP 6 (* SYSPUNCH *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80, C RECNUM=5000,DDNAME=SYSPUNCH * *
Appendix D. Chapter 13 listings
743
* STEP 7 * STEP 8
* STEP
* STEP * STEP
* STEP * 1
* STEP * 7
FLMTRNSL CALLNAM='COBOL COMPILE', FUNCTN=BUILD, COMPILE=IGYCRCTL, 11 (* STEPLIB *) DSNAME=ECOBOL.V340.SIGYCOMP, VERSION=3.4.0, GOODRC=4, 22 PORDER=3, 9 (* PARMS *) OPTIONS=(NOTRUNC,NODYNAM,LIB,SIZE=256K,BUF=32K,APOST, DMAP,XREF)* DDNAME ALLOCATIONS 16 (* SYSLIN *) FLMALLOC IOTYPE=O,KEYREF=OBJ,RECFM=FB,LRECL=80, RECNUM=5000,DFLTTYP=OBJ 22 (* N/A *) FLMALLOC IOTYPE=N 22 (* N/A *) FLMALLOC IOTYPE=N 12; STEP 13 (* SYSLIB *) FLMALLOC IOTYPE=I,KEYREF=SINC 15 (* SYSIN *) FLMALLOC IOTYPE=U,KEYREF=SINC,DDNAME=SYSPUNCH 14 (* SYSPRINT *) FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=VBA,LRECL=137, RECNUM=500000,PRINT=Y,DFLTTYP=LIST 22 (* SYSPUNCH *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE 17 (* SYSUT1 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 18 (* SYSUT2 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 19 (* SYSUT3 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 20 (* SYSUT4 *) FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000 22 (* SYSTERM *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE
744
* STEP 21 * 13
(* SYSUT5 *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE (* SYSUT6 *) FLMALLOC IOTYPE=A FLMCPYLB NULLFILE
* STEP 22 * 14
745
746
Appendix E.
747
DD # 10 11 12 13 14 15 16 17 18 19 20
HLASM Not applicable Not applicable SYSTERM Not applicable Not applicable Not applicable SYSADATA Not applicable Not applicable Not applicable ASMAOPT
Enterprise COBOL SYSUT3 SYSUT4 SYSTERM SYSUT5 SYSUT6 SYSUT7 SYSADATA SYSJAVA SYSDEBUG SYSMDECK
COBOL for OS/390 SYSUT3 SYSUT4 SYSTERM SYSUT5 SYSUT6 SYSUT7 SYSADATA SYSIDL SYSDEBUG
PL/I for MVS Not applicable Not applicable Not applicable Not applicable SYSCIN
DB2 Precompile SYSUT3 Not applicable SYSTERM Not applicable SYSCIN Not applicable DBRMLIB
748
* SYSMSGS ddname is no longer used, but is kept in the list for compatibility with old assembler macros.
Appendix E. DDname substitution lists
749
750
Appendix F.
Additional material
This Redbooks publication refers to additional material that can be downloaded from the Internet as described below.
There is a README.txt file that is contained in the zip file that contains additional information.
INMR901I Dataset SCLM.PROJDEFS.REXX from DOHERTL on NODENAME INMR906A Enter restore parameters or 'DELETE' or 'END' + You can then reply as shown in Example F-2.
Example: F-2 Receive INDA(xxxx) reply
da(redbooks.sclm.projdefs.rexx)
752
Related publications
The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this IBM Redbooks publication.
Other publications
These publications are also relevant as further information sources: Software Configuration and Library Manager (SCLM) Guide and Reference, SC34-4817 SCLM Developer Toolkit Installation and Customization Guide, SC31-6970 IBM Merge Tool for z/OS and z/OS Users Guide, SC27-1694 Enhanced Access Control for SCLM for z/OS Users Guide, SC27-1591 Breeze Installation Guide, SC31-8819-08
Online resources
These Web sites are also relevant as further information sources: UNIX System Services:
http://www-03.ibm.com/servers/eserver/zseries/zos/unix/release/nmas.html#Header_2
753
754
Index
A
access rules validated by EAC 394 access 394 application 394 user 394 add file extension to editor associations 503 add files to SCLM 514 add local workstation files to SCLM 497 add long name files to SCLM 504 add new Group/Type data sets 669 add new long name file and save it in SCLM 505 add new project group 666 add non-SCLM PDS members to SCLM 499 adding merge file back into SCLM 425 adding new member by using the Eclipse editor 496 adding new members to SCLM 496 adding new SCLM administrator ids 215 adding project filter to a host connection 583 add-on products to SCLM 350 Enhanced Access Control for SCLM for z/OS 350 Merge Tool for z/OS 350 SCLM Administrator Toolkit 350 SCLM Developer Toolkit 350 administering project in the ISPF-based user interface 585 administering project using the graphical user interface 584 Administrator Toolkit 578 Administrator Toolkit terminology 580 allocate project partitioned data sets for DB2 support 94 ARCHDEF contains the list of all members of the Java project and dependencies to other projects are specified 542 ARCHDEF control builds and promotes 135 ARCHDEF generation 127 ARCHDEF keywords 145 ARCHDEF language 144 ARCHDEF member types 136 ARCHDEF naming convention 146 ARCHDEF Wizard 506 ARCHDEFs control builds and promotes 135 architecture definition (ARCHDEF) 135 Architecture Definition Wizard 579, 632 associate project in the IDE view with SCLM as the SCM provider 512 audit and delete notify exit 276 audit and delete verify exit 275 audit and version record 200 audit and version utility processing 196 audit and versioning options 490 audit reports 207 automatically promoting approved packages 372
B
Ballot Box tab 380 behind build 675 bind control member (DB2CLIST) 98 bind control object ( DB2 CLIST) 92 binding on different LPARs 100 Breeze contents tab display selected information 379 audit 379 browse 379 changes 379 summary tab display 378 explanation 378 collisions 378 description 378 last cast/pverify 378 last promote 378 next promote date start/end 378 package member 378 status 378 type 378 Breeze - step-by-step procedure for promotion 368 Breeze and EAC 410 Breeze and the SCLM promote process 367 Breeze components 352 batch utilities 352 CTS server 352 ISPF components 352 package database 352 user exits 352 Web interface 352 Breeze for SCLM 349 approvers and approver groups 360 approve only once 361 how Breeze identifies the approvers for a package 361 notifying approvers 361 Breeze and the SCLM promote process 367 promoting the approved package 372 automatically promoting approved packages 372 problems during promotion of the approved package 372 promotion with Breeze - step-by-step procedure 368 creating and building the package 368 promotions with Breeze 367 Breeze Promote user exits 367 promotions without Breeze 367 requesting approval to promote the package 369 returning control to SCLM 371 voting on the package 371 package is vetoed 371 rebuilding a package during voting or after ap-
755
proval 371 components 352 defining approver records 358 defining approver groups - JCL 361 uses of the NOTIFY ONLY flag 362 defining approvers - JCL 362 defining approvers and approver groups - concepts 360 defining inventory junction records - JCL 359 defining inventory locations - concepts 359 defining watch records 366 example of JCL to define all three types 363 defining approvers - JCL 362 parameters APPROVE ONLY ONCE 363 EMAIL1 - 3 363 ID 363 NAME 363 PHONE 363 REQUIRED 363 TSO SEND 363 install tasks 353 Breeze database 353 Breeze PTFs 353 Breeze Server 353 CIGINI 353 Java control 354 $$$$SMTP 354 $$COLL 354 $$EMER 354 $$EXCL 354 $$HTML 354 BRHTML 354 BZZ$CNTL 354 SCLM Integration 354 SMTP server 357 system requirements 353 installation 353 install tasks 353 introduction 351 other utility jobs 381 EAC and Breeze 387 sweep job 381 customized sweep job 382 SCLM Advanced Edition overview 350 viewing and voting on packages using the Breeze Web interface 373 filtering packages from the list 375 how voting results reaches approved or vetoed status 377 approved status 377 vetoed status 377 selecting a package for viewing or voting 375 voting on a package 376 viewing package information 378 Ballot Box tab 380 collisions tab 380 contents tab 379 log tab 379 notes tab 380
summary tab 378 Breeze identifing the approvers for a package 361 Breeze installation 353 Breeze introduction 351 Breeze main panel 374 areas 374 filter 374 in-box 374 information 374 list 374 status 374 packages information 375 approved 375 criteria 375 build user ID 375 last update date 376 last update user ID 376 package ID 375 promote date 376 promote user ID 375 promotion window 375 emergency packages 375 packages by status 375 pending 375 promoted 375 promotion failed 375 requiring my approval 375 standard packages 375 vetoed 375 Breeze promote user exits 367 what exits do 367 copy exit during second promote 368 purge exit during second promote 368 verify exit during first promote 367 verify exit during second promote 368 Breeze record types in order to vote on package promotions 359 approver group records 359 individual approver user records 359 inventory junction records 359 Breeze sweep job 381 Breeze utility jobs 381 browse version history 493 browsing versions 493 build and promote by change code 179 build and promote by change code warnings 179180 build exits - build exit - copy exit 252 build exits - build initial exit 250 build exits - build notify exit 251 build exits - build notify exit - common REXX 251 build or promote user exit example 277 build project 674 building an application architecture definition 171 building application through the IDE view 518 building high level (HL) architecture definitions 175 building members and Java projects 541 building members in SCLM build and promote by change code warnings 180 building an individual source member 168 build invocation from within edit 171
756
creating and building an application architecture definition 171 creating and building high level architecture definitions 175 running out of space errors (B37 / E37) 177 building members in SCLM"build and promote by change code 179 building project in SCLM 534 builds in batch 480
C
capabilities and restrictions 290 case study 661 clone an existing project 662 create architecture definitions for the new artifacts 685 edit the new project 664 add a new project group 666 add new Group/Type data sets 669 build the project 674 behind the build 675 change project definition and control information 665 change the language definitions 670 change the user exit information 672 migrate artifacts into the new project 677 migrate an artifact from a remote system into an SCLM-managed project on a z/OS host 681 migrate an artifact from a z/OS host into an SCLM-managed project on a z/OS host 677 change language definitions 670 change project definition and control information 665 change user exit information 672 checking access 406 choosing SCLM files for deployment 558 clone existing project 662 Clone Project Utility 620, 663 Accounting Dialog window 665 control data set 666 data set name field 665 export accounting 666 name 665 primary accounting 665 primary auditing 666 secondary auditing 666 version data set 666 version to retain 666 Cloning Project Name 663 include project data 663 new Alternate Name 663 new project an alternate 663 new Project Name 663 project group 666 alternate control options 668 authorizations 668 backout groups 668 group name 668 key 668 member restore 668 promotes to group 668
COBOL language translator 304, 312 COBOL with DB2 and CICS 112 collisions tab 380 common project control macros 25 FLMALTC 25 FLMATVER 25 FLMCNTRL 25 common REXX calling multiple exits 243 common site settings versus project specific setting 457 comparing versions 492 comparing with different versions 541 components of Administrator Toolkit 579 Architecture Definition Wizard 579 Enhanced Access Control (EAC) Wizard 579 Language Definition Wizard 579 Migration Wizard 579 Project Cloning Utility 579 Project Editor 579 User Exit Configuration 579 VSAM Maintenance Wizard 579 components of exit - parameters and exit files 244 components of exits - exit file 246 Condition Dialog window 615 action 615 group criteria 615 relation 615 return code 615 translator 615 conditonal migration 121 configuring workstation-based client 582 connecting to z/OS 465 contents tab 379 context menus 448 control compare processing using 202, 204 compare type 202, 204 listing DS name 203204 listing type 202, 204 sequence numbers 202, 204 convert existing JCL runstreams to SCLM language definitions 290 converting JCL statements to SCLM macro statements 291 copy exit vs JCL changes 125 COPY language 121 Create Architecture Definition window 633, 687 architecture definition name 633, 687 authorization code 633, 687 change code 633, 687 kind 633, 687 language 633, 687 linkage editor language 633, 687 listing 633, 687 mode 633, 687 output 633, 687 create architecture definitions for new artifacts 685 create EAC application 650 create new EAC profile 647 creating ARCHDEF from a load module 632 creating ARCHDEF from JCL 639 creating ARCHDEF from scratch 642
Index
757
creating language definitions from JCL 289 capabilities and restrictions 290 converting JCL statements to SCLM macro statements 291 conditional execution 292 executing programs 291 sample JCL conversion 293 macros and their parameters to understand 290 FLMALLOC 290 FLMCPYLB 290 FLMINCLS 290 FLMTCOND 290 FLMTOPTS 290 FLMTRNSL 290 preparing to convert 290 creating new project on the client by cloning an existing one 584 creating new project on the host by cloning an existing one 586 creating new script 555 creating own options with UOW processing 188 creating rules for change control team 401 creating rules for development 397 custom deployment 551 customized sweep job 382 cutover to SCLM 132
D
daemon 433 Data Set Allocation Dialog window 618 ALLCDEL 619 block size 619 catalog 619 DDname 618 default member 618 default type 618 DINIT 619 dir blocks 619 disposition 618 DSN type 619 include 619 IO type 618 keyword reference 618 language 619 MALLOC 619 member 619 no save RC 619 num records 619 print 619 record format 618 record length 619 VIO 619 database contents reports 483 day-to-day activities by a single user 539 DB2 bind/free language translator 102 DB2 suggested types and naming conventions 93 ARCHBIND 94 ARCHLEC 94 DBRM 93 DCLGEN 94
PKGBIND 94 PKGOUT 94 PLNBIND 94 PLNOUT 94 debug side file created outside of SCLM control 326 debug side file under SCLM 311, 323 Debug Tool 302 debug translators 344 debugging and fault analysis with SCLM 301 Debug Tool 302 history of SCLM and Debug Tool 302 how things have changed 302 invoking the debugger to run on your workstation using the WebSphere debugger 331 invoking the WebSphere debugger for batch programs from TSO 335 invoking the WebSphere debugger under CICS 333 turning debugging on in the WD/z client 331 oprtion 4 - debug side file created outside of SCLM control 326 option 1 - debug side file under SCLM - default temporary name 304 building your program 307 language translator requirements 304 testing using Debug Tool 308 option 2 - debug side file under SCLM - correct side file name at compile time 311 building your program 317 language translator requirements 312 testing using Debug Tool 318 option 3 - debug side file under SCLM - correct side file name at each group 323 building your program 324 language translator requirements 324 testing using Debug Tool 325 setting up your language translators 303 using compile listing file instead of side file 326 building your program 326 considerations when temporary name in load is not acceptable 328 language translator requirements 326 testing using Debug Tool 327 Fault Analyzer 337 telling Fault Analyzer where to find the side file 338 using an IDILANGX step in your SCLM translator 340 using debug translators 344 debugging on in the WD/z client 331 default perspective 448 defining approver and approver groups 360 defining approver groups - JCL 361 defining approver records 358 defining inventory junction records - JCL 359 defining inventory locations 359 defining languages translators for traditional compliers 39 language definitions based upon samples 40 Assembler 72
758
define include sets to identify the location of included members 73 define static copy libraries 72 define the language 73 specify the programs that process the modules 74 COBOL 43 define include sets to identify the location of included members 44 define the language 43 specify the programs that process the modules 44 COBOL with integrated CICS translator 51 define include sets to identify the location of included members 52 define static copy libraries 51 define the language 51 specify the programs that process the modules 53 COBOL with separate CICS precompile 55 define include sets to identify the location of included members 56 define static copy libraries 55 define the language 55 specify the programs that process the modules 57 PL/I 65 define include sets to identify the location of included members 66 define the language 65 specify the programs that process the modules 66 using ddnames and ddname substitution lists 41 z/OS binder/linkage editor 80 define the language 80 specify the program (linkage editor) that processes the modules 81 overview 40 writing build/copy processors 86 develop new translators example problem analysis 88 develop new translators example problem description 87 develop new translators example source code 89 ALLOCDBG 89 COBDTC 89 COPYMEMB 89 LIST 89 develop new translators example technical approach 88 develop new translators introduction 87 types of translators 86 defining watch records 366 delete EAC application 652 delete existing profile 649 delete initial exit 267 delete initial exit - example 268 delete notify exit 272 delete notify exit example 272 delete verify exit 270
delete verify exit - example 270 deleting a member from SCLM 540 dependencies 533 dependency processing 160 deploy Skeleton button 555 deployment 550 deployment in SCLM Developer Toolkit 551 deployment proper ties group 560 deployment with SCLM Developer Toolkit 549 action script 553 deployment in SCLM Developer Toolkit 551 creating a new script 555 choosing SCLM files for deployment 558 Deploy Skeleton button 555 Remote Deploy Skeleton button 556 Secure Deploy Skeleton button 557 select script from local file system 555 select script from SCLM 555 deployment properties group 560 group tags 559 managing deployment in an SCLM hierarchy 559 naming your script 558 running an existing script 554 running deployment in batch mode 559 scripting with XML 554 ANT 554 property script 553 types of deployment 550 custom deployment 551 SCLM to Websphere Application Server 550 Websphere Application Server on other host (remote) 550 Websphere Application Server on same host (local) 550 SCLM to z/OS USS 550 SCLM to z/OS USS (Remote) 550 usage scenarios - deployment in action 561 scenario 1 - SCLM to z/OS USS deployment 562 creating the script 565 introduction 562 invoking the script 567 preparation 562 verifying the results 568 scenario 2 - SCLM to WAS deployment 568 creating the script 570 introduction 568 invoking the script 572 preparation 568 verifying the results 573 developer mode versus Explorer mode 473 DT in a team environment 546
E
EAC and Breeze 410 EAC definitions 393 EAC is not used 391 EAC Manager and RACF data set profile feature 645 EAC Manager node 645 EAC Profile Dialog window 647 access 647 Index
759
application/function 647 description 647 profile 647 user 647 Eclipse 439 edit new project 664 edit user exit example 277 editing long name files with SCLM 506 editing member through the IDE view 517 editing members 474 editing members when member level locking is activated 216 editors 441, 445 enable DB2 support for your SCLM project 93 end-to-end usage scenario of typical Java application development lifecycle 531 Enhanced Access Control 389 additional considerations 409 Breeze and EAC 410 changes to Breeze JCL procedures 412 setting up a new application/function 410 setting up new profiles for Breeze 411 using multiple rule files 414 using the help from the violation panel 415 violation reason code 10 409 defining a sample access strategy for an SCLM project 396 checking access 406 violation when editing outside of SCLM 406 violation when performing a function you are not entitled to do 408 creating rules for change control team 401 creating rules for development 397 loading the new rules into memory 405 EAC definitions 393 applications 395 profiles 393 understanding the relationship between RACF and EAC 396 what happens when EAC is not used 391 Enhanced Access Control (EAC) Wizard 579 ensuring build script is configured 544 Enterprise COBOL parser FLMALLOC macro 45 IOTYPE=A 46 FLMCPYLB macro 45 @@FLMDSN(@@FLMMBR 46 FLMTRNSL macro CALLMETH 45 CALLNAM 45 COMPILE 45 FUNCTN 45 OPTIONS 45 PORDER 45 SNAME 45 example of a Profile definition and its access rules 394 example of a project specific configuration file 456 existing member in SCLM 159 exit call methods 242 ATTACH 242
ISPLNK 242 LINK 242 TSOLNK 242 exits during a edit - change code verification exit 249 exits during a edit - save change code exit 248 exits during a edit - verify change code exit 247 external compare 203 external compare parameters 203 ISPF data set 203 member 203 SCLM group 203
F
Fault Analyzer 337 IDIOPTS DDname user option data sets 338 Fault Analyzer IDIOPTS DDname user option data sets IDILCOBO 338 IDIADATA 338 IDILANGX 338 IDILC 338 IDILPLI 338 IDILPLIE 338 IDISYSDB 338 Fault Analyzer and side file 338 filtering packages 375 FLMALLOC macro DDNAME 46 FLMATVER macro parameter 30 activate versioning 30 enable checksum verification on version retrieval 31 group name 30 ignore sequence number differences 31 number of versions to keep 30 type name 30 FLMCNTRL and FLMALTC macro parameters 29 number of versions to keep 30 primary audit control data set 29 versioning partitioned data sets 29 FLMCNTRL MACRO with calls to user exits 243 FLMCSPDB DB2 bind/free translator parameters 101 ALTPROJ 101 DBRMTYPE 101 FUNCTN 101 GROUP 101 MEMBER 101 OPTION 101 PROJECT 102 SCLMINFO 102 TOGROUP 102 FLMINCLS macro 44 TYPES 44 FLMLANGL macro 43 ALCSYSLB 43 LANG 43 LANGDESC 43 VERSION 43 FLMLNK NOPROM service parameters 224
760
access_key 224 dd_msgs 225 group 224 member 224 msg_line 225 NOREBUILD 225 prj_def 224 project 224 REBUILD 225 REMOVE 225 sclm_id 224 type 224 FLMNPROM macro parameters 240 GROUP=(group1,group2,...)|* 240 ,LANG=(lang1,lang2,...)|* 240 ,NPROM=YES|NO 240 ,TYPE=(type1,type2,...)|* 240 FLMTRNSL macro 44
J2EEOBJ - J2EE ARCHDEF Translator 526 J2EEPART - J2EE text language part 525 JAVA - JAVA language translator (EBCDIC source) 525 Java and J2EE 437 Java/J22EE language definitions 525 Java/J2EE development terms 438 EAR 438 EJB 438 J2EE 438 JAR 438 WAR 438 Java/J2EE type requirments 526 JAVABIN - JAVA language translator (ASCII source) 525 JCL sample conversion 293 JCL to define all three types 363 JCL to invoke the remote debugger 336
K
kernel and the shell 433
G
generic and high level architecture definitions 98 group tags 559 group/type 581
L
Language Definition window 610 allocate syslib 610 archdef member 610 buffer size 610 check SYSLIB 610 COMPOOL output 610 default CREF 610 default source 610 description 610 editable members 610 rebuild dependents 610 scope 610 version 610 Language Definition Wizard 579, 609 language definitions 41 COBCICS Enterprise COBOL with separate CICS Precompile language definition 41 FLM@CCBE Enterprise COBOL with integrated CICS Precompile language definition 41 FLM@COBE Enterprise COBOL language definition 41 FLM@HLAS High-level assembler language definition 41 FLM@L370 z/OS binder/linkage editor language definition 41 FLM@PLIE Enterprise PL/I language definition 41 language definitions for DB2 support 95, 102 FLM@2ASM 95 FLM@2CBE 95 FLM@2PLE 95 FLM@BD2 95 FLM@BDO 95 language definitions for specific project requirements 19 FLMALLOC 20 FLMCPYLB 20 FLMINCLS 20 FLMLANGL 19 FLMLRBLD 20
H
Hierarchical File System 433 high level architecture definition to control link-edit and bind 97 High-Level (HL) architecture members 136 how voting results reaches approved or vetoed status 377
I
IBM implementation of UNIX on z/OS 432 IDE See integrated development environment IDE environment 527 IDE view (Eclipse projects) 528 IDILANGX step in your SCLM translator 340 importing additional members from SCLM 545 individual source member 168 installing products into the z/OS UNIX file system 435 integrated development environment 441 inventory and map to extract and SCLM datasets 124 invoking the WebSphere debugger for batch programs from TSO 335 invoking a program from JCL to invoke the remote debugger 336 invoking a program from REXX to invoke the remote debugger 335 ISPF Edit/Compare 161 ISPF-based interface 584 ISPF-based user interface 588
J
J2EEANT - J2EE ANT Verify/Build Translator 526 J2EEBIN - J2EE binary language part 525
Index
761
FLMSYSLB 19 FLMTCOND 20 FLMTOPTS 20 FLMTRNSL 20 language translators 303 LEC architecture definition for program with SQL 97 link-edit control ARCHDEF 137 listing audit and version information 490 listing deleted versions 493 listing projects in the ISPF panels 585 listing projects in the project filter 583 listing versions 490 Load modules not rebuilt at the next level 222 scenario 222 Load modules rebuilt at the next level (REBUILD) 222 scenario 222 loading new rules into memory 405 locking members (check-in & check-out) 540 log tab 379 long name short name translation 527
M
making dependent JAR files available 542 making host connection 582 managing deployment in an SCLM hierarchy 559 member as not being promotable 222 member level locking 213214 activating member level locking 214 adding new SCLM administrator ids 215 editing members when member level locking is activated 216 transferring ownership 218 Merge Tool 421 integrating the Merge Tool with SCLM 426 explanation of the sample code to perform the function 430 integrated Merge Tool in action 427 base file 427 file 1 427 file 2 427 options - Edit work file 428 options - Merge into SCLM 428 source type 428 start Col/End Col 428 usage out of the box 422 adding merge file back into SCLM 425 using Merge Tool to generate work and merge files 422 Merge Tool in action 427 Merge Tool integration with SCLM 426 Merge Tool to generate work and merge files 422 migrate an existing long name file into SCLM 504 migrate artifact from a remote system into an SCLM-managed project on a z/OS host 681 migrate artifact from a z/OS host into an SCLM-managed project on a z/OS host 677 migrate artifacts into new project 677 Migrate Asset Option window 679 authorization code 679 change code 679
date and time 679 group 679 language 679 mode 679 type 679 Migrate Asset Options window 625 authorization code 625 change code 625 date and time 625 group 625 language 625 mode 625 type 625 MIGRATE project definition 122 migrating projects to a SCLM repository 532 migrating to SCLM 119 ARCHDEF generation 127 creating ARCHDEFs 128 creating member listings 127 copy exit vs JCL changes 125 creating a migration plan 121 COPY language 121 migrate conditonally 121 migration timing 122 ordering your migration 122 creating alternate MIGRATE project definition 122 cutover to SCLM 132 archiving 133 backups 133 Breeze considerations 133 clearing out the test groups 132 code freeze 132 disaster recovery 133 in flight development code 133 planning 132 security 133 training 132 using new load modules 133 principles of migration 120 production freeze versus delta migration 123 running the SCLM Migration Utility 126 separating your source code into extract datasets 123 determine source inventory and map to extract and SCLM datasets 124 remove and or modify proprietary library code 125 Migration and Remote Migration Wizard 623 migration order 122 migration plan 121 migration principles 120 migration timing 122 Migration Wizard 579 Migration Wizard for host-based artifacts 623 mode of build 169 conditional 169 forced 169 report 170 unconditional 169 model ARCHDEF 146
762
N
naming script 558 navigating through the ISPF panels 585 new member in SCLM 155 non-ASCII Unicode file name support 528 NOPROM function 221 process of not promoting a member - causes REBUILD 228 process of not promoting a member - NOREBUILD 232 build after promotion of the not promotable member (NOREBUILD) 238 build containing a not promotable member (NOREBUILD) 234 build containing a not promotable member (NOREBUILD) at a level which does not contain the NOPROM member 238 promote containing a not promotable member (NOREBUILD) from a level not containing the NOPROM member 237 promote containing a not promotable member (NOREBUILD) from the same level containing the NOPROM member 236 restricting the setting of not promotable 239 examples 240 parameters 240 SCLM project setup when not promoting with no rebuilding of build maps 233 viewing the not promoted backup member 237 setting a member as not being promotable 222 NOPROM service 224 FLMCMD NOPROM service example 225 FLMLNK NOPROM service example 226 parameters 224 unit of work (Option 3.11) 223 using the N line command in Library Utilities (Option 3.1) 223 NOPROM service 224 NOREBUILD 232 issues need to backup the not promoted member 232 SCLM needs to be able to build at a level where a member was left behind 233 SCLM needs to be able to promote build maps at a level where a member was left behind 232 not promotable and that the build maps containing the not promoted member will not be rebuilt after promotion 223 not promotable but the build maps containing the not promoted member will be rebuilt after promotion 222 not promoting a member - causes REBUILD 228 not promoting a member - NOREBUILD 232 notes tab 380
perspectives, views, and editors 441 context menus 448 Eclipse online help 442 editors 445 integrated development environment 441 perspective layout 445 perspectives 445 specifying the default perspective 448 switching perspectives 446 views 445 workbench basics 439 Java and J2EE 437 z/OS UNIX file System 432 accessing the shell directly in ISPF 433 OMVS command 433 telnet or rlogin commands 433 TSO ISHELL command 433 basic UNIX concepts 432 daemons 433 Hierarchical File System 433 kernel and the shell 433 accessing the shell 433 guidelines for installing products into the z/OS UNIX file system 435 /etc 437 /usr/lpp 436 IBM implementation of UNIX on z/OS 432 utilizing z/OS UNIX 435 z/OS UNIX security 434 superuser authority 435 out of space errors 177 output from build 168 build listing 169 build messages 168 build report 169
P
package is vetoed 371 package PDS members information 33 perspective layout 445 perspectives 441, 445 switching 446 PL/I language translator 306 populating by ARCHDEF 469 populating by filter 468 populating explorer view 466 preference page under Team 524 preferences startup and shutdown 441 problems during promotion of the approved package 372 processing DB2 SQL program in SCLM 92 production freeze versus delta migration 123 programs that process modules 44 Enterprise COBOL compiler 46 Enterprise COBOL parser 44 Project Cloning Utility 579 Project Editor 579 project editor 591
O
Open Systems 431 Eclipse, Rational Application Developer, and WebSphere Developer for System z 439
Index
763
promotable 223 promote 182 promote copy exit 259 promote exits - promote initial exit 254 promote exits - promote verify exit 255 promote exits - promote verify exit - REXX 255 promote exits - verify exit - backup exit 256 promote purge exit 259 promote purge exit - example of a deploy exit 260 promote purge exit - REXX 259 promoting application through the IDE view 521 promoting approved package 372 promoting members 481 promoting members and Java projects 545 promoting up the hierarchy 181 SCLM Promote 182 promotions with Breeze 367 promotions without Breeze 367
S
sample access strategy for an SCLM project 396 sample EAC Application/Function for Promote 395 sample Java project 531 scenario 1 - SCLM to z/OS USS deployment 562 scenario 2 - SCLM to WebSphere Application Server deployment 568 SCLM Administrator Toolkit 577, 587 Architecture Definition Wizard 632 creating an ARCHDEF from a load module 632 creating an ARCHDEF from JCL 639 creating an ARCHDEF from scratch 642 Clone Project Utility 620 components of the Administrator Toolkit 579 EAC Manager and RACF data set profile feature 645 EAC Manager node 645 create a new EAC profile 647 create an EAC application 650 delete an EAC application 652 delete an existing profile 649 view EAC violations 652 view or edit an EAC application 650 view or edit an existing EAC profile 646 view, edit, create or delete EAC applications 649 view, edit, create or delete EAC profiles 646 RACF data set profile node 655 Language Definition Wizard 609 Migration and Remote Migration Wizard 623 Migration Wizard for host-based artifacts 623 Remote Migration Wizard for workstation-based artifacts 626 Project Editor 591 specifying data set types 593 specifying group and type data sets 595 specifying groups 593 specifying language definitions 596 specifying NOPROM service 600 specifying project settings and control data sets 591 specifying user exits 603 viewing the refactor tab 601 viewing the source tab 608 terminology used in the Administrator Toolkit 580 two user interfaces 588 ISPF-based user interface 588 workstation-based user interface 589 using the ISPF-based interface 584 administering a project in the ISPF-based user interface 585 creating a new project on the host by cloning an existing one 586 listing projects in the ISPF panels 585 navigating through the ISPF panels 585 using the workstation-based interface 581 adding a project filter to a host connection 583 administering a project using the graphical user interface 584 configuring the workstation-based client 582 making a host connection 582
R
RACF data set profile node 655 RACF Data Set Profile Wizard 657 created 657 erase 657 notify 657 owner 657 RACF profile 657 resource owner 657 retention period 657 security label 657 security level 657 SETROPTS 657 type 657 unit 657 universal access 657 volume 657 warning 657 your access 657 Rational Application Develope 439 Rational Application Developer editors 445 perspectives 445 views 445 rebuilding package during voting or after approval 371 recovering versions 495 Redbooks Web site 753 Contact us xviii refreshing status information 541 relationship between RACF and EAC 396 remote Deploy Skeleton button 556 Remote Migration Wizard for workstation-based artifacts 626 remove and/or modify proprietary library code 125 resources of a Java project 533 REXX to invoke the remote debugger 335 rules for coding ARCHDEF 144 running an existing script 554 running deployment in batch mode 559
764
creating a new project on the client by cloning an existing one 584 listing projects in the project filter 583 what is the Administrator Toolkit 578 who should use this product and why 588 SCLM Administrator Toolkit terminology 580 build/rebuild 580 clone 580 copybook editor 580 incomplete 580 parse 580 PDML 580 refactor 580 script 580 synchronized 580 unsynchronized 581 SCLM Advanced Edition 350 SCLM and Breeze promote process 367 SCLM and Debug Tool 302 SCLM architecture definition considerations 135 types of ARCHDEF members 136 compilation control architecture members 142 example CCDEFs 143 generic architecture members 144 high-level ARCHDEF 136 example - high level ARCHDEF 137 link-edit control ARCHDEFs 137 common ARCHDEFs in the ARCHDEF type 140 example - LEC ARCHDEFs in the ARCHDEF type 139 example - LEC ARCHDEFs in the LECDEF type 141 understanding the ARCHDEF language 144 ARCHDEF format 144 ARCHDEFs naming convention 146 common ARCHDEF keywords 145 creating model ARCHDEFs 146 documenting model ARCHDEFs 147 rules for coding ARCHDEFs 144 SCLM Audit and Version Utility Entry panel parameters 197 date from 197 date to 197 group 197 hierarchy view 197 member 197 option 197 project 197 type 197 SCLM audit version delete 275 SCLM build exits 250 SCLM delete exits 267 SCLM Developer Toolkit and your SCLM projects 525 SCLM Developer Toolkit configuration 449 overview 450 SCLM Preferences page 458 batch job monitor interval 459 batch monitor buttons 459 check for SCLM perspective each time mapping a
project 458 display results dialog for successful operations 458 enable batch job monitor 459 explorer mode/developer mode 459 log location 459 log SCLM operations 459 prompt to enable batch job monitor 459 refresh cached project information 459 save SCLM view 458 SCLM configuration project name 458 zip file size 458 setting up SCLM Developer Toolkit and your SCLM projects - administrator task 450 ISPF.conf 450 site and project configuration files 455 TRANSLATE.conf 453 setting up your IDE environment - user task 457 file type preferences page 462 language extension preference page 459 main preferences screen 458 site and project configuration files 455 settings 455 ASCII/EBCDIC 456 BATCHBUILDn/BATCHPROMOTEn/BATCHMIGRATEn 455 BUILDAPPROVER/PROMOTEAPPROVER 455 BUILDSECURITY/PROMOTESECURITY/DEPLOYSECURITY 455 CCODE 455 FOREGROUNDBUILD/FOREGROUNDPROMOTE 455 LONGLANG/NOLONGLANG 456 TRANLANG/NOTRANLANG 456 SCLM Developer Toolkit for Java Applications 523 actions available against SCLM managed project 529 add to SCLM 529 cancel edit / un-lock 530 check in member 530 check out Member 530 compare with different version 530 compare with latest version 530 delete member from SCLM 530 generate database content reports 530 get SCLM status 530 local info 530 logon 529 operations log 530 register project to SCLM 529 replace with latest from SCLM 530 SCLM import 529 synchronize project with SCLM 530 un-map project from SCLM 529 update authorization code 530 update member details 530 update project information 530 upload jar files 530 version information 530 view cached project information 530
Index
765
building members and Java projects ensuring ARCHDEF contains the list of all members of the Java project and dependencies to other projects are specified 542 ensuring build script is configured 544 making dependent JAR files available 542 deleting a member from SCLM options for delete action - item to delete 540 accounting record 540 build map 540 member 540 workspace file 540 overview 524 preference page under team 524 SCM actions accessible via context menu under team 524 SCM mapping configuration via Share Project wizard 524 setting up SCLM Developer Toolkit and your SCLM projects 525 Java/J2EE language definitions 525 J2EEANT - J2EE ANT Verify/Build Translator 526 J2EEBIN - J2EE binary language part 525 J2EEOBJ - J2EE ARCHDEF Translator 526 J2EEPART - J2EE text language part 525 JAVA - JAVA language translator (EBCDIC source) 525 JAVABIN - JAVA language translator (ASCII source) 525 Java/J2EE type requirments 526 setting up your IDE environment 527 special considerations 527 long name short name translation 527 non-ASCII Unicode file name support 528 synchronize action status 547 conflict 547 locked 547 not in SCLM 547 outdated 547 potential conflict 547 usage scenarios - end to end usage scenario of typical Java application development lifecycle 531 day-to-day activities by a single user 539 building members and Java projects 541 comparing with different versions 541 deleting a member from SCLM 540 importing additional members from SCLM 545 locking members (check-in & check-out) 540 promoting members and Java projects 545 refreshing status information 541 migrating projects to a SCLM repository 532 building the project in SCLM 534 describing the dependencies 533 describing the resources of a Java project 533 sample Java project 531 using DT in a team environment 546 synchronizing a SCLM managed project 546 working with the IDE view - Eclipse projects 528
SCLM Developer Toolkit for mainframe development 463 adding long name files to SCLM add a new long name file and save it in SCLM 505 migrate an existing long name file into SCLM 504 developer mode versus Explorer mode * 474 DEV* 474 DEV1 474 DEV1* 474 developer mode 473 explorer mode 473 developer mode versus explorer mode explorer mode group values 474 using the architecture definition wizard 506 working with the SCLM explorer view 464 adding new members to SCLM 496 add new member by using the Eclipse editor 496 adding local workstation files to SCLM 497 adding non-SCLM PDS members to SCLM 499 audit and versioning options 490 browse version history 493 browsing versions 493 comparing versions 492 listing audit and version information 490 listing deleted versions 493 listing versions 490 recovering versions 495 before you begin 464 building members 478 invoking builds in batch 480 connecting to z/OS 465 editing members 474 SPROF processing 476 viewing accounting information 477 populating the explorer view 466 developer mode versus Explorer mode 473 populating by ARCHDEF 469 populating by filter 468 viewing multiple projects in the view 472 promoting members 481 running database contents reports 483 running the same report again 489 working with the SCLM IDE View 509 add the files to SCLM 514 associate the project in the IDE view with SCLM as the SCM provider 512 building the application through the IDE view 518 editing the member through the IDE view 517 promoting the application through the IDE view 521 working with workstation files in a mainframe environment 502 adding file extension to editor associations 503 adding long name files to SCLM 504 editing long name files with SCLM 506 SCLM edit 153, 155 going into SCLM for the first time 154 SCLM edit 155
766
additional options in SCLM edit 161 SCREATE command 161 SMOVE command 161 SPROF command 161 SREPLACE command 161 creating a new member in SCLM 155 dependency processing 160 editing an existing member in SCLM 159 ISPF Edit/Compare command 161 making SCLM edit work the way you want it to 162 hierarchy view 163 process - execute, submit or view options 165 select and rank member list data 162 show member description 164 updating authorization codes 165 view processing options for edit 163 SCLM exit call methods 242 SCLM exit parameter passing 244 SCLM exits during a edit 247 SCLM explorer view 464 SCLM for the first time 154 SCLM IDE View 509 SCLM language definition macros 40 FLMALLOC - Allocation definitions (Optional) 40 FLMCPYLB - Copy library definitions (Optional) 40 FLMINCLS - Include set definitions (Optional) 40 FLMLANGL - Language identifier definition (Required) 40 FLMSYSLB - System library definitions (Optional) 40 FLMTRNSL - Translator definitions (Optional) 40 SCLM language translator requirements 312 Enterprise COBOL language translator 312 SCLM Migration Utility 126 SCLM project environment 4 basic security considerations 35 control data sets 35 PROJDEFS data sets 35 project partitioned data sets 35 choosing your SCLM languages 19 modifying example language definitions 19 choosing your SCLM types 15 Deferred Data Set Allocation 16 data set naming conventions 17 flexible naming of project partitioned data sets 17 defining your hierarchy 10 emergency maintenance 14 establish authorization codes 11 example of multiple authorization codes 12 parallel development 14 project hierarchy sample 10 rules governing SCLM project hierarchies 10 logon proc and FLMLIBS considerations 36 preallocate ISPF temporary data sets to VIO 36 SCLM batch considerations 36 project controls 21 audit control data set 22 common project control macros 25 data set naming conventions 23 export accounting data set 22
member level locking 24 miscellaneous 24 maximum lines per page 24 translator option override 24 VSAM record level sharing 24 primary accounting data set 21 SCLM temporary data set allocation 23 secondary accounting data set 22 project definition languages to use 4 options, such as audit and versioning 4 rules to move data within the hierarchy 4 structure of the project hierarchy using groups and types 4 project definition data 4 sample project 5 steps to set up the sample project 6 understanding the sample project definition 8 language definitions 9 project definition macros 8 SCLM control data 4 setting up the project for package backout 32 Package Backout example project definition 35 Package Backout step-by-step instructions 34 Package Backout utility- overview 32 setting up your accounting and project data sets 25 create the accounting data sets 25 create the export data sets 26 create the project partitioned data sets 26 PDS vs PDSE considerations 27 some recommendations 28 setting up your audit and versioning capability 28 audit and versioning capability overview 28 create the audit control data sets 31 create the versioning partitioned data sets 32 PDS vs PDSE considerations 32 setting up the project definition 29 FLMATVER macro paramete 30 FLMCNTRL and FLMALTC macro parameters 29 user application data 4 SCLM project setup 3 SCLM promote exits 254 SCLM promote function has three phases 367 copy the source members and any build outputs 367 purge the source members from the current group 367 verify that the package has been built 367 SCLM roles 3 project administrator 3 user 4 SCLM terminology used with Administrator Toolkit 581 alternate project 581 ARCHDEF 581 migrate 581 SCLM to Websphere Application Server 550 SCLM to z/OS USS (Remote) 550 insecure 550 secure 550 SCLM type requirements to store Java/J2EE projects
Index
767
526 ARCHDEF 526 J2EEBLD 526 J2EEEAR 526 J2EEJAR 526 J2EELIST 526 J2EEWAR 526 JAVACLAS 526 JAVALIST 526 source types 526 SCLM utilities 185 SCLM audit and version utility processing 196 audit reports 207 SCLM audit and version record 200 SCLM external compare 203 SCLM version compare 201 SCLM version retrieve 204 SCLM version selection panel 198 viewing a version 205 viewing version history 206 unit of work processing 186 creating your own options with UOW processing 188 SCLM z/OS USS 550 SCM actions accessible via context menu under Team 524 SCM mapping configuration via Share Project wizard 524 SCREATE command 161 scripting with XML 554 secure Deploy Skeleton button 557 select script from local file system 555 select script from SCLM 555 selecting package for viewing or voting 375 separating source code into extract datasets 123 setting up SCLM Developer Toolkit and your SCLM projects (Administrator task) 450 setting up your IDE environment (user task) 457 site and project configuration files 455 SMOVE command 161 specifying data set types 593 specifying group and type data sets 595 specifying groups 593 specifying language definitions 596 specifying NOPROM service 600 specifying project settings and control data sets 591 specifying user exits 603 SPROF command 161 SPROF processing 476 SREPLACE command 161 summary tab 378 switching perspectives 446 synchronizing SCLM managed project 546
use the SET DEFAULT LISTING command 308 use the SET SOURCE command 310 testing with Debug Tool 308 transferring ownership 218 Translator Parameters window 613 call method 613 call name 613 compile 613 data set name 614 function 613 good RC 614 input list processing 614 max good RC 614 no save external 614 options 614 override options 614 param keyword 614 PDS data 614 PORDER 614 step label 613 task library DD 614 version 614
U
unit of work processing 186 UNIX concepts 432 usage scenarios - deployment in action 561 User Exit Configuration 579 user exit processing 241 additional SCLM user exit example 277 audit and version delete 275 audit and delete notify exit 276 FLMCNTRL Parameters 276 audit and delete verify exit 275 FLMCNTRL parameters 275 components of a exit - parameters and exit files 244 exit file 246 exit file layout 246 exit parameter passing 244 parameter parsing 245 examples of user exits 242 exit call methods 242 sample FLMCNTRL MACRO with calls to user exits 243 sample common REXX calling multiple exits 243 SCLM build exits 250 build initial exit 250 FLMCNTRL parameters 250 build notify exit 251 FLMCNTRL parameters 251 build notify exit - example of a copy exit 252 build notify exit - example of the common REXX 251 SCLM delete exits 267 delete initial exit 267 FLMCNTRL parameters 267 delete initial exit - example 268 delete notify exit 272 FLMCNTRL parameters 272 delete notify exit - example 272
T
tailor project definition for DB2 support 97 tailoring languages for package bind and plan bind 95 testing using Debug Tool 308 use the EQADEBUG DD specification 309 use the EQAUEDAT user exit 311
768
delete verify exit 270 FLMCNTRL parameters 270 delete verify exit - example 270 SCLM exits during a edit 247 change code verification exit 249 FLMCNTRL parameters 249 edit exits warning 249 save change code exit 248 FLMCNTRL parameters 248 verify change code exit 247 FLMCNTRL parameters 247 SCLM promote exits 254 promote copy exit 259 FLMCNTRL parameters 259 promote initial exit 254 FLMCNTRL parameters 254 promote purge exit 259 FLMCNTRL parameters 259 promote purge exit - example of a deploy exit 260 promote purge exit - example of the common REXX 259 promote verify exit 255 FLMCNTRL parameters 255 promote verify exit - example of a backup exit 256 promote verify exit - example of the common REXX 255 utility panel exit 276 example 1 - BZZXXCDT user exit 277 example 2 - bind external exit 280 user exits 242 user interfaces 588 using help from the violation panel 415 utility panel exit 276 utilizing z/OS UNIX 435
view EAC violations 652 view or edit an EAC application 650 view or edit an existing EAC profile 646 view, edit, create or delete EAC applications 649 view, edit, create or delete EAC profiles 646 viewing accounting information 477 viewing and voting on packages using the Breeze Web interface 373 viewing multiple projects in a view 472 viewing package information 378 viewing refactor tab 601 viewing source tab 608 views 441, 445 violation reason code 10 409 violation when editing outside of SCLM 406 violoation when performing a function you are not entitled to do 408 voting on package 376 voting on the package 371 VSAM Maintenance Wizard 579
W
WebSphere Application Server on other host (remote) 550 WebSphere Application Server on same host (local) 550 WebSphere debugger for batch programs from TSO 335 WebSphere debugger under CICS 333 WebSphere Developer for System z 439 Workbench basics 439 workbench basics 439 working with workstation files in a mainframe environment 502 workstation-based interface 581 workstation-based user interface 589 writing DB2 translators and bind processing 91 enable DB2 support for your SCLM project 93 add DB2-specific types 93 additional language definitions for DB2 support 95 allocate project partitioned data sets for DB2 support 94 binding on different LPARs 100 create a HL architecture definition to control link-edit and bind 97 create a LEC architecture definition for program with SQL 97 create bind control member (DB2CLIST) 98 create generic and HL architecture definitions 98 tailor project definition for DB2 support 97 tailoring languages for package bind and plan bind 95 FLMCSPDB DB2 bind/free translator 101 FLMCSPDB invocation parameters 101 overview 92 bind control object ( DB2 CLIST) 92 processing of DB2 SQL program in SCLM 92 sample language definitions for DB2 support 102 COBOL with DB2 and CICS 112 DB2 bind/free language translator 102 Index
V
version compare 201 version retrieve 204 version retrieve parameters 204 auth code 204 data set name 204 to group 204 to type 204 version selection panel 198 Version Selection panel parameters 199 A 199 action date 199 action reason 199 action time 199 C 199 D 199 group 199 H 199 member 199 R 199 status 199 type 199 userid 199 V 199 X 199
769
define include sets to identify the location of included members 103 define the language 102 specify the programs that process DB2CLIST members 103 DB2 bind/free output language translator 108 define the language 108 specify program that promote copies DB2OUT members 109 specify program that promote purges DB2OUT members 110 storing DB2 declarations in a different library from program includes 112 COBOL support - multi-step 113 PL/I support 115
Z
z/OS UNIX file system 432 z/OS UNIX security 434
770
Getting Started with SCLM: A Practical Guide to SCLM and SCLM Advanced Edition
Back cover