Compaq ACMS for OpenVMS
Getting Started


Previous Contents Index

12.5 Authorizing ACMS Applications

ACMS requires that the application database (.ADB) file reside in the directory associated with the logical name ACMS$DIRECTORY. Because this directory can be protected from unauthorized use, all application databases in ACMS$DIRECTORY remain secure.

Your application, EMPLOYEE_INFO_APPL_xxx.ADB, is currently located in your default OpenVMS directory. However, ACMS cannot find it there. You must install your application in ACMS$DIRECTORY after your system manager uses the Application Authorization Utility (AAU) to authorize both you and your application.

To use AAU to authorize tutorial users to install their applications in ACMS$DIRECTORY, follow these steps:

  1. Define AAU as a global symbol in your login command file. Then initialize the symbol by executing your login command file:


    $ AAU :== $ACMSAAU 
    


    $ @LOGIN.COM
    

  2. Set the default directory to SYS$SYSTEM:


    $ SET DEFAULT SYS$SYSTEM
    $
    

  3. Invoke AAU:


    $ AAU
    AAU>
    

    If an ACMSAAF.DAT file does not exist yet in the SYS$SYSTEM directory (that is, this is the first time invoking AAU), AAU displays a message stating that it is unable to open ACMSAAF.DAT and prompting the system manager to create a new file. If the file does exist already, AAU returns the AAU> prompt.
    Creating this database is the first step of a two-step process. The system manager first uses the Application Authorization Utility (AAU) to create the database ACMSAAF.DAT in the SYS$SYSTEM directory. The system manager then adds to this file a list of applications and users who are authorized to install them.

  4. By authorizing users to install applications, system managers can free themselves from having to install all applications and from having to give those users privileged access to ACMS$DIRECTORY. When the system manager creates a new ACMSAAF.DAT database, AAU creates a DEFAULT authorization with an empty access control list; that is, by default no users are authorized to install applications in ACMS$DIRECTORY.
    Enter the ADD command with an /ACL qualifier to authorize the application and the user who can install it:


    AAU>  ADD EMPLOYEE_INFO_APPL_xxx /ACL=(ID=[uname],ACCESS=CONTROL)
    %ACMSAAU-S-APPLADD, Appl name EMPLOYEE_INFO_APPL_XXX has been added 
    to the database
    AAU>
    

    This command authorizes application EMPLOYEE_INFO_APPL_xxx and authorizes user uname to install it. The /ACL qualifier overrides the default access control list. Remember that uname is the tutorial user's OpenVMS account name, and EMPLOYEE_INFO_APPL_xxx represents this user's application name (check with the tutorial user for the exact name).

  5. Enter the SHOW command to verify the user's application name in the ACMSAAF.DAT database:


    AAU> SHOW EMPLOYEE_INFO_APPL_xxx
    


    ======================================================================= 
    Appl name:      EMPLOYEE_INFO_APPL_XXX 
    Appl Username:  * 
    Server Usernames: 
       * 
    Access Control List: 
       (IDENTIFIER=[ACMS,UNAME],ACCESS=CONTROL) 
    ======================================================================= 
    AAU> 
    

    This display verifies that user UNAME is authorized to install the application database file EMPLOYEE_INFO_APPL_xxx.ADB. The asterisks in the application and server user name fields mean that the user names in the .ADB file are the only user names allowed for the application and the server.

  6. Exit from AAU.

Other AAU commands let the system manager specify more characteristics of individual applications, authorize all applications with the $ALL keyword, remove authorizations, and change authorization names. See Compaq ACMS for OpenVMS Managing Applications for more information about AAU.

12.6 Defining the ACMS$DIRECTORY Logical

The system manager needs to verify that the ACMS$DIRECTORY logical is associated with the device and directory where ACMS applications are to be stored. In the case of a new ACMS installation, the system manager may not yet have set up a protected directory for storing ACMS applications. If not, the system manager must first set up such a directory before defining the logical that points to it. Defining the ACMS$DIRECTORY logical must be done before the tutorial user can install the tutorial application.

If other ACMS applications are already on the tutorial user's system, the ACMS$DIRECTORY logical has been defined already. To verify the logical and define it, perform the following steps:

  1. Enter the SHOW LOGICAL command to see whether ACMS$DIRECTORY has been defined on the tutorial user's system:


    $ SHOW LOGICAL ACMS$DIRECTORY
    

    If the logical is defined, the subsequent display shows the disk and directory location that the logical points to. If the display states that the logical is undefined, then proceed to the next step and define it.

  2. Set your default directory to SYS$MANAGER and run the ACMS_POST_INSTALL.COM command procedure located there:


    $ SET DEFAULT SYS$MANAGER
    $ @ACMS_POST_INSTALL.COM
    

    This command procedure defines all the standard ACMS logicals.

