Antwort: [DB2-L] [db2 710/zOS1.4]: Newbie Help??: Why do I get those precompiler errors

Roy Boxwell

Antwort: [DB2-L] [db2 710/zOS1.4]: Newbie Help??: Why do I get those precompiler errors
Hi!

You only need the DECLARE if you are using STDSQL(YES). However I would
also check your table DCLGEN as PICTURE S9(3) is not good for "real"
numbers. Perhaps you really
need numeric host variables e.g. s9(4) comp for smallint etc etc

Hope that helps!

Roy Boxwell
SOFTWARE ENGINEERING GMBH
-Product Development-
Robert-Stolz-Strasse 5
40470 Duesseldorf/Germany
Tel. +49 (0)211 96149-0
Fax +49 (0)211 96149-35
E-mail [login to unmask email]
Homepage www.seg.de





Francis ANDRE <[login to unmask email]>
Gesendet von: DB2 Data Base Discussion List <[login to unmask email]>
08.12.2005 09:09
Bitte antworten an DB2 Database Discussion list at IDUG


An: [login to unmask email]
Kopie:
Thema: [DB2-L] [db2 710/zOS1.4]: Newbie Help??: Why do I get those precompiler
errors???


Hi Listeners

Why do I get such error UNACCEPTABLE SQL STATEMENT (line 45, 47) when
declaring the host variable NUI-SYS-LANGUAGE

TIA for your help

Regards

FA

-----------------------------------------------------------
DB2 SQL PRECOMPILER VERSION 7 REL. 1.0
OPTIONS SPECIFIED: HOST(IBMCOB),SOURCE
OPTIONS USED - SPECIFIED OR DEFAULTED
ATTACH(TSO)
CONNECT(2)
DEC(15)
FLAG(I)
HOST(IBMCOB)
NOT KATAKANA
LINECOUNT(60)
MARGINS(8,72)
ONEPASS
OPTIONS
PERIOD
QUOTE
QUOTESQL
SOURCE
STDSQL(NO)
SQL(DB2)
NOXREF
DB2 SQL PRECOMPILER VERSION 7 REL. 1.0
1 IDENTIFICATION DIVISION.
2 PROGRAM-ID. UIMODULE.
...
...
40 03 NUI-SYS-CURS-COL PICTURE S9(03).
41 03 NUI-SYS-CURS-LINE PICTURE S9(03).
42 03 NUI-SYS-CURS-FIELD PICTURE S9(10).
43 03 NUI-SYS-CURSOR PICTURE S9(06).
44 03 NUI-SYS-DATA PICTURE S9(03).
45 EXEC SQL BEGIN DECLARE SECTION END-EXEC
46 03 NUI-SYS-LANGUAGE PICTURE S9(03).
47 EXEC SQL END DECLARE SECTION END-EXEC
48 03 NUI-SYS-LINE-COUNT PICTURE S9(05) OCCURS 32
TIMES.
49 03 NUI-SYS-LOG-LS PICTURE S9(03).
50 03 NUI-SYS-LOG-PS PICTURE S9(03).
51 03 NUI-SYS-PAGESIZE PICTURE S9(07).



DB2 SQL PRECOMPILER MESSAGES
DSNH312I E DSNHSMUD LINE 145 COL 23 UNDEFINED OR UNUSABLE HOST
VARIABLE
"UNUSABLE HOST VARIABLE "ABX--INPUT-MSG-TEXT"
DSNH312I E DSNHSMUD LINE 148 COL 36 UNDEFINED OR UNUSABLE HOST
VARIABLE
"NUI-SYS-LANGUAGE"
DSNH312I E DSNHSMUD LINE 149 COL 39 UNDEFINED OR UNUSABLE HOST
VARIABLE
"ABX--INPUT-MSG-NR"
DSNH084I W DSNHLEXC LINE 45 COL 21 UNACCEPTABLE SQL STATEMENT
DSNH084I W DSNHLEXC LINE 47 COL 21 UNACCEPTABLE SQL STATEMENT
DSNH084I W DSNHLEXC LINE 61 COL 21 UNACCEPTABLE SQL STATEMENT
DSNH084I W DSNHLEXC LINE 63 COL 21 UNACCEPTABLE SQL STATEMENT
DB2 SQL PRECOMPILER STATISTICS
SOURCE STATISTICS
SOURCE LINES READ: 153
NUMBER OF SYMBOLS: 51
SYMBOL TABLE BYTES EXCLUDING ATTRIBUTES: 3912
THERE WERE 7 MESSAGES FOR THIS PROGRAM.
THERE WERE 0 MESSAGES SUPPRESSED BY THE FLAG OPTION.
153248 BYTES OF STORAGE WERE USED BY THE PRECOMPILER.


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email]
Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm
---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email]
Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm