× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Glenn,

ad Q1: The default GENLVL for compiling programs/modules is 10, but a program/module can be generated up to GENLVL 29. Even though it is not recommendable, it is possible to set the GENLVL to 11 or 21 to get your program/module compiled.

ad Q2: Even before release V5R3 it was documented that host variables must be unique within a source member, independend whether they are used globally or locally (or in the F-Specs). Before release V5R3 uniqueness was not checked. If your host variables are not unique a source member that could be compiled under release V5R2 without problems cannot be compiled under release V5R3. BTW this check is changed under release V5R4. In release V5R4 a host variable can be defined several times in different procedures as long they have the same data type and length. Host variables with the same data type and different length will cause an error with GENLVL 20.

ad Q3: Either use a host variable defined in the D-Specs and move the content after the Fetch-Statement into the variable in the display-file, or create your program with GENLVL 11.

Mit freunlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown)
"If you think education is expensive, try ignorance." (Derek Bok)




----- Original Message ----- From: "Glenn Gundermann" <ggundermann@xxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, November 28, 2006 23:43
Subject: SQL0314 error with compile using CRTSQLRPGI


Hi Folks,

This might be an SQL questions which I guess should go into midrange-l but
I'll try this here first since it's embedding into rpg.

I'm getting a severity 11 error and it's preventing a clean compile using
the CRTSQLRPGI command.  If I change the GENLVL from 10 to 11, it compiles
fine and executes fine.

It compiled fine on V5R2 and before and this is the first time I'm trying
to compile on V5R3.

Q1.  How do I find out in the documentation what the default is for the
GENLVL parm on this command?  I assume it is 10 but I'm curious.

Q2.  Were there any changes between V5R2 and V5R3 that would cause this?

Q3.  Can you see what is wrong with this source (See below)?  I don't know
if it matters but the variable in question is defined in the display file
twice, once as input in one record format and once as output in another
record format.

By the way, it's not my code, so I know it needs to be rewritten.  I just
want to find this error.

Tks,

Glenn Gundermann

---------------------------------------------------------------

5722ST1 V5R3M0 040528            Create SQL ILE RPG Object
ITEMINQS                    11/28/06 17:16:35          Page   2
Record  *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
...+... 7 ...+... 8   SEQNBR  Last change       Comments
   1         ** Display File
                  100   09/05/97
   2        FItemInqDspCF   E             Workstn indds(indicators)
                  200   11/28/06
   3
                  300   09/05/97
   4        d indicators      ds
                  400   11/28/06
   5        d   Exit                          n   overlay(indicators:3)
                  500   11/28/06
   6        d   Cancel                        n   overlay(indicators:12)
                  600   11/28/06
   7        d   LowInv                        n   overlay(indicators:30)
                  700   11/28/06
   8        d   NotFound                      n   overlay(indicators:40)
                  800   11/28/06
   9
                  900   11/28/06
  10        C                   Dow       NOT Exit
                 1000   11/28/06
  11
                 1100   11/28/06
  12        C/Exec SQL
                 1200   11/28/06
  13        c+ select  itmnbr,  itmdescr,  itmqtyoh,  itmqtyoo,  vndnbr,
itmvndcat#        1300   11/28/06
  14        c+   into :itmnbr, :itmdescr, :itmqtyoh, :itmqtyoo, :vndnbr,
:itmvndcat#        1400   11/28/06
  15        c+   from item_pf
                 1500   11/28/06
  16        c+   where itmnbr = :itmnbr
                 1600   11/28/06
  17        C/End-Exec
                 1700   11/28/06
  18
                 1800   11/28/06
  19        c                   Eval      NotFound = *Off
                 1900   11/28/06
  20        C                   If        not notfound
                 2000   11/28/06
  21
                 2100   11/28/06
  22         ** Display details
                 2200   09/05/97
  23        C                   Dow       NOT Cancel
                 2300   11/28/06
  24        C                   Eval      LowInv = (ItmQtyOH + ItmQtyOO)
