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



On Tue, 2008-10-14 at 09:17 -0400, mprice@xxxxxxxxx wrote:
WHAT ????

The CPYFRMQRYF moves the current position in the ODP created by OPNQRYF.
If a following program needs to process all the records in that ODP, you
need somewhere to reposition the ODP to the beginning. You can do this
by a POSDBF after the COPYFRMQRYF or by SETLL in the following RPG
program, or whatever.

My taste is to do the POSDBF asap. In the common case where I want
merely to distinguish 0 records from some records, the code looks
something like (just making this up as I go along) ...
CPYFRMQRYF THING QTEMP/QWERTY
CRTFILE(*YES) MBROPT(*REPLACE)
NBRRCDS(1)
POSDBF THING *START
RTVMBRD QTEMP/QWERTY NBRCURRCD(&gotone)
IF (&gotone *GT 0) THEN(DO)
...

Cheers,
Terry.





Terrence Enger <tenger@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/14/2008 09:09 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: OPNQRYF question.






On Tue, 2008-10-14 at 08:09 -0400, Mark Walter wrote:
You need to do a CPYFRMQRYF, then do a RTVMBRD from there.

And of course, if you still want to access the data through the ODP, a
POSDBF will let you do that.

Cheers,
Terry.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Brown, Stephen GRNRC
Sent: Tuesday, October 14, 2008 7:25 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: OPNQRYF question.


Can anyone tell me if you can use an OPNQRYF statement in conjunction
with a RTVMBRD command to see if the selection has actually selected
anything ? I know there are other ways to do this in terms of RPG but I
would like to keep this all within the CL processing if possible.


Thanks Stevie





------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: If you have received this email in error, please
immediately notify the sender by e-mail at the address shown. This email
transmission may contain confidential information. This information is
intended only for the use of the individual(s) or entity to whom it is
intended even if addressed incorrectly. Please delete it from your files
if you are not the intended recipient. Thank you for your compliance.
Copyright 2008 CIGNA
==============================================================================
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.173 / Virus Database: 270.8.0/1724 - Release Date:
10/14/2008 2:02 AM

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.