|
It is possible that I have misunderstood your situation, because as far as I am concerned SQL RPG is native OS/400, or rather one of the latest flavors of what IBM has been pushing. I currently write in RPG/400 (not ILE) & some of my RPG programs have embedded SQL. Let's suppose I have an RPG/400 program that has no embedded SQL & I decide in a modification that I am going to put some in there ... how I do this is 1. I have a print-out of the logic around where it needs to go, not neccessarily the whole program source code, and some notes jotted down regarding what I intend to do. 2. Using WRKMBRPDM I get to where the source code is located & you know the field where it says RPG ... I change that to RPGSQL or SQLRPG ... I can't remember which it is, but since I have a bunch of other programs in the same library already that way it is simple to see the format. 3. Then I go into the program to change it, inserting the SQL code. Now the odds are that other programs I have worked on contain a lot of similar code I can cut paste adjust, and I also have come up with some naming conventions to distinguish SQL activity from EXCPT & EXSR, plus having seen all the names SQL creates, I steer away from those prefixes in all my other programs. Some place those rules are documented & I have a cut & paste section into the front of some of my programs reminding me what prefixes are good to avoid. At some point during this, I probably have one of the SQL manuals propped up in my lap or beside my monitor open at some page to check the precise syntax for what I want, then when I am reasonably happy with my work, I exit back to WRKMBRPDM & put 14 beside the source code to try to compile it. The odds are that it does not compile. It fails due to the SQL content & the SQL compiler is giving me all kinds of error messages that are totally Greek to me. So now I go into wherever IBM has MSG members for SQL & I usually forget where that is & have to do some noodling around, then I WRKMSGF & position to one of the error messages & get at the second level help. Then I read it a lot & I look at the code & back & forth I go ... WHAT AM I DOING WRONG HERE ... and finally the light dawns. Beyond this, once the program is "working" there are issues of optimization & performance, because SQL works a little differently than simple RPG. With simple RPG we first line up all the files we need, logical access path sequences & then it is like putting together a jig saw puzzle, but with SQL we can have an incomplete picture & OS/400 does the best job it can with the materials at hand & it might be a rotten job, so we have to monitor how it is doing & fill in the gaps so that it will improve its act. Are you getting the picture? It really helps to see examples of where other people have done it already. You need a manual for this. IBM offers several classes in it. News/400 has had several articles with useful info on this. News/400 also has a forum for people with SQL how-to Q+A & related topics. http://www.as400network.com/Forums/Main.cfm?CFApp=59 > From: RaikovL@mki.com.au (Raikov, Lo) > > Does anybody have experience converting native RPG to SQL RPG? Are there > any known methodologies? Tools? Consultancies? > > Lo Al Macintyre ©¿© MIS Manager Green Screen Programmer & Computer Janitor of BPCS 405 CD Rel-02 running on AS/400 V4R3 http://www.cen-elec.com Central Industries of Indiana--->Quality manufacturer of wire harnesses and electrical sub-assemblies +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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-2025 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.