|
Hi Peter, hi Booth! It would be even for me interesting to know how this example will solve my problem? As I understood right the pointer only point to the first byte of the DS which holds or references my record. What I wanted to do (or what I wanted to know is possible) is following, perhaps I described it wrong: I got two file: file_a and file_b with a key of field_x field_y field_y the files are identical with the exception of that field_x! I got two different environments on the AS/400 for different branches and I wanted to have only ONE Program!!! which could be compiled to those two independend environments without changing the source of the program. Because I really don't know how RPG handels a CHAIN to a file internally so my guess was that deals with a reference to the KLIST and/or to his fields which he checks for existens at compile-time. But it is more than this! You can't cheat the compiler with pointers as KFLDs :-) Maybe this was very naiv but I think there is a way to handle runtime-access-pathes in RPG like you can do it within embedded-sql, don't you think so????? So what is the trick and where should I have to look for a solution??? Greeetings to all ..... Frank Peter Dow wrote: > Well, without an explanation of what's in the Bytes array, and what the > OrOffset is pointing to, it's a guessing game as to what you are actually > doing. I mean, I understand the idea of pointers, but what I don't > understand is what problem you are solving that could *not* be solved > without pointers. > > ----- Original Message ----- > From: Martin, Booth <BoothM@goddard.edu> > To: <RPG400-L@midrange.com> > Sent: Monday, December 06, 1999 7:30 AM > Subject: RE: Runtime KLIST change? > > > What if I added this line to the code snippet? > > > > 0082.00 > > 0083.00 * Assign the record templates to their data space > > 0084.00 C eval @OrRecord = %Addr(Bytes(OrOffset+1)) > > > > > > -----Original Message----- > > From: Peter Dow [mailto:pcdow@yahoo.com] > > Sent: Monday, December 06, 1999 3:32 AM > > To: boothm@goddard.edu > > Subject: Re: Runtime KLIST change? > > > > > > What problem does this solve? I see nothing in your example to explain why > > the pointer is necessary. Stmt 42.00 with the appropriate <PFile> would > give > > you all the fields in the record prefixed with "OR_". > > > > > > From: <boothm@earth.goddard.edu> > > To: <RPG400-L@midrange.com> > > Sent: Sunday, December 05, 1999 8:37 AM > > Subject: Re: Runtime KLIST change? > > > > > > > Here's an example Frank. Its not my code but I use it a lot and it > solves > > > a problem. I don't know any other easy way to do what this code does: > > > > > > 0037.00 * --------------------------------------------- > > > 0038.00 * Original Record > > > 0039.00 * --------------------------------------------- > > > 0040.00 D@OrRecord S * Inz(*Null) > > > 0041.00 > > > 0042.00 DOrRecord E DS ExtName(<PFile>) > Prefix(OR_) > > > 0043.00 D Based(@OrRecord) > > > 0044.00 > > > 0045.00 * --------------------------------------------- > > > > > > Essentially, if you change "<PFile>" to the file name you are using > you'll > > have all the fields in the > > > record available prefixed with "OR_" > > > _______________________ > > > Booth Martin > > > boothm@earth.goddard.edu > > > http://www.spy.net/~booth > > > _______________________ > > > > > > > > > > > > > > > Frank Steinjan <fstone@wtal.de> > > > Sent by: owner-rpg400-l@midrange.com > > > 12/05/1999 06:57 AM > > > Please respond to RPG400-L > > > > > > > > > To: RPG400-L@midrange.com > > > cc: > > > Subject: Re: Runtime KLIST change? > > > > > > Hi guys, > > > > > > let me say this: everybody of you knows how boring those discussions are > > > and where they lead to. > > > I didn't want to discuss "the possibillity to use pointers to solve a > > > special problem". I just > > > wanted a hint, if there is a possibillity and how it looks like. Believe > > > it or not, but I'm also > > > doing programming for a couple of years and I think I could decide by > > > myself if this solution is > > > practical and maintainable. If you don't know about those > possibillities, > > > how could you else > > > decide if its "good" or "bad" ??? :-) > > > > > > greedzzzz, > > > > > > Frank > > > > > > > > > +--- > > > | 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 > > > +--- > > > > > > __________________________________________________ > > Do You Yahoo!? > > Thousands of Stores. Millions of Products. All in one place. > > Yahoo! Shopping: http://shopping.yahoo.com > > > > +--- > > | 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 > > +--- > > +--- > > | 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 > > +--- > > __________________________________________________ > Do You Yahoo!? > Thousands of Stores. Millions of Products. All in one place. > Yahoo! Shopping: http://shopping.yahoo.com > > +--- > | 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 > +--- +--- | 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-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.