Application Development

Chapter 10. Accessing Libraries

Panther's libraries and repositories store screens, reports, binary JPL files and other application components. To ensure that all members of your development and design team have access to the same information and sets of standards, you want to allow everyone access to these libraries and repositories. For the purpose of this discussion, the term library describes both libraries and repositories.

The development process often depends on coordinating write-access to these files—allowing access by several people and providing a means of knowing when changes were made.

In addition to providing its own mechanism for controlling multi-user access to libraries and repositories, Panther also provides an interface to source control management systems, specifically SCCS, PVCS and MSSCCI, that let you take advantage of source management systems while in the editor environment.

Panther provides:

Libraries provide a convenient way to distribute a large number of screens with an application, and improves efficiency by eliminating paths searches at runtime and the number of files that are open. You can have multiple Panther libraries open during development and at runtime. As for repositories, while you can create multiple repositories, you can only have one open at a time during an editor session, and its contents should be accessible to the entire development team.

Configuring Your Library Access

Two-tier applications
For two-tier applications, application objects are stored in libraries, such as client.lib. To provide access to the entire team, store the libraries on a common file server.

JetNet and Oracle Tuxedo applications
For the JetNet and Oracle Tuxedo middleware adapters, there are three basic libraries: client.lib, common.lib and server.lib.

You can open the appropriate libraries for the application servers, application clients, and developers by setting SMFLIBS.

During development, the libraries can be stored on the application server and accessed remotely by the developers, in order to be available to the entire development team. For remote access, the application must be configured with a file access server (devserv). For more information on configuring servers, refer to Chapter 3, "Configuring the Enterprise," in JetNet/Oracle Tuxedo Guide.

COM and MTS applications
For COM/MTS applications, a client library (by default client.lib) contains the user interface elements of the application. A server library (by default server.lib) contains the service components and is generally located in the application directory. For more information, refer to Chapter 5, "Deploying COM Components," in COM/MTS Guide.

Managing Library Access

Accessing Library Members Outside of Source Control

If you do not use or have a source control management system, Panther provides support for controlling multi-user access to screens, reports, menus, and JPL modules in libraries.

Panther's approach to multi-user access is to inform rather than enforce. To prevent inadvertent damage, Panther informs you if another user currently has a "reservation" on (that is, write-access to) a file you are trying to open, save, or delete; but you are given the opportunity to "steal" the reservation.

This method pre-supposes a high degree of communication and cooperation among the members of your development team. For example, a user who initially has a reservation on a screen might later find, when attempting to save or delete it, that another user now has the reservation. The first user can, of course, steal the reservation back, but stealing reservations without adequate communication between users can result in the loss of someone's work.

While Panther provides enough information to prevent inadvertently damaging another's work in progress, it does not enforce file locking. Users are responsible for checking with the holder of a reservation before deciding whether or not to steal it.

If you require a more secure file-locking method to control multi-user access, use one of the third-party source control management systems that Panther supports.

Opening Library Members

Panther warns you if you choose to open a library member (screen, report, JPL module, or menu file) that is being edited (open with read/write privileges) by another user. You can choose to steal the reservation or open the library member with read-only privileges. If you choose Yes to steal the reservation; the requested library member opens with read and write privileges; choose No to open the member with read-only privileges.

A read-only library member is displayed with the last saved changes. If you edit a read-only file, you can use FileSave As to save the library member with a different name.

Closing Library Members

When you choose to close a library member (having read-write privileges) that you have been editing, Panther displays the following message:

Do you want to release your reservation of <filename@lib>?

Choose Yes to release the reservation; the library member closes and is available for editing (write-access) by other developers.

Choose No to keep the reservation; the library member closes and can be open as read-only by other developers.

Releasing a Reservation

To automatically release a reservation whenever you close library members, choose OptionsAuto Release on Screen Close. The message for releasing a reservation no longer displays; the reservation is automatically removed and the closed screen is available with read/write privileges to developers.

Maintaining Libraries Under Source Control

The process of putting a library under source control places the contents—its library members—under source control management. Therefore, you must check library members into a source controlled library (more on check-in later) to actually place the individual members under source control. For the purpose of this discussion, it is assumed that library members or repository entries—screens, reports, JPL modules, or menu files—when checked in, are stored by the source control management system.

Use of source control management systems requires that your path allows you to run the Panther utilities f2asc, jpl2bin and m2asc if you are not storing the screens in binary. These utilities converts the screens, reports, JPL and menus to ASCII before they are checked in. Additionally, users of PVCS must set the VCSID and VCSCFG variables. For more information, refer to your vendor's documentation.

