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



Srinath,

you should use the bifs rather than the indicators.  you may however be a
little confused as to the usage of chain, setll, readx etc.

Why would you chain, then immediately setll and reade?  it's redundant.

first, it's always a good idea to specify the file name as part of the bif
- no confusion as to which %found or %eof you are testing for.

then, depending on what exactly you are trying to accomplish, here are a
couple of examples.

to obtain a single, uniquely keyed record (or the first record of a group
of similarly keyed records)....

c     k1            chain     testpf

c                   if        %found(testpf)
...
c*  process this record
...
c                   end

to process each record of a group of similarly keyed records, one at a
time...

c     k1            setll     testpf
c     k1            reade     testpf

c                   dow       not %eof(testpf)
...
c*  process single record
...
c     k1            reade     testpf
c                   enddo

hth,

rick


Hi,

I would like to know , are the built-in functions like (%Found,%EOF...)
specific to file operations.
I mean %Found to be used only for Chain and %EOF for Read/Reade...and like
that.
Now If I am having a Chain operation followed by a Setll and reade and If I
am checking for %Found,
It will be successful even-though the record may not have been found (the
high indicator is seton for Chain and Equal indicator for reade).
Considering this scenario can anyone please help me to come to a
conclusion,
why %Found should be successful.


C     K1            CHAIN     TESTPF                             05
C     K1            SETLL     TESTPF                               20
C     K1            READE     TESTPF                                 10
C                   IF        %FOUND

Can I use %Found for the chain opcode after Reade. If so, how to go about
the same. Or should I revert back to usage of indicators.
Please feel free to contact, in case I am not clear about the above
mentioned problem.

Regards
Srinath



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.