Chapter 6: Source Code Control Interface

This chapter tells you, as administrator, how to get the Mainframe Express SCC interface working on your users' machines so that they can use Mainframe Express to access and edit files stored in your SCM. We assume that your SCM is already installed and working at your site and that you are familiar with administering it.

This chapter is intended as a guide for all SCC-compliant SCMs, but it uses MERANT PVCS Dimensions as an example throughout. It includes brief instructions for the necessary steps in Dimensions. Many steps are the same as if your users were using Dimension's native client interface, PC Client. For complete instructions, see Dimensions' own documentation. Its Generic Product Guide is a good overview.

The concepts of SCC and the SCC interface in Mainframe Express are introduced in the chapter Source Control in the Mainframe Express Getting Started book. Dimensions is introduced there too.

If you want to use workgrouping with SCCs, and/or use project templates, the chapter Source Control and Workgrouping in the Getting Started covers these subjects.

6.1 Overview

Essential steps in enabling your users to use your SCM via Mainframe Express will be something like the following, which are for Dimensions.

Ensure you are logged in with a user ID that has all necessary permissions. In Dimensions the built-in user ID, pcms, has all necessary permissions.

Throughout, note that changes you make may not be picked up by Mainframe Express on each user's machine until the next time the user restarts Mainframe Express.

6.2 Details

6.2.1 Configure the SCM to Recognize Mainframe Express

You may need to configure your SCM to add Mainframe Express to its list of recognized IDEs.

In the case of Dimensions, the default rules for IDEs are loaded automatically during the creation of Dimensions base databases or are already present in the Entry_Level or Intermediate demonstration products. If you have upgraded from a previous version of Dimensions or the expected rules are not present, you must reload the default rules. This adds definitions for the additional IDEs supported by Dimensions 7.0.

You do this using the IDE Setup utility supplied with Dimensions to load the default rules from an SQL file called scc_setup.sql. This file is supplied with Dimensions and specifies default settings for various well-known IDEs. You can alter these settings if you wish either by editing this file or by overtyping them in IDE Setup. However, the standard settings should be suitable for most purposes.

Run IDE Setup as follows:

  1. Login to IDE Setup.

  2. Click the dropdown list by Select IDE Environment.

    If Mainframe Express is in the list, there is nothing you need do, and you can exit from IDE Setup. If Mainframe Express is not in the list, continue.

  3. Click Load Default Rules for IDEs .

    This runs scc_setup.sql. You see it running in a character window. For each IDE already known to Dimensions, you see a message saying it's already known. This run just is just adding the new one, Mainframe Express.

  4. When the run finishes, type Exit to exit from the character window, click OK on the message saying the default rules have been loaded successfully.

  5. Click the dropdown list beside Select IDE Environment.

  6. The list now includes Mainframe Express. Select it, and click Next.

    This screen and the next show the settings that have been loaded from the scc_setup.sql. You can change settings on these screens, but these default settings should be suitable for most purposes.

    This screen associates filename pattern matches with item types known to Dimensions. For example, the entry with %.cbl in the Filename Pattern Match column and SRC in the Item Type column means that any file with an extension of .cbl will be treated as an item of type SRC.

  7. Click Next

    On this screen you can specify files to be excluded from being stored in Dimensions. In the default settings for Mainframe Express there are none.

  8. Click Exit.

If this process has not been done, Mainframe Express users trying to connect to Dimensions get the message:

Error: The valid set IDE_Projects does not include an entry for 
the IDE Mainframe Express

6.2.2 Create the Location for Archives

Depending on your SCM, you may need to specify where in the filestore managed by the SCM the archives are to be stored. If users running the tutorials in the Getting Started book are accessing the same database, you may want to allocate each user his or her own location for tutorial archives to prevent them clashing.

In the case of Dimensions, you create a Product and a Workset to which user archives will belong. You could for example set the real production Product and Workset as the default on every user's machine, and tell each user to switch to their own Product and Workset when running the tutorials.

