× 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: SETLL on a multiple record format Logical file
  • From: "Raikov, Lo" <RaikovL@xxxxxxxxxx>
  • Date: Fri, 12 May 2000 11:17:35 +1000

Amit

is it by any chance a multi-member logical? In that case, I'm afraid, what
you are looking for can't be done. Everything is fine when RPG knows what
access path to use for SETLL. And it definitely does work with multi-format
single member logicals. Becasue they have only one access path. If, on the
other hand, there are multiple members/multiple access paths and by using
SETLL with just the file name you provide RPG with no information of what
access path to use, RPG fails. It does not report a problem, but processes
only one of the access paths - I've never been able to figure out what
algorythm is used to determine the name of the access path to process. Maybe
it's just the last used.

Lo

> -----Original Message-----
> From: Amit.Mukherjee@smed.com [SMTP:Amit.Mukherjee@smed.com]
> Sent: Friday, May 12, 2000 3:12 AM
> To:   MIDRANGE-L@midrange.com
> Subject:      SETLL on a multiple record format Logical file
> 
> 
> 
> Hi,
>      I need a favour to solve my problem with a search and selection
> program using a multiple record format logical file, say FILEA .  It has
> two record formats, say for example, RECA and RECB, both keyed. The two
> record formats link to two different physical files.(RECA is based on
> FILE1
> and RECB is based on FILE2)
> 
> The program is using the logical file name (FILEA) to SETLL and READ,
> whenever required, instead of record formats.
> 
> The problem is, the program poistions correctly almost all the times but
> sometimes it does not  position to the correct record.  Say for example,
> 
> if SETLL to JOHN which is in the RECB(FILE2)   - success
> then SETLL to "KATHY" RECA(FILE1) - success
> then
> SETLL  to JOHN again - failure
> 
> Now the question is if I do a SETLL with the file name ,which physical
> file
> is it going to access. Does the logical file maintain an access path which
> is the combination of both the PFs.
> 
> The logic that the program uses is something like this.
> 
> C              Z-ADD0    #RRN
> C    KEYLIST   SETLLFILEA                95   (Hi Indicator)
>    *  Load the subfile....
> C              READ FILEA                       95
> C    *IN95          DOWEQ*OFF
> C    #RRN      ANDLT       10                 (Subfile size)
> C***  Load data to subfile fields
> C              ADD    1  #RRN
> C              WRITESFL01                     (Write to Subfile)
> C              READ FILEA                       95
> C              ENDDO                     (End of *IN95)
> 
> KEYLIST contains the value of the postiion to field.
> 
> I do not whether there is a limitation on how SETLL works for multiple
> record format logical file.
> Thanks in advance.
> 
> -Amit
> 
> 
> 
> +---
> | 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
> +---
+---
| 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 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.