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



Don't see how it could be done with pointers. 

KLIST are just instructions to the complier to tell it how to build the key
buffer. If you looked at the MI underneath in RPG III, you could see what it
was doing with the KLIST. If just ended up being a series of moves into the
key buffer and the calculated size into the key length before calls to the
I/O module. Don't see how that could be based on pointers. A key list has no
way to specify that a field in the key list is a pointer to a value and then
you would have to have the ability to specify what the value you are
pointing to is, an integer, char, packed, etc and a size. Just my two cents.


-----Original Message-----
From: Frank Steinjan [mailto:fstone@wtal.de]
Sent: Saturday, December 04, 1999 3:50 PM
To: RPG400-L@midrange.com
Subject: Re: Runtime KLIST change?


So most practical solution:-)
Thanx Bill! But my question was more theoretical, if there is a possibillity
to
do with pointers.
Thanx,

Frank

"Reger, Bill" wrote:

> Frank,
>
> One way that it can be done is to use a "program-described" file
> specification, rather than the more normal "externally-described" file.
On
> the F-spec., provide a record length that is at least as long as your
longer
> file and a key length that is at least as long as your longest key.  Data
> structures can help with your field definitions.
>
> At execution time, use an OVRDBF command to override to the file you
> actually want to work with.  Then when you need to SETLL/READ or CHAIN to
> your run-time file, initialize a field to be used as your key (same length
> as the key length of your F-spec.) with the value(s) from your key
field(s)
> plus low values for the balance of the key length.  Then use this field to
> SETLL or CHAIN with.
>
> Elegant?  No.  Doable? Certainly!
>
> William K. Reger
> Senior Project Manager
> Levitz Furniture Corporation
> Phone:  (561) 994-5114
> E-mail:  breger@levitz.com <mailto:breger@levitz.com>
>
>         -----Original Message-----
>         From:   Frank Steinjan [SMTP:fstone@wtal.de]
>         Sent:   Saturday, December 04, 1999 3:13 AM
>         To:     RPG400-L@midrange.com
>         Subject:        Runtime KLIST change?
>
>         Hallo,
>
>         as V4.4 offers more and more possibillities I would like to know
if
>         there is any trick to handle different KLISTs in an RPG-Program. I
> had
>         the following problem:
>
>         I wanted to use file file_x1 and file_x2 within the same program.
>         KLIST of x1 consists of field_a and field_b while x2 consists only
> of
>         field_b.
>
>         What I wanted to do is to define field_a and field_b as pointers
> where
>         in case of file_x2 field_a points to NULL. But this doesn't work.
>         Perhaps someone outhere can gimme a hint.
>         Thanx in advance...
>
>         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
>         +---
> +---
> | 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
+---
+---
| 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.