With the successful completion of this step, the tutorial user can proceed to install the application and run it.


Chapter 13
Installing and Running the Application

This chapter describes how to install and run your tutorial application. Before running the application, you perform steps to start the ACMS system (if not running) and to start your specific application. After running your application, you perform steps to stop your application and stop the ACMS system (if no one else is using it).

13.1 Installing the Application

When you install an application, ACMS checks the ACMSAAF.DAT database to determine whether you are authorized to install that application. If so, ACMS copies the database to ACMS$DIRECTORY, deletes any earlier versions, and changes the user identification code (UIC) of the .ADB file to [1,4].

If you are not authorized to install the application, ACMS returns an error message indicating that you are not authorized. (Your system manager must have authorized you and your application with the AAU, as explained in Section 12.5.)

You install your application database file in ACMS$DIRECTORY by executing the ACMS/INSTALL command at DCL command level.

To install your application in ACMS$DIRECTORY, follow these steps:

  1. Make sure that your system manager has defined the system logical ACMS$DIRECTORY to be associated with the device and directory where ACMS applications are to be stored. Enter the SHOW LOGICAL command to see whether ACMS$DIRECTORY has been defined on your system:


    $ SHOW LOGICAL ACMS$DIRECTORY
    

    If you receive a message stating that ACMS$DIRECTORY is undefined, ask your system manager to define it before trying to install your application.

  2. To perform INSTALL, you must be in the directory where your application (EMPLOYEE_INFO_APPL_xxx.ADB) is located. If you are not, then set the default directory to the directory where your application files are located:


    $ SET DEFAULT udisk:[uname]
    

  3. Issue the ACMS/INSTALL command to install your application:


    $ ACMS/INSTALL EMPLOYEE_INFO_APPL_xxx
    


    %ACMSINS-S-ADBINS, Application UDISK:[UNAME]EMPLOYEE_INFO_APPL_XXX 
    has been installed to ACMS$DIRECTORY 
    $ 
    

    The message indicates that you have successfully installed your EMPLOYEE_INFO_APPL_xxx.ADB application database file in ACMS$DIRECTORY.

13.2 Starting the Application

Once all authorizations and installations are complete, you can start the ACMS system and start your application. To start and stop the ACMS system automatically with the OpenVMS system, you can include the ACMS/START and ACMS/STOP operator commands in your system startup and shutdown command files. However, in this tutorial, you start and stop ACMS interactively.

Any account from which the ACMS/START and ACMS/STOP commands are issued must have OpenVMS OPER privilege to execute these commands.

To start the ACMS system (if it is currently stopped), and to start your tutorial application, perform the following steps:

  1. Issue the SHOW SYSTEM command to determine if another user has already started ACMS:


    $ ACMS/SHOW SYSTEM
    

    If the subsequent display states that "current system state" is STOPPED, proceed to the next step and start the ACMS system. However, if the display states that the current system state is STARTED, proceed to step 3.

  2. Issue the START SYSTEM command to start the ACMS system:


    $ ACMS/START SYSTEM
    

    If the ACMS system starts successfully, the dollar ($) prompt returns with no intervening error messages.

  3. Before you can invoke a command that runs the application, you need to start the application. Issue the START APPLICATION command with the name of your tutorial application:


    $ ACMS/START APPLICATION EMPLOYEE_INFO_APPL_xxx
    

    If the ACMS system starts successfully, the $ prompt returns with no intervening error messages. However, if your system logical xxx_FILES is not defined on this system, you receive an error message that states, in part, "Error opening TDB file XXX_FILES:[EMPLOYEE_EXC]..." See Section 7.6 for information about defining your system logical.
    If you receive an "invalid login attempt" message, your system manager may not have authorized the ACMS Command Process (CP) to run as an agent (described in Section 12.3). Without this authorization, ACMS cannot sign in any users.

The audit trail log (ATL) keeps a record of when the ACMS system starts and stops, when users sign in, when applications and tasks start and stop, and what errors occur. To display this log, you can run the Audit Trail Report Utility (ATR) (see Section A.2).

13.3 Running the Application

If your system manager has authorized you to use ACMS, and has authorized your terminal, you can run your tutorial application by issuing the ACMS/ENTER command. When you enter this command, ACMS checks the authorization files to determine whether you and your terminal are authorized.

