HPlogo ALLBASE/SQL Pascal Application Programming Guide: HP 9000 Computer Systems > Chapter 2 Using the ALLBASE/SQL Pascal Preprocessor

Syntax Checking Mode

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

You use the following command to only check the syntax of the SQL commands embedded in the source file.

Syntax

psqlpas -s [ -i SourceFileName -p ModifiedSourceFileName ] |...|

Parameters

-s

causes the preprocessor to only check SQL syntax.

-i SourceFileName

identifies the source file.

-p ModifiedSourceFile

identifies the modified source code file.

Description

  1. The preprocessor does not access a DBEnvironment when it is run in this mode.

  2. When performing only syntax checking, the preprocessor does not convert the SQL commands into Pascal constructs. Therefore the modified source code file does not contain any preprocessor-generated calls to ALLBASE/SQL external procedures.

  3. The include and installable module files are created, but incomplete.

Authorization

You do not need ALLBASE/SQL authorization when you use the preprocessor to only check SQL syntax. In other words, the system tables that store who has DBA, RESOURCE, and OWNER privileges on tables are not checked.

Example

   $ psqlpas -s -i mysource 



                                              MON JUL 10, 1991  4:48 PM

   HP36217-02A.E1.00      PASCAL Preprocessor/9000          ALLBASE/SQL 

   (C)COPYRIGHT HEWLETT-PACKARD CO. 1982,1983,1984,1985,1986,1987,1988,

   1989,1990,1991. ALL RIGHTS RESERVED.



   Syntax checked.

   1 ERRORS    0 WARNINGS

   END OF PREPROCESSING.



   $ more sqlmsg

                                              MON JUL 10, 1991  4:48 PM

   HP36217-02A.E1.00      PASCAL Preprocessor/9000          ALLBASE/SQL 

   (C)COPYRIGHT HEWLETT-PACKARD CO. 1982,1983,1984,1985,1986,1987,1988,

   1989,1990,1991. ALL RIGHTS RESERVED.





          SELECT PartNumber, PartName, SalesPrice INTO :PartNumber, :PartName,

          :SalesPrice :SalesPriceInd FROM PurchDB.Parts WHERE PartNumber =

          :PartNumber;



   ****** HP SQL errors.  (DBERR 10977)

   ****** in SQL statement ending in line 128

   ***    Syntax error.  (DBERR 1001)



   Syntax checked.



     1 ERRORS   0 WARNINGS

   END OF PREPROCESSING


Feedback to webmaster