|
Hi Charles, Well, the RRN works fine on the DELETE; do you know of some reason why it wouldn't on the update? Actually, it also works on the update if (as you suggested) if the individual fields are specified -- we tried that yesterday. Yes, this is a simple setup to keep a hot site ready for a customer (a very small customer running a 170 with v4r4). If they were big enough, we would definitely recommend a package; but in this situation, I get to learn a little something. It looks like we're out of luck even if they currently have modified the precompiler to allow host structures. I was trying to avoid having to specify individual fields, in fact, the more generic the program, the better -- there are 27 files to handle. Volume is seasonal, and even in the peak season is not all that big. Thanks for the research! Btw, what did you search for? I think I got hung up looking for SQL0312 when I should've expanded my search horizons. And all the documentation I read (SQL Reference Manual, SQL Programming with Host Languages, etc.) seemed to indicate it would work, e.g. from the SQL Programming with Host Languages: "The ILE RPG for iSeries data structure name can be used as a host structure name if subfields exist in the data structure. The use of the data structure name in an SQL statement implies the list of subfield names making up the data structure." and from the SQL Reference Manual: "A host structure can be referenced in any context where a list of host variables can be referenced. A host structure reference is equivalent to a reference to each of the host variables contained within the structure in the order which they are defined in the host language structure declaration." There was nothing in the description of the UPDATE ... SET ROW = .. statement that indicated you couldn't use a host structure. Peter Dow Dow Software Services, Inc. 909 793-9050 voice 909 793-4480 fax 951 522-3214 cell ----- Original Message ----- From: "Wilt, Charles" <CWilt@xxxxxxxxxxxx> > Found this in a SQL Precompiler Enhancement Survey: > http://archive.midrange.com/rpg400-l/200106/msg00104.html > > "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 )" > > Note that it's from 2001, but perhaps this enhancement has never made it to production. > > I'd give IBM a call to double check. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.8 - Release Date: 4/13/2005
As an Amazon Associate we earn from qualifying purchases.
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.