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


  • Subject: RE: Runtime KLIST change?
  • From: "Reger, Bill" <breger@xxxxxxxxxx>
  • Date: Sat, 4 Dec 1999 12:10:32 -0500

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
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.