If you pass the authorization check, ACMS displays your default menu and waits for you to select a task. When you do, ACMS finds that task in the .TDB file and runs the task.

To run your tutorial application, perform the following steps:

  1. Issue the ENTER command to enter your application and display your default menu:


    $ ACMS/ENTER
    

    If this command is successful, ACMS displays your default menu. Figure 13-1 shows the selection menu displayed for this tutorial application.

    Figure 13-1 Selection Menu


  2. Choose an entry from the selection menu either by name or by number. For example, to select the ADD task, type either ADD or 1 at the Selection prompt and then press [Return].
    When you select a task, the form for that task appears on your screen. For example, when you select the ADD task, the form for filling in employee information appears. When you finish filling in the form, press [Ctrl/Z] to save the information in your RMS master file. To leave the form without saving the information, press [PF4].
    After you complete a task (by pressing [Ctrl/Z] or [PF4] ), ACMS redisplays the selection menu and waits for you to select another task or exit from ACMS.
    Before exiting from ACMS, you may wish to try several ADD tasks and several UPDATE tasks. You may also wish to try adding an employee number that already exists in your RMS master file so that you can see how the application responds to a duplicate-record error. Also, if you create two OpenVMS processes and run this application in each of them, you can test how the application responds when two users try to update the same employee record at the same time. (The last user to save the modifications receives a message that the record has been changed since he or she began updating it.)
  3. To exit from ACMS, type EXIT at the Selection prompt and press [Return].

You have now run your application and seen the results of choosing either the data entry task or the inquiry/update task. It is often helpful, especially in problem-solving, to know the various steps that ACMS takes to run one of these tasks. This information is available in Appendix A.

Appendix A also describes how to access various utilities that can help you solve problems that may occur when you run an ACMS application. These utilities include:

13.4 Stopping the Application and the ACMS System

You can stop your application and the ACMS system with the ACMS/STOP command. Before you stop the system, however, issue the SHOW SYSTEM command to see if another person is using the ACMS system:


$ ACMS/SHOW SYSTEM

The system displays the names of any active applications and any active users. If no other applications or users are active, issue both ACMS/STOP commands. Otherwise, issue only the STOP APPLICATION command, specifying the name of your application:


$ ACMS/STOP APPLICATION EMPLOYEE_INFO_APPL_xxx
$ ACMS/STOP SYSTEM
$

ACMS waits until all active tasks have finished executing before it stops the application and the system.

Other ACMS operator commands allow you to display information about your ACMS system and perform application management functions. Compaq ACMS for OpenVMS Managing Applications contains a detailed discussion of ACMS operator commands.


Part 3
AVERTZ Sample Application

This part provides an overview of the AVERTZ car rental sample application that ships with the Compaq ACMS for OpenVMS software kit.


Chapter 14
Before You Begin

The AVERTZ car company is a fictional car rental company created to illustrate how transaction processing (TP) can solve a business problem. With AVERTZ, the business problem is how data entry personnel can quickly and efficiently create, access, and update car rental information.

As you walk through Part 3 and through the AVERTZ application, you can see different perspectives of a single TP system. This document contains the following three chapters, and is organized so that you can get AVERTZ up and running quickly:


Chapter 15
System Manager's View

Since the AVERTZ application is already designed and developed, the first step you should take is to set up the application so that you can try it out. This chapter helps you build, install, and set up AVERTZ.

Note

You cannot build the AVERTZ application under multiversion Rdb.

Before you follow the instructions in this chapter, check to make sure that the ACMS$DIRECTORY logical name is defined. Check this by typing the following command at your DCL prompt:


$ SHOW LOGICAL ACMS$DIRECTORY

If the logical name is defined, you can proceed with the instructions in this chapter. If the logical name is not defined, you receive the following error message:


%SHOW-S-NOTRAN, no translation for logical name ACMS$DIRECTORY 

If you receive this error message, then before proceeding with the instructions in this document, you must follow the postinstallation instructions in Compaq ACMS Version 4.3 for OpenVMS Installation Guide.

Before you try to run the AVERTZ application, you must create a transaction log for DECdtm services. See Compaq ACMS Version 4.3 for OpenVMS Installation Guide for a description of how to do this.

15.1 Building the AVERTZ Application and Databases

The AVERTZ environment consists of the following directories:

Before you can run the AVERTZ application, you must build the databases and application. To build the databases and application, log in to an OpenVMS account that has SYSPRV privileges, and enter the following command:


