|
John, If you would like an example of an RPGIV module that contains procedures that encapsulate most of the basic SQL functions, you can find one on Midrange Computing's December downloads page. The article is titled "Picklists on the Fly". The picklist program that is included is much more generic than your example, but you could easily use the SQL procedures provided to create a program that closely resembles your example. One advantage to embedding the SQL in a separate module is that the SQL pre-compiler does not support all of RPG's capabilities. The other advantage is that it simplifies the use of SQL. David Morris >>> JFinney@omnia.co.za 02/17/00 06:21AM >>> Hi All, I've recently started to "get my hands dirty" with SQL on the '400 and am battling to get my head around some issues. Say, for instance, in traditional RPG logic + LF's, one would chain/reade (loop) a logical and, for each record, go to another loop and chain/reade based on a key (keeping it simple to start, assume the unique key to be one field from the original LF). What would the SQL statement look like to do the equivalent of what's just been explained in the previous paragraph ? Hope this question is clear enough (seems a little murky upon a re-read). If anyone is unclear, please e-mail me and I'll try to ask with a little more clarity. Regards John. +--- | 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 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.