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


  • Subject: SQL Precompiler Enhancement Survey
  • From: "John Taylor" <john.taylor@xxxxxxxxxxxxxxx>
  • Date: Tue, 5 Jun 2001 22:22:04 -0600
  • Importance: Normal


Folks,

IBM is sponsoring a survey in order to solicit feedback on what we'd like to
see in a new version of the precompiler. We've been quite vocal about the
various limitations of this tool for a long time now, so please take a few
moments to participate. Details are listed below.


John Taylor
Canada

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

The following is posted with permission of Paul Conte, who posted this
message originally on the AS400 Network "SQL/400 and Database" forum:

IBM is planning which features to add to the SQL/400 precompiler for ILE
RPG. The precompiler is part of the DB2 Query Manager and SQL Development
Kit licensed program product. The precompiler translates RPG IV source code
members that contain embedded SQL statements as the first stage in creating
a module or program object. If you use SQL with ILE RPG, you have a major
interest in what enhancements IBM includes in future releases.

IBM has asked the AS400 Network to help it learn customers' preferences.
Here are the items under current consideration. You can vote on these in the
online poll at
http://www.as400network.com/as400surveys/SQLPrecompiler/

If you have any questions, comments, or additional suggestions, you can post
them in the AS400 Network's "SQL/400 and Database" forum at
http://www.as400network.com/Forums/Thread.cfm?CFApp=59&Thread_ID=21006&mc=3#
Message71136

IBM has asked us to encourage people to participate in the online poll
and/or the AS400 Network forum, which they are monitoring. If you don't have
access to these sites, you can e-mail your comments to rchudb@us.ibm.com.

a. Full support for properly parsing RPG subprocedures

The current version of the SQL precompiler doesn't properly parse some
source members that have subprocedures. For example, O-specs may cause an
erroneous "out of sequence" error. This enhancement would have the SQL
precompiler properly parse source members with subprocedures.

b. Support for using a local variable in a subprocedure as a host variable
in an SQL statement

RPG IV lets you declare a local variable within a subprocedure. A local
variable can have the same name as a global variable or a local variable in
a different subprocedure. The current version of the SQL precompiler doesn't
properly handle scoped variables. This enhancement would have the SQL
precompiler support the same variable scoping rules as the ILE RPG compiler.
For example, if you had a global variable X and a local variable X in the
subprocedure P, any embedded SQL statement within P that referred to :X
would be treated as referring to the local variable.

c. Full support for the V5 qualified subfield names based on the new RPG IV
D-spec QUALIFIED keyword

The new RPG IV Qualified keyword lets you have a data structure subfield
with the same name as a subfield in a different data structure or as a
stand-alone variable. A subfield of a data structure with the Qualified
keyword must be referenced using the data structure name to qualify the
subfield name, for example, MyStructure.MySubfield. This precompiler
enhancement would allow the use of qualified subfields as host variables in
an embedded SQL statement.

d. Conditional precompilation: /If, /Define, and other directives

The RPG IV compiler directives, /If, /Else, /ElseIf, /EndIf, /Eof, /Define,
and /Undefine, support conditional compilation of source code. The current
version of the SQL precompiler doesn't recognize these directives and
unconditionally processes all of the source member. This enhancement would
have the SQL precompiler support these directives.

e. Nested /Copy

The RPG IV compiler allows a /Copy source member to contain a /Copy
directive. The current version of the SQL precompiler doesn't allow nested
/Copy directives. This enhancement would have the SQL precompiler support
nested /Copy directives.

f. Support for /Include

The RPG IV compiler allows the /Include directive as a synonym for /Copy.
The current version of the SQL precompiler ignores /Include directives. This
enhancement would have the SQL precompiler support /Include directives. (The
/Include directive was introduced as a workaround for the lack of SQL
precompiler support for nested /Copy directives. A /Copy member could
contain an /Include directive, and the SQL precompiler would process the one
level of /Copy and ignore the nested /Include. If precompiler support is
added for nested /Copy, /Include becomes superfluous.)

g. Support for host structure in Update statements

The current version of the SQL precompiler lets you specify a data structure
in place of a list of host variables in the Select Into, Fetch, and Insert
statements. The precompiler treats a data structure as if you specified a
list of the subfields within the data structure. This SQL/400 extension can
simplify coding and improve performance in some situations. This precompiler
enhancement would let you specify a data structure in an Update statement,
as well. For example, you might code: Update T Set Row = ( :MyStructure )

h. Support for a structure of host indicator variables

When you specify null indicators along with a host structure, the current
version of the SQL precompiler requires you specify an array of indicators.
Indicator arrays don't provide meaningful null indicator variable names; for
example, the null indicator for the CustAddress host variable might be
CustInd(5). This precompiler enhancement would let you specify a data
structure for the host indicators. With this enhancement, the null indicator
for the CustAddress host variable might be a subfield named CustNameInd or
(using a V5 qualified subfield name) CustInd.Address.

i. A precompiler directive to generate an array (or structure) of indicator
variables from a data structure

The ILE RPG compiler lets you define an externally-described data structure
which can then be used as a host structure name in SQL statements.
Currently, there is no way to automatically generate a corresponding host
indicator array. This requires hand-coding and complicates maintenance. This
enhancement would let you specify a SQL precompiler directive to generate an
array with one indicator variable for each subfield in a referenced data
structure, thus automating the process. If precompiler support is added for
a structure of indicator variables (as described in the previous item), this
enhancement would also support a directive to generate a data structure with
one indicator variable for each subfield in a referenced data structure.

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.