$ SET PROCESS/PRIVILEGE=SYSPRV

If SYSPRV is not enabled for the account you use, ask your system manager to enable that privilege using the OpenVMS Authorize Utility.

Once your account has SYSPRV enabled, enter the following command to use the directory that contains the AVERTZ sources:


$ SET DEFAULT ACMS$EXAMPLES

To build the AVERTZ application, use the AVERTZ_BLD.COM command procedure, which is in the ACMS$EXAMPLES directory. The AVERTZ_BLD.COM procedure:

The AVERTZ_BLD.COM procedure requires additional files for successful execution. These files ship with the AVERTZ application, and are located in the ACMS$EXAMPLES directory:

When you run AVERTZ_BLD.COM, you are prompted to enter a directory location for the source code, the data dictionary, the databases, and the images.

The following example shows a sample walkthrough of AVERTZ_BLD.COM. You can follow the instructions by entering the commands and responses that are printed in red.

  1. To start the build procedure, enter the following at the DCL prompt:


    $ @AVERTZ_BLD.COM
    

    AVERTZ_BLD.COM displays the default directory and then prompts you for the source directory:


    Enter name of the source directory for AVERTZ - e.g. disk1:[x.y]:
    

  2. Enter the following:


    SYS$COMMON:[SYSHLP.EXAMPLES.ACMS]
    

    AVERTZ_BLD.COM prompts you for the data dictionary directory:


    Enter name of the directory for AVERTZ CDD dictionary - e.g. disk1:[x.y]:
    

  3. Enter the following:


    SYS$COMMON:[SYSHLP.EXAMPLES.ACMS.DICTIONARY]
    

    AVERTZ_BLD.COM prompts you for the database directory:


    Enter name of the database directory for AVERTZ - e.g. disk1:[x.y]:
    

  4. Enter the following:


    SYS$COMMON:[SYSHLP.EXAMPLES.ACMS.DATABASE]
    

    AVERTZ_BLD.COM asks you if you want the object and image files in the source directory.


    Place object and image files  in the source directory? [Y]/N:
    

  5. Enter the following if you want the object and image files in the same directory as the source files:


    Y
    

    AVERTZ_BLD.COM then displays the directory specifications and asks you if they are correct.


    Are these directory names correct? - Y/[N]:
    

  6. If the names are correct, enter Y:


    Y
    

    You are then asked if the CDD dictionary has been created. If this is your first time building the AVERTZ application, enter N.


    Have the CDD dictionary and its sub-directories been created?:
    

  7. Enter the following if this is your first time running AVERTZ_BLD.COM:


    N
    

    AVERTZ_BLD.COM proceeds to create the directory structure for the data dictionary. Some informational messages are displayed and you are asked if you want to define the fields and records in the data dictionary.


    Define fields and records in CDD? - Y/[N]: 
    

  8. Enter the following:


    Y
    

    After you enter Y, AVERTZ_BLD.COM defines the fields and records and then asks you if you want to build the message file.


    Build message file? - Y/[N]: 
    

  9. Enter the following:


    Y
    

    AVERTZ_BLD.COM builds the message file and then asks you if you want to compile the tasks.


    Compile tasks? - Y/[N]:
    

  10. Enter the following:


    Y
    

    AVERTZ_BLD.COM compiles the tasks, displaying informational messages, and then asks you if you want to build the task group.


    Build task group? - Y/[N]:
    

  11. Enter the following:


    Y
    

    AVERTZ_BLD.COM builds the task group, displaying informational messages, and then asks if you want to build the menu.


    Build menu? - Y/[N]:
    

  12. Enter the following:


    Y
    

    AVERTZ_BLD.COM builds the menu, displaying informational messages, and then asks you if want to build the application.


    Build application? - Y/[N]:
    

  13. Enter the following:


    Y
    

    AVERTZ_BLD.COM builds the application and installs it in the ACMS$DIRECTORY directory. The procedure then asks if you want to build the form.


    Build form? - Y/[N]:
    

  14. Enter the following:


    Y
    

    AVERTZ_BLD.COM compiles the form and then asks if you want to compile the server procedures.


    Compile server procedures? - Y/[N]:
    

  15. Enter the following:


    Y
    

    AVERTZ_BLD.COM then displays a message stating that in order for the server procedures to compile successfully, the VEHICLE_RENTALS and VEHICLE_HISTORY databases have to be built. You are asked if they have been built.


    Previous Next Contents Index