6.2.2.1 Create a Product

To create a Product, you use the Process Modeller utility supplied with Dimensions.

:

  1. Login to Process Modeller.

  2. Select Product Definition and click Next.

  3. Click Add.

  4. Fill in the fields on the New Product dialog box - note down the ID you give the Product - and click OK.

  5. Click Prev to return to Process Modeller main screen.

    When creating a Product you need to create an Item Library for that Product.

  6. Select Object Type Definitions and click Next.

  7. Click Library and then Define Default Library.

  8. Enter the Host Name and Directory Path for the Item Library for the Product.

  9. Click OK twice.

  10. Click Prev to return to Process Modeller main screen.

6.2.2.2 Create a Workset

Having created a Product, you can create a Workset. You use Dimensions' native client interface, PC Client:

  1. Login to PC Client.

  2. Click File > New > Workset.

  3. On the New Workset dialog box, select the desired Product and fill in the other fields- note down the name you give the Workset - then click OK.

6.2.2.3 Make them the Default

Once you have a suitable Product and Workset, you can make them the default on each user's machine. On each machine:

  1. Login to PC Client.

  2. Click Workset > Change.

  3. On the Select Workset dialog box, select the desired Product and Workset and click Make default.

6.2.3 Get the Client Interface Working

When Mainframe Express is started on a client machine, it looks for an installed SCM and links to it. By default, it links to the one most recently installed. If it finds one, the menus in the Mainframe Express IDE include a Source Control menu, and the Output Window includes a Source Control tab. Also, a splashscreen may briefly appear identifying the SCM, if the SCM provides one and is configured to display it.

It does not matter whether the SCM was installed before or after Mainframe Express was installed. The Mainframe Express installation procedure does not look for an SCM. Only starting Mainframe Express does that.

The part of the SCM that needs to be present on the client machine is its SCC interface support. Depending on the SCM, this may be built into the SCMs native client interface, or may be a separate option. In any case, it may be useful at first to have the native client interface present, to monitor the effects of using the SCM via Mainframe Express.

In the case of Dimensions, the option that must be present is the SCC Interface option; the native user interface is PC Client. For other SCM's, see the SCM's own documentation.

6.2.4 Add Users

Your SCM may require you to register the user ID of everyone who is to use it.

First authorize all your users to access the network server running Dimensions Server. Use the User Manager in Windows (Start > Programs > Administrative Tools > User Manager) to add users as authorized users of the server.

Then add them as Dimensions users:

  1. Login to Process Modeller.

  2. In the Select Product Id field, select the desired product from the dropdown list.

  3. Select User Registration and click Next.

  4. Ensure Select Account Type is set to Normal.

  5. Click Add.

    (If Add is grayed out, you have logged in with a user ID that does not have the TOOL_MANAGER role.)

  6. For each user, fill in the fields on the Add a New User Account dialog box - note down the Account Name and User Login Id you give it - and click Apply.

  7. Click Cancel.

  8. Click Prev to return to Process Modeller main screen.

6.2.5 Set User Permissions

If your SCM requires you to register the user IDs of everyone who is to use it, you may need to give users appropriate access permissions.

In the case of Dimensions, you need to give each user an appropriate role, allowing at least Browse, Check Out and (for the tutorials) Delete for all items in the Dimensions SCC project:

  1. Login to Process Modeller.

  2. In the Select Product Id field, select the desired product from the dropdown list.

  3. Select Role Definitions and Assignments and click Next.

  4. Ensure Type of Role Assignment is set to Real.

  5. Click Add.

  6. To give a user a role, fill in the fields on the Assign Roles to Users dialog box and click Apply. You need to give each user at least the role DEVELOPER and, for the tutorials, PRODUCT-MANAGER.

  7. Click Cancel.

  8. Click Prev to return to Process Modeller main screen.

If a user tries to connect and does not have an appropriate role, they get a message such as "Cannot open the source control project .....", or "You do not have a role to create this item". In the Source Control tab in the IDE's Output window they may get:

