HPlogo ALLBASE/SQL COBOL Application Programming Guide: HP 9000 Computer Systems > Chapter 1 Getting Started with ALLBASE/SQL Programming in COBOL

Maintaining ALLBASE/SQL Programs

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

After ALLBASE/SQL COBOL programs are in production use, changes in applications, personnel, or databases may necessitate:

  • Updating application programs.

  • Changing program-related authorization.

  • Obsoleting application programs.

Updating Application Programs

Minor modifications to programs in use can often be made right on the production machine and production DBEnvironment during hours the production DBEnvironment use is minimal. Major program modifications, because they are more time consuming, are usually made on a development machine and development DBEnvironment.

In either case, the OWNER of the program's module or a DBA preprocesses the revised program and replaces the old module with a new one. Existing RUN authorities can be either preserved or revoked. Dropping old modules and preserving or revoking RUN authorities can be done either by using the DROP MODULE command in ISQL or when you invoke the preprocessor.

The PRESERVE option of the DROP MODULE command retains any existing RUN authorities for the module when it is deleted from the system catalog:



   isql=> DROP MODULE mymod PRESERVE;

To delete a module and any existing RUN authorities in ISQL, simply omit the PRESERVE option.

You can also drop a module and revoke any existing run authorities for it at preprocessing time. The -d option tells the preprocessor to drop any existing modules named modulename; if you omit the -d option, a new module is created only if a module named modulename does not exist.



        $ psqlcbl somedbe -m modulename -i mysource.sql -d

This invocation line drops any existing module named modulename but retains any related RUN authorities. To revoke the run authorities, you would specify the -r (revoke) option in the command string.

The DROP MODULE command is also useful in conjunction with revised programs whose modules must be installed in a DBEnvironment different from that on which preprocessing occurred. Before using the INSTALL command to store the new module, you drop the existing module using the DROP MODULE command, preserving or dropping related RUN authorization as required.

Changing Program-Related Authorization

Once a program is in production use, the following authorization changes may be necessary:

  • Granting and revoking RUN and CONNECT authority as program users change.

  • Transferring ownership of the stored module when the current owner's job changes or when a program needs to be modified by someone other than the individual who created it.

Revoking CONNECT authority requires DBA authorization:



   isql=> REVOKE CONNECT FROM oldlogin;

Revoking RUN authority requires either module OWNER or DBA authority:



   isql=> REVOKE RUN ON modulename FROM oldlogin;

Obsoleting Programs

When an application program becomes obsolete, you use the DROP MODULE command to both remove the module from any DBEnvironment where it is stored and revoke any related RUN authorities:



   isql=> DROP MODULE mymod;

Related RUN authorities are automatically revoked when you do not use the PRESERVE option of this command.

Feedback to webmaster