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



Same question asked in June......
http://itknowledgeexchange.techtarget.com/itanswers/reading-a-pf-in-reverse-
order-using-cl-program/


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

Rishi -

People rarely send the "exact code" on these tech forums. It makes it sound
like you are asking others to do your work (or homework) for you, and people
don't want to do that.

However, iseries developers do like to point people in the right direction.

That said, maybe you could try something like the following (although I have
no idea if this will work)

Rtvmbrd filename NBRCURRCD (&rrn)

topOfLoop:
Ovrdbf filename POSITION(*RRN &rrn)
rcvf
Chgvar &rrn (&rrn - 1)
If (&rrn > 0) goto TopOfLoop


This is the most direct method I can think of. Using a less direct
alternative, SQL or OPNQRYF would allow you to add a sequential # to each
record, then RCVF the view in descending order.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rishi Seth
Sent: Monday, September 10, 2012 10:56 AM
To: midrange-l@xxxxxxxxxxxx
Subject: program to read pf in reverse order using cl/400 program

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 inbound email has been scanned for all viruses by the MessageLabs
SkyScan
service.
________________________________________________________________________

______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs
Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

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.