Error: Cannot connect to PVCS Dimensions
Login incorrect at xxxx

where xxxx is the user's ID.

6.2.6 Set Administrator Permissions

You may need to configure your SCM to ensure that any user ID you intend to use for administration has suitable permissions.

In the case of Dimensions, administration can only be done from a user ID that is a TOOL_MANAGER. To create user IDs and assign roles, you need to be logged on as a TOOL_MANAGER yourself. The default user ID, PCMS, is a TOOL_MANAGER.

To create a Workset, you must have the role PRODUCT-MANAGER. You can give a user ID this role as described in the section Set User Permissions.

To make a user ID a TOOL-MANAGER:

  1. Login to Process Modeller.

  2. In the Select Product Id field, select the desired product from the dropdown list.

  3. Select User Registration and click Next.

  4. Ensure Select Account Type is set to Normal.

  5. If the desired user ID is not shown in the list, create it as in the section Add Users.

  6. Select Tool-Manager from the dropdown list by Select Account Type.

  7. If the desired user ID is not shown in the list it is not a TOOL_MANAGER, so make it one:
    1. Click Add.

    2. Select the desired user ID from the dropdown list and click OK.

  8. Click Prev to return to Process Modeller main screen.

6.2.7 Give Users Information

You need to give your users information to connect to the SCM. If your SCM requires you to register the user ID of everyone who is to use it, this will include their individual login details.

In the case of Dimensions, you need to give users information to enter in the Remote Login dialog box they get when connecting. Give all users:

and give each individual user:

The remaining fields in the Remote Login dialog box are:

You may also need to tell your users the location where the SCM is to store their archives. In the case of Dimensions, this is the Product and Workset. You can use PC Client to set the default Product and Workset on each machine, but you may want to give each user a different Product and Workset to use for running the Getting Started tutorials.

6.3 Commands Sent to SCM

You can see in the Source Control tab in the Output window the commands that Mainframe Express sends to the SCM and the resulting messages from the SCM. Depending on the SCM, these may be simply routine progress messages, or you may need to watch them for error messages. Many SCMs display error messages in message boxes rather than through the messages displayed here. Mainframe Express itself displays messages here reporting the success or failure of its calls to the SCM. The fact that a call reports success does not necessarily mean the entire operation succeeded - you still need to check the SCM's messages.

As background information, we will look briefly at an example of what you see in the Output window in the case of Dimensions.

When you use the Add to source control function with Keep checked out selected, Mainframe Express sends Dimensions two commands for each file. For a file called VSAMDEMO.CBL in project Sccdemo, you would see something like the following (shown here formatted for ease of reading, and assuming the Product and Workset are $PRODUCT1:$WORKSET1):

CI "$PRODUCT1:$WORKSET1 VSAMDEMO CBL.1-SRC" 
/PART="$PRODUCT1:$PRODUCT1.1"
/FORMAT="CBL"
/WS_FILENAME="sccdemo\SOURCE\VSAMDEMO.CBL"
/FILENAME="$workset1-vsamdemo-01.cbl"
/COMMENT="Item revision created by PVCS Dimensions SCC Interface"
/NOKEEP
/DESCRIPTION="Item uploaded into Dimensions"
/USER_FILENAME="e:\mfuser\projects\gsdemo\sccdemo\SOURCE\VSAMDEMO.CBL"
Operation completed
 
	 
EI "$PRODUCT1:$WORKSET1 VSAMDEMO CBL.A-SRC;1" 
/USER_FILENAME="e:\mfuser\projects\gsdemo\sccdemo\SOURCE\VSAMDEMO.CBL" Extracted Item $PRODUCT1:$WORKSET1 VSAMDEMO CBL.A-SRC;2 Operation completed

The CI (Create Item) command creates the file in Dimensions. Then because Keep checked out was selected the EI (Extract Item) command is sent, which checks it out. Note that the version number shown in the "Extracted Item" message is 2, because this is a new revision created for you to edit.


Copyright © 2001 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.