Before putting a library under source control, you must have a new or populated library (created within the screen editor or by formlib using the -c option).

How to Provide an Interface to Your Source Control Manager

  1. From the command line, type:
    formlib -g "sourceMgr [-b] mgrArgs" library

    For example, for SCCS support, use:

    formlib -g "sccs devdir" dev.lib

    Or for PVCS, use:

    formlib -g "pvcs c:\DEV\ARCHIVE" dev.lib

    Or for MSSCCI (Microsoft Source Code Control Interface), use:

    formlib -g "scpi Provider='Jazz MSSCCI Provider' ProjectName='Panther First Project' LocalProjPath='c:\Panther First Project sandbox'" dev.lib


    Name of the installed source control management driver—either sccs, pvcs or scpi (lowercase).


    Optional flag that causes Panther to store files in the configuration management system in binary.


    A string that is used by the sourceMgr-specified driver.

    For SCCS, supply the name of the source control directory—either relative to the library's directory or an absolute path—where the application-related files are to be stored.

    For PVCS, supply the name of the archive directory—either relative to the library's directory or an absolute path—where the screens and revised files are to be stored.

    For MSSCCI, a list of tokens and values separated by equal signs. The values can be quoted using single, double or back quotes; otherwise, spaces and backslashes should be escaped with backslashes. The supported tokens are:


    Name of the Panther library or repository that you are putting under source control management.

  2. If the library already contains members, invoke the screen editor so that you can check in screens, reports, JPL and menus to the source control management system:
  3. If you want to check in a screen from another library:

Library Members Under Source Control Management

There are three features of source control management available to you when you open a library whose contents are being maintained under source control management. You can open a copy of a file so that you can edit it or you can open it read-only. You can also check changes in and take full advantage of the features offered by your source control manager to monitor those changes.

The following options are available from within the editor workspace so that you can update and view library members (screen, reports, menus, styles, and JPL modules) by choosing the desired option:

How to Edit a Library Member Under Source Control Management

  1. If the library or repository is not open, choose FileOpenLibrary or Repository.
  2. Select the desired library/repository to view its contents.

    All members of the selected library/repository are listed in the appropriate Open dialog. Those members currently checked out are listed along with the name of the user and date and time of check out.

    Figure 10-1 Checked out library members are identified on the Open dialog boxes.

    Note: Ownership information, that is, the user who has the library member checked out, might not reflect the latest source control management status. This is due to the fact that source control can be executed outside Panther. Panther updates the status once you make a selection.

  3. Select the desired member from the list. If multiple revisions of the library member are stored in the source management directory, you can choose which revision to open.
  4. Edit the library member as required.

    You can make changes, and save (choose FileSave) those changes as often as you need to without checking the member back into source control. As long as the member is checked out to you, other users can only retrieve a read-only copy. Moreover, the read-only copy is created from the last check_in; it does not reflect the latest changes saved to the library. Once you are done with the library member, and are satisfied with the edits, you can check it back into the source control management system.

    Note: Choosing FileSave does not perform a check into source control. You must proceed to step 5 to update the source copy.

  5. Choose FileSource MgmtCheck In. The library member closes and the lock is released.

    If you made changes since the member was last saved, you are prompted to save those changes to the library:

How to Save a Read-only Library Member and Store It Under Source Control Management

  1. Make sure the open repository or selected library is under source control management (converted with the formlib utility).
  2. Choose the appropriate FileSave As option. The Save As dialog box opens.
  3. Enter a name for the library member. If you want to save the member with the name as one that already exists, enter the name or select it from the list.
  4. If there are multiple revisions of the member in source control, you can choose which revision should get the latest changes. Choose OK.

    Note: Saving a library member does not check it into the source control management system.

  5. Choose FileSource MgmtCheck In.

How to Delete a Library Member that Is Under Source Control

You can remove the working version of a screen (or other member) from the library under source control, but the source (previous versions) are not removed. To remove all traces of an entry, you must access your source control management system directly (outside of Panther).

Cancelling a Check Out

When you open a library member that is in a library under source control management, a write-lock is enforced on that member. Another user cannot edit the file.

In the event that you do not want to edit the member, or you don't want to save the changes you've made since you checked it out, choose FileSource MgmtCancel Check Out.

A cancelled check out means that your current edits, even saved edits, are not saved to the source control management system. The library member in source control management remains unchanged. The write-lock is removed and another user can now check out the member.

Note: Choosing FileRevert restores a screen to its last saved copy as it exists in the library; it does not restore to the copy that was last checked into the source control management system.