× 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.



>>> Variable types like dimensioned qualified data structures are not
>>>supported in SQL syntax.
>
>This first bit is mostly true but SQL itself certainly understands
>qualified names in its base syntax.

SQL syntax supports one level of qualification (DS.SUBFIELD).
Multiple levels of qualification and array subscripting are not
supported.   It is not in the standard and I don't know of any
platform that does support this.



>>> It has nothing to do with the precompiler code.
>
>This I have to take issue with.  It is very much a precompiler issue.  All
>the time that the precompiler is generating fixed form code it is
>artificially constraining our choice of host variables.  RPG supports
>multi-level qualification in /free.  If the precompiler can accept /free
>syntax there is _zero_ reason why it can't generate it.

As I just explained above, multi-level qualification is an SQL syntax
limitation.  The precompiler does write out multi-level qualification
in fixed form.

Dcustomerinfo     DS
D name                          20A
D address                       50A
Dsalestransaction...
D                 DS                      QUALIFIED
D buyer                                   LIKEDS(CUSTOMERINFO)
C*EXEC SQL
C*  select * into :buyer.address, :buyer.name
C*  from gmwlib/gwxxxx
C*END-EXEC
C                   Z-ADD     -4            SQLER6
C                   CALL      SQLROUTE
C                   PARM                    SQLCA
C                   PARM                    SQL_00000
C     SQL_00003     IFEQ      '1'
C                   EVAL      SALESTRANSACTION.BUYER.ADDRESS
C                              = SQL_00005
C                   EVAL      SALESTRANSACTION.BUYER.NAME = SQL_00006
C                   END


You are right, the precompiler can generate /free code.
I did not think it was worth the time, money, and effort to generate
/free code when the fixed form is working just fine.








As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.