Syntax Checking Mode [ ALLBASE/SQL Pascal Application Programming Guide ] MPE/iX 5.0 Documentation
ALLBASE/SQL Pascal Application Programming Guide
Syntax Checking Mode
You use the following RUN command to only check the syntax of the SQL
commands embedded in a file equated to SQLIN.
Syntax
:RUN PSQLPAS.PUB.SYS;INFO="(SYNTAX)"
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 SQLOUT
does not contain any preprocessor generated calls to ALLBASE/SQL
external procedures.
3. SQLCONST, SQLTYPE, SQLVAR (or SQLVARn), SQLEXTN, and SQLMOD 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
:FILE SQLMSG=Mymsg;Rec=-80,16,f,ASCII
:FILE SQLIN=PASEX2
:RUN PSQLPAS.PUB.SYS;INFO="(SYNTAX)"
FRI, OCT 27, 1991, 9:32 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.
Syntax checked.
1 ERRORS 0 WARNINGS
END OF PREPROCESSING.
PROGRAM TERMINATED IN AN ERROR STATE. (CIERR 976)
:EDITOR
HP32201A.07.00 EDIT/3000 FRI, OCT 27, 1991, 9:35 AM
(C) HEWLETT-PACKARD CO. 1990
/T MyMsg;L ALL UNN
FILE UNNUMBERED
:
SQLIN = CEX2.SOMEGROUP.SOMEACCT
SELCT PartNumber, PartName, SalesPrice INTO :PartNumber, :PartName,
:SalesPrice :SalesPriceInd FROM PurchDB.Parts WHERE PartNumber =
:PartNumber;
****** ALLBASE/SQL errors. (DBERR 10977)
****** in SQL statement ending in line 125
*** Syntax error. (DBERR 1001)
Syntax checked.
1 ERRORS 0 WARNINGS
END OF PREPROCESSING.
/
The line 125 referenced in SQLMSG is the line in
SQLIN where the erroneous SQL command ends.
MPE/iX 5.0 Documentation