HP 3000 Manuals

Full Preprocessing Mode [ ALLBASE/SQL Pascal Application Programming Guide ] MPE/iX 5.0 Documentation


ALLBASE/SQL Pascal Application Programming Guide

Full Preprocessing Mode 

Syntax 

                                                {MODULE(ModuleName)}
                                                {OWNER (OwnerName) }
:RUN PSQLCOB.PUB.SYS;INFO= "DBEnvironmentName [({{DROP {PRESERVE}} }
                                                {{     {REVOKE  }} }
                                                {{               } }
                                                {{NODROP         } }

|...|]"

Parameters 

DBEnvironmentName     identifies the DBEnvironment in which a module is
                      to be stored.  You may use a backreference to a
                      file defined in a file equation for this parameter.

ModuleName            assigns a name to the stored module.  Module names
                      must follow the rules governing ALLBASE/SQL basic
                      names as described in the ALLBASE/SQL Reference 
                      Manual .  If a module name is not specified, the
                      preprocessor uses the program name as the module
                      name.

OwnerName             associates the stored module with a User@Account, a
                      ClassName, or a GroupName.  You can specify an
                      owner name for the module only if you have DBA
                      authority in the DBEnvironment where the module is
                      to be stored.  If not specified, the owner name is
                      your logon User@Account.  Any object names in SQLIN
                      not qualified with an owner name are qualified with
                      the OwnerName specified by the preprocessor.

DROP                  deletes any module currently stored in the
                      DBEnvironment by the ModuleName and OwnerName 
                      specified in the INFO string.

NODROP                terminates preprocessing if any module currently
                      exists in the DBEnvironment by the ModuleName and
                      OwnerName specified in the INFO string.  If not
                      specified, NODROP is assumed.

PRESERVE              is specified when the program being preprocessed
                      already has a stored module and you want to
                      preserve existing RUN authorities for that module.
                      If not specified, PRESERVE is assumed.  PRESERVE
                      cannot be specified unless DROP is also specified.

REVOKE                is specified when the program being preprocessed
                      already has a stored module and you want to revoke
                      existing RUN authorities for that module.  REVOKE
                      cannot be specified unless DROP is also specified.

Description 

   1.  Before invoking the preprocessor in this mode when the program
       being preprocessed already has a stored module, ensure that the
       earlier version of the program is not being executed.

   2.  The preprocessor starts a DBE session in the DBEnvironment named
       in the RUN command by issuing a CONNECT command.  If the autostart
       flag is OFF, the DBE session can be initiated only after a START
       DBE command has been processed.

   3.  If the DBEnvironment to be accessed is operating in single-user
       mode, preprocessing can occur only when another DBE session for
       the DBEnvironment does not exist.

   4.  When the preprocessor's DBE session begins, ALLBASE/SQL processes
       a BEGIN WORK command.  When preprocessing is completed, the
       preprocessor submits a COMMIT WORK command, and any sections
       created are committed to the system catalog.  If the preprocessor
       detects an error in SQLIN, it processes a ROLLBACK WORK command
       before terminating, and no sections are stored in the
       DBEnvironment.  Preprocessor warnings do not prevent sections from
       being stored.

   5.  Since all preprocessor DBE sessions initiate only one transaction,
       any log file space used by the session is not available for re-use
       until after the session terminates.  If rollforward logging is not
       in effect, you can issue the CHECKPOINT command in ISQL before
       preprocessing to increase the amount of available log space.
       Refer to the ALLBASE/SQL Database Administration Guide for
       additional information on log space management, such as using the
       START DBE NEWLOG command to increase the size of the log and
       recovering log space when rollforward logging is in effect.

   6.  During preprocessing, system catalog pages accessed for embedded
       commands are locked.  In multi-user mode, other DBE sessions
       accessing the same objects must wait, and the potential for a
       deadlock exists.  Therefore minimize competing transactions when
       preprocessing an application program.  Refer to the ALLBASE/SQL 
       Database Administration Guide for information on operations that
       lock system catalog pages.

   7.  For improved runtime performance, use ISQL to submit the UPDATE
       STATISTICS command before preprocessing for each table accessed in
       a data manipulation command when an index on that table has been
       added or dropped and when data in the table is often changed.

Authorization 

To preprocess a program for the first time in this mode, you need CONNECT
or DBA authority in the DBEnvironment the program accesses.  After a
stored module exists, you need module OWNER or DBA authority in the
DBEnvironment.

Example 

     :FILE SQLIN=PASEX2 
     :RUN PSQLPAS.PUB.SYS;INFO=& 
     "PartsDBE (MODULE(PASEX2) OWNER(OwnerP@SomeAcct) REVOKE DROP)" 

                                               FRI, OCT 27, 1991, 10:15 AM
     HP36216-02A.E1.00         PASCAL Preprocessor/3000        ALLBASE/SQL
     (C) COPYRIGHT HEWLETT-PACKARD CO. 1982,1983,1984,1985,1986,1987,1988,
     1989,1990,1991.  ALL RIGHTS RESERVED.

      0 ERRORS     1 WARNINGS
     END OF PREPROCESSING.

     END OF PROGRAM
     :EDITOR 
     HP32201A.07.00 EDIT/3000 FRI, OCT 27, 1991,  10:17 AM
     (C) HEWLETT-PACKARD CO. 1990
     /T SQLMSG;L ALL UNN 
     FILE UNNUMBERED
               .
               .
      SQLIN                = PASEX2.SOMEGRP.SOMEACCT
      DBEnvironment        = PartsDBE
      Module Name          = PASEX2

       SELECT PartNumber, PartName, SalesPrice INTO :Partnumber, :PartName,
       :SalesPrice :SalesPriceInd FROM PurchDB.Parts WHERE PartNumber =
       :PartNumber;
                  |
     ******  HP SQL warnings (DBWARN 10602 )
     ****** in SQL statement ending in line 125
     ***  User OwnerP@SomeAcct does not have SELECT authority...
     (DBERR 2301)

     1 Sections stored in DBEnvironment.
       0 ERRORS   1 WARNINGS
     END OF PREPROCESSING.
     /



MPE/iX 5.0 Documentation