< 20               2400   11/28/06
  25        C                   Exfmt     Detail
                 2500   09/05/97
  26
                 2600   09/05/97
  27        C                   IF        Exit
                 2700   11/28/06
  28        C                   Eval      *InLR = *ON
                 2800   09/05/97
  29        C                   Return
                 2900   09/05/97
  30        C                   Endif
                 3000   09/05/97
  31
                 3100   11/28/06
  32        C                   Enddo
                 3200   09/05/97
  33        C                   Endif
                 3300   09/05/97
  34
                 3400   09/05/97
  35         ** No Item record found or F12 pressed - display prompt
                 3500   09/05/97
  36        C                   Eval      Cancel = *OFF
                 3600   11/28/06
  37        C                   Exfmt     Prompt
                 3700   09/05/97
  38        C                   Enddo
                 3800   09/05/97
  39
                 3900   11/28/06
  40        C                   Eval      *InLR = *ON
                 4000   09/05/97
  41        C                   Return
                 4100   09/05/97
  42
                 4200   09/05/97
  43
****************************************************************
      4300   09/28/93
  44        C     *Inzsr        Begsr
                 4400   09/05/97
  45        C                   Eval      PgmNam = 'ITEMINQ'
                 4500   09/06/97
  46        C                   Exfmt     Prompt
                 4600   09/05/97
  47        C                   Endsr
                 4700   09/05/97
* * * * * E N D O F S O U R C E * * * * *
                                                  OL3800  GLENN GUNDERMANN
5722ST1 V5R3M0 040528            Create SQL ILE RPG Object
ITEMINQS                    11/28/06 17:16:35          Page     3
                                              CROSS REFERENCE
Data Names                    Define    Reference
CANCEL                           6        CHARACTER(1) IN INDICATORS
EXIT                             5        CHARACTER(1) IN INDICATORS
INDICATORS                       4        STRUCTURE
ITEM_PF                          ****     TABLE
                                         12
ITMCOST                          12       DECIMAL(5,2) COLUMN (NOT NULL)
IN ITEM_PF
ITMDESCR                         2        CHARACTER(25)
                                         12
ITMDESCR                         ****     COLUMN
                                         12
ITMDESCR                         12       CHARACTER(25) CCSID 37 COLUMN
(NOT NULL) IN ITEM_PF
ITMNBR                           2        DECIMAL(5,0)
ITMNBR                           2        DECIMAL(5,0)
                                         12 12
ITMNBR                           ****     COLUMN
                                         12 12
ITMNBR                           12       DECIMAL(5,0) COLUMN (NOT NULL)
IN ITEM_PF
ITMPRICE                         12       DECIMAL(5,2) COLUMN (NOT NULL)
IN ITEM_PF
ITMQTYOH                         2        DECIMAL(7,0)
                                         12
ITMQTYOH                         ****     COLUMN
                                         12
ITMQTYOH                         12       DECIMAL(7,0) COLUMN (NOT NULL)
IN ITEM_PF
ITMQTYOO                         2        DECIMAL(7,0)
                                         12
ITMQTYOO                         ****     COLUMN
                                         12
ITMQTYOO                         12       DECIMAL(7,0) COLUMN (NOT NULL)
IN ITEM_PF
ITMVNDCAT#                       2        CHARACTER(7)
                                         12
ITMVNDCAT#                       ****     COLUMN
                                         12
ITMVNDCAT#                       12       CHARACTER(7) CCSID 37 COLUMN
(NOT NULL) IN ITEM_PF
LOWINV                           7        CHARACTER(1) IN INDICATORS
NOTFOUND                         8        CHARACTER(1) IN INDICATORS
PGMNAM                           2        CHARACTER(10)
PGMNAM                           2        CHARACTER(10)
VNDNBR                           2        DECIMAL(5,0)
                                         12
                                                  OL3800  GLENN GUNDERMANN
5722ST1 V5R3M0 040528            Create SQL ILE RPG Object
ITEMINQS                    11/28/06 17:16:35          Page     4
                                              CROSS REFERENCE
VNDNBR                           ****     COLUMN
                                         12
VNDNBR                           12       DECIMAL(5,0) COLUMN (NOT NULL)
IN ITEM_PF
                                                  OL3800  GLENN GUNDERMANN
5722ST1 V5R3M0 040528            Create SQL ILE RPG Object
ITEMINQS                    11/28/06 17:16:35          Page     5
                                            DIAGNOSTIC MESSAGES
MSG ID  SEV  RECORD  TEXT
SQL0314  11      14  Position 17 Host variable ITMNBR not unique.
SQL0314  11      16  Position 27 Host variable ITMNBR not unique.
                   Message Summary
 Total     Info   Warning      Error   Severe  Terminal
     2        0         2          0        0         0
11 level severity errors found in source
  47 Source records processed
                              * * * * *  E N D  O F  L I S T I N G  * * *
* *
                                                  OL3800  GLENN GUNDERMANN
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.