HPlogo ALLBASE/SQL Pascal Application Programming Guide: HP 3000 MPE/iX Computer Systems > Chapter 1 Getting Started with ALLBASE/SQL Pascal Programming

Maintaining ALLBASE/SQL Programs

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

After ALLBASE/SQL Pascal programs are in production use, changes in applications, personnel, or databases may necessitate doing the following tasks:

  • Updating application programs.

  • Changing program-related authorizations.

  • 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 in which 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 as in the following example:

   isql=> DROP MODULE MyMod PRESERVE;

While in ISQL, to delete a module and any existing RUN authorities for it, simply omit the PRESERVE option.

You can also drop a module and any existing run authorities for it at preprocessing time:

   :RUN PSQLPAS.PUB.SYS;INFO='SomeDBE (MODULE(MyMod) DROP)'

This invocation line drops the module named MyMod, but retains any related RUN authorities. To revoke the RUN authorities, you would specify the REVOKE option in the INFO 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, you may need to grant and revoke RUN and CONNECT authority as program users revoking CONNECT authority in the following example requires DBA authorization:

   isql=> REVOKE CONNECT FROM Old@User;

Revoking RUN authority as shown below requires either module OWNER or DBA authority:

   isql=> REVOKE CONNECT FROM Old@User;

Revoking RUN authority requires either module OWNER or DBA authority:

   isql=> REVOKE RUN ON Pgmr1@Pascal.SomeMod FROM Old@User;

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