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



It is possible to do a 'cheat' to read a PF backwards in CL.

Create an empty duplicate file in another library, say QTEMP; DCLF the 'real
file' for compilation and OVRDBF to the 'work-file'; use CPYF to copy 1
record at a time from the real file to the work-file using the record-number
and number of records parameters. The process loop will also have to
maintain a 'record counter', e.g. starting at 10 and subtract one each time
down to 1. A RCVF on the work file each time should retrieve the last record
copied.

I can hear CL programmers sucking air through their teeth. I would normally
create a LF where possible, but if that's not an option (no suitable field
for the key) then hey why not?
If this is not a production program reading thousands (tens or hundreds
thereof), then what the heck. It sounds like this is an academic exercise
anyhow.



Regards

Jeff Bull
iSeries Technical Consultant
NYCO Ltd - iSeries & AS/400 Automation Specialists
Tel: +44(0)20 8416 3778
Fax: +44(0)20 8416 3779
Mobile: +44(0)77 5692 3335
Email: jeff.bull@xxxxxxxxxx
Website: www.nyco.co.uk
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rishi Seth
Sent: 10 September 2012 17:45
To: Midrange Systems Technical Discussion
Subject: Re: program to read pf in reverse order using cl/400 program

Its CL because I want to improve my CL programming and I believe it could be
possible in CL.

Thanks

On Mon, Sep 10, 2012 at 10:11 PM, Alan Shore <ashore@xxxxxxxx> wrote:

So it's by rrn
I don't think that's possible in cl.
Obviously, if I am wrong someone will point the error of my ways.
The question I need to ask is why in CL?

Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:
midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rishi Seth
Sent: Monday, September 10, 2012 12:26 PM
To: Midrange Systems Technical Discussion
Subject: Re: program to read pf in reverse order using cl/400 program

means suppose a file has has 1o records than i want to read from 1oth
record to 1st in cl program if you could please send the program (cl)
then it would be very helpful to understand the logic.

thanks

On 9/10/12, Scott Klement <midrange-l@xxxxxxxxxxxxxxxx> wrote:
Reverse order of what? A particular key in the file? The RRN? Or...
what?


On 9/10/2012 10:56 AM, Rishi Seth wrote:
Hi,

I want to read a physical file in reverse order using cl program
condition is there should not be any logical file in this
program.If somebody could please send the exact code for this then
it would really be helpful to understand the logic.

Thanks

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
take a moment to review the archives at
http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at http://archive.midrange.com/midrange-l.


Disclaimer: This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late
or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a result of
e-mail transmission. If verification is required please request a
hard-copy version. Any views or opinions presented are solely those of
the author and do not necessarily represent those of the company.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.