This chapter describes how you can share resources with other programmers using Mainframe Express workgrouping facilities.
Application Workgrouping in Mainframe Express enables a team of programmers to share resources. A network server holds all the source files, load modules and other resources for an application. You only copy to your PC the individual files you need to work on. You can still run and debug the whole application using the shared files, with Mainframe Express automatically substituting any files stored on the local PC. This brings the following benefits:
Workgrouping enables you to share application files by storing them in libraries held on different levels. We recommend that you use a Production level for storing your Production level sources and a Development level for sources under development.
When you build or run the application, Mainframe Express looks in the Development level first for source and executable files. If they are not in that level, it then searches a Production level. This has two advantages:
You can also add up to eight testing levels between the Development and Production levels. By default, these are named Testing #n, where n is a number; for example, Testing #2. If you do create Testing levels, these are searched before the Production level. Your workgroup will also contain a System level at the bottom of the tree that contains system executables. For more information on the workgroup levels, see the section Workgroup Levels
The diagram below illustrates the workgrouping model. It shows a workgroup with two PCs accessing application files from a server over the network. The server holds the Production level with all the source files for the application (accpay.cbl, accrec.cbl and custlist.cbl). PC A has a copy of accrec.cbl in its Development level. When PC A rebuilds or debugs the project, it sees its own local copy of accrec.cbl and the Production level sources for accpay.cbl and custlist.cbl. PC B sees its own local copy of accpay.cbl and Production level versions of accrec.cbl and custlist.cbl. The way Mainframe Express searches for files is explained in more detail in the section Concatenation and Searching.
Figure 5-1: Example of Workgroup Sharing Files
This chapter shows how you use a workgrouped project that has already been set up by your system administrator:
How Mainframe Express displays a workgrouped project.
How programmers work with a workgrouped application.
How you can best exploit Mainframe Express library and folder concatenation.
Detailed step-by-step instructions for individual tasks are in the online help, rather than in this chapter. Click Help Topics on the Mainframe Express Help menu then on the Contents tab click Development Environment, Using Workgroups, How to.
The Workgroup View of a project (selected by clicking the Workgroup tab on the Project View), displays the components of a project as a set of libraries, as shown below.
Figure 5-2: Workgroup View of a Project
The left-hand pane uses a tree view to display the elements of the workgroup. These elements are:
The numbers in brackets after each element show the total number of files it contains. An element can be selected by left clicking. A selected element is highlighted in inverse video. In Figure 5-2, folder U:\mfuser\projects\gsdemo\ACCTDEMO\SOURCE has been selected.
The right-hand pane lists the files contained within the currently-selected element. You can reorganize the columns in the right-hand pane so that the "Level" column is more easily visible (as shown in Figure 5-2). Although the columns displayed in this pane are the same as those displayed in the Files View, the kinds of files that are listed are different. The Workgroup View lists:
However, it does does not show copybook files that cannot be found on the search path.
If you disable a level or folder, the files in that level or folder are still displayed but have the status Disabled in Project. For information on how to disable and enable levels and folders, see the section Concatenation and Searching.
For more information on the kinds of files shown in the Files View, see the section Files Details View in the chapter on The Mainframe Express Interface.
As in the Files view, you can double-click on a source file to edit it. The title bar of the edit window contains the file path and, in the Workgroup view, the workgroup level is also shown, for example, d:\mfuser\projects\myproject\source\myfile.cbl [Development].
Notes:
You can have up to eleven levels in a project. When a new project is created, it contains two levels with the default names Development, at the top of the tree, and System, at the bottom of the tree. If you have been provided with a workgroup by you administrator, you will also have a Production level. You use the Development level for storing development level sources. The System level contains various source, dependency and load libraries that are used to store system files. You can create up to eight testing levels containing files under the Development level. Testing levels are assigned the default names Testing #n, where n is a number; for example, Testing #2. You can rename any level.
When you build or run the application, Mainframe Express searches through the tree for source and executable files starting at the top of the tree - the Development level. If it does not find the files that it needs in any of the lower levels, it uses the files in the Production level. We recommend that you keep the System level at the bottom of the tree; this ensures that the system files are always included in a search. For more information on searching, see the section Concatenation and Searching.
Your system administrator sets up and maintains the Production level, which stores files centrally so that they are accessible to everyone in the workgroup. You only need to copy the files on which you are working to the Development level.
Each level contains a number of libraries. They are for storing different categories of file. The different library types are described below:
Each library contains one or more different types of folder. For example, the Source Library folder types can include All sources, COBOL, CLIST and JCL. Whenever you add a new library folder, you are prompted with a list of all the valid types for that particular library. For a full list of the different types of folder in each library, see the online help. Click Help Topics on the Mainframe Express Help menu. Then on the Contents page click Reference, Development Environment, Workgroup Libraries and Workgroup Library and Folder Types.
Each Library folder type contains one or more folders. A folder is either a directory on a PC or network server or a directory on a mainframe PDS accessed via SourceConnect. Load library folders are the only folders that cannot be located on the mainframe.
Your system administrator is responsible for setting up a workgroup project and all the resources needed to work on the project. See the chapter Projects and Workgrouping in your Administrator's Guide for more information. You are given a copy of the project file for use on your PC and possibly other catalog and resource files, depending on how the administrator has set up the project.
It is also possible for an administrator to distribute projects by creating template projects which you can use to create your own copy of a project. You then select the required template from a list in the New Project Wizard. See the section Setting Up a Project in the chapter Projects and Workgrouping of your Administrator's Guide for more information.
Mainframe Express enables any member of the workgroup to add, modify or delete files in any level or folder, including the files at the Production level. Therefore, the system administrator should assign network access rights so that members of the team only have write permission for their own working files and folders within Staging libraries at the Development level or at intermediary levels (such as Testing) belonging to other members of the workgroup.
The Production level in the project you are given is populated with the files for the application you are going to work on. Copy the files that you want to edit to the Development level. The Development level is populated with a set of default folders, as well as any folders created by the system administrator to reflect the development model used by your organization. You can also add your own folders to any Development or Testing level as needed - see the section Working with Folders for more information.
To use a workgrouped project:
You can copy a file by dragging it from the right-hand pane of the Project View and dropping it in the left-hand pane onto the folder where you want the copy located. To make this easier, if you drag a file over the + symbol next to an unexpanded part of the tree, it will automatically open. Also, if the tree occupies more than the full height of the pane, it will scroll if you drag to the top or bottom edges of the pane. You can only copy a file to the same type of library and folder. For example, a Development file in the JCL folder of the Source Library can only be copied to the JCL folder of the Source Library on the test level. However, that this has no effect for proclibs and control cards because they are catalogued PDSs, not PC files.
Alternatively, you can right-click the folder where you want the files to be located, click Add Files, and then use the Add Files To Project dialog box. The lower part of this dialog consists of a group of controls called Options. If you enable Copy into folder, then the file(s) specified in the top part of the dialog box are not just added to the project but are also copied to the specified folder.
If you select Autolevel from the Add to level field, files are added automatically to a level. The level selected is based on particular rules; for more information, see the section Modifying Workgroup Libraries.
You can also remove files from any library folder at any level. Right-click the file or selected files in the right-hand pane and the Remove Files From Project dialog box appears. Click OK to confirm. This dialog box also offers you three options:
For detailed instructions on using the system catalog, see the online help. Click Help Topics on the Help menu then on the Contents tab click Development Environment, Emulating the Mainframe, Dataset Catalog, Catalog Functions, How to.
Your system administrator can also use Staging folders to coordinate and control the movement of files between the members of a workgroup. This can be done by assigning each member a Development level. The folders within this level have access permission set so that other members of the workgroup can only read the Staging folder. It is then the responsibility of the owner of each level, or the system administrator, to copy files from the Staging folder to the appropriate Testing folder.
Mainframe Express supports search paths for data files as well as source files. This enables you to use different data locations depending on the workgroup levels in use, and works for all types of data source. If a data file isn't found during debugging, you are prompted to enter the file's location, and Mainframe Express adds the location you specify to the project.
You specify the location of data files using the following subcategories of the Data Libraries folder in the Workgroup View:
If you have specified in the catalog that a data file uses workgroup-style search paths, Mainframe Express uses the concatenation of folders specified by Catalog Data and All Data from the levels defined in Workgrouping.
Consider the following workgrouping structure:
Figure 5-3: Workgroup-style Data Search Paths
Based on the above structure, Mainframe Express processes data files that use workgroup-style search paths as follows:
Notes:
You can modify the workgroup tree at any time by right-clicking an element of the tree. A pop-up menu appears. Right-clicking levels gives a different pop-up menu to right-clicking types or folders.
If you right-click the name of a level, you can:
You can change the order of all levels, except the top level, by dragging and dropping them.
If you right-click the name of a library or a type, you can:
Figure 5-4: Add Files To Project
This dialog box enables you to add selected files from a folder, or to add the entire contents of a folder, including the contents of any subfolders.
The selected file(s) will be added to a library folder of the correct type in the currently selected level (specified in the Add to level field) of the tree view, adding a folder type to the tree if necessary. If Autolevel is selected in the Add to level field, files are added to the project at a suitable level, using the following rules:
If you add a file to a project by right-clicking while editing the file and clicking Add file to project, the rules above are used to determine where the file should reside.
The Recent folders dropdown list enables you to change the selected folder to a recently selected folder without having to traverse the tree view. You can click Add All to add all the files of the specified type within the selected folder.
The options section enables you to copy the files into a specified folder. You can browse for the folder or type a pathname. If the folder does not exist, it is created. Note that this feature means that you no longer have to use Explorer or some other method of creating folders for your working files.
You can also specify a catalog entry for your copy of the file by checking Add into PDS.
You can also specify that the selected files are to be added to a different level.
You enter the type and location of the folder. You can also enter an optional description of the folder.
If you right-click the name of a folder, you can add files and folders (as described above for libraries and types). Also you can:
When you add a folder, its place in the tree depends on the currently selected item:
You can change the order of the folders within a library by dragging and dropping.
Folders can have either an absolute path, specifying the exact location on a PC or the network, or a path relative to the project file. Relative paths are always displayed as starting <ProjectFolder>.
For example <ProjectFolder>\source\ is a subfolder of the project file folder, called source. When you set up a folder, you can specify relative paths by typing either <ProjectFolder> or .\.
The IDE classifies folders into different types according to what is stored in them. For example, Source Library folder classifications include CLIST, COBOL and JCL. When you add a new folder, you are presented with a list of all the appropriate types for the library to which you are adding the folder. For a full list of the different types of library, see the online help. Click Help Topics on the Help menu then on the Contents page click Reference, Development Environment, Workgroup Libraries, Workgroup Library and Folder Types.
When you add new levels and folders to a project, you are setting up a concatenated path down which Mainframe Express searches whenever it needs to locate files in the project. As soon as a file is found, the search stops. You can add multiple folders of the same type to a library, each with a different location, if you want to work with different versions of the same file. You can exclude a folder from the search path by unchecking the check box to the left of the folder name. The folder that is currently in use for output by the project (because it is enabled and because it is the highest folder of its type in the tree) has a blue check box.
You can include or remove any level or folder in the project from the concatenated search path. Levels and folders have a check box before their names. The check box status has the following meanings:
Folders are always searched starting from the top of the list to the bottom. If a file is not found in the Development level, Mainframe Express searches in the Testing levels, if present, and so on down the tree to the Production level and finally the System level. Disabled levels and folders are skipped. The example folder structure below is simplified to show only the COBOL folders for the Source libraries in the Development level and a Production level:
Figure 5-6: Concatenated Source Folders
Whenever you build the project shown in Figure 5-5, Mainframe Express searches for source files starting with the Development level Source library <ProjectFolder>\version1\. If the files are not found, Mainframe Express searches <ProjectFolder>\. If the files are still not found, Mainframe Express searches the Production level Source library g:\payroll\SOURCE. In this example, Mainframe Express skips <ProjectFolder>\version2\ as it has been deselected (there is no check mark in the check box).
Under each type of library, you can also have a folder type of All, for example All Sources and All Load Modules. These are special folder types and are searched only after any specific folder types. This enables you to use the All folder type as a general purpose library. The next example is a simplified view of a set of Load libraries at the Development and Production levels.
Mainframe Express searches folders for COBOL loadable modules in this order:
Figure 5-7: Concatenated COBOL Load Library Folders
In the case of IMS loadable modules, Mainframe Express searches in this order:
Figure 5-8: Concatenated IMS Load Library Folders
You can change the order of the folders by dragging and dropping.
When you compile any programs in your application, the loadable modules are always written to the first available load library folder of the appropriate type. This happens regardless of the location of the source file. If you recompile a source file stored at the Development level, the loadable module generated by the compiler is written into a load library at the highest checked level (where the check is blue).
For example, in the Workgroup View example shown in Figure 5-6 above, when you compile the COBOL program, the loadable module would be written to <ProjectFolder>\coblib1\ regardless of the location of the source file, provided that the folder is checked . But if <ProjectFolder>\coblib1\ were unchecked , Mainframe Express would be forced to write the loadable module to <ProjectFolder>\coblib2\.
When you rebuild a project, Mainframe Express follows a set of rules to determine which files need rebuilding and where to build them. For each file in the project:
The timestamp is the date and time of the file on disk.
If any of these checks fail, Mainframe Express rebuilds the loadable module. Mainframe Express writes the newly created loadable module to the first available Load library folder of the appropriate type.
When Mainframe Express checks the source file dependencies it also follows a similar search path down all the appropriate Dependency library folders.
A blue check box indicates that this folder at this level is where the loadable modules are written if you build the project. If you see a black check box where you expect to see a blue one, look in load libraries at higher levels for blue check boxes and uncheck them.
A gray check box indicates that this folder is where the loadable modules would be written if the level were enabled. If you see a gray check box where you expect to see a blue one, change the level check boxes.
Copyright © 2006 Micro Focus (IP) Ltd. All rights reserved.