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



Peter,

That is how I handle page-up normally.

The problem I'm having is that inorder to do a PositionTo I have to include
a where clause on the select statement:

C                   eval      @select1 =
C                             'select * from rbsurchgp +
C                             where rbcco = ' + %editc(cpy:'X')
C                   if        PosToInd = *on
C                   eval      @select1 = @select1 +
C                             ' and rbccus >= ' + %editc(posToCus:'X')
C                   endif
C                   eval      @select1 = @select1 +
C                             ' order by rbcco, rbccus '
C

If the user presses the F-key to bring up the position-to window, and
doesn't press cancel, I set on an indicator (PosToInd) and then add the
where clause.

Now the cursor contains records >= to the position-to value.  So what I'm
looking for is another way to position-to.  What I want is a fetch relative
where I can use the key rather than a rrn.

Phil

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
> Behalf Of Peter Dow
> Sent: Saturday, October 27, 2001 2:59 PM
> To: rpg400-l@midrange.com
> Subject: Re: Position To in a display file pgm using embedded sql
>
>
> Hi Phil,
>
> Try FETCH RELATIVE PageSize FROM cursor INTO hostvariables, where PageSize
> can be a negative number.  Assumming you're displaying a subfile with 10
> rows on it, you'd have PageSize = -20.  If you're not using a subfile and
> just want to go back one record, you could use FETCH RELATIVE -1 or FETCH
> PRIOR.
>
> hth,
> Peter Dow
> Dow Software Services, Inc.
> 909 425-0194 voice
> 909 425-0196 fax
>
>
> ----- Original Message -----
> From: "Phil" <sublime78ska@yahoo.com>
> To: <rpg400-l@midrange.com>
> Sent: Tuesday, October 23, 2001 8:49 PM
> Subject: Position To in a display file pgm using embedded sql
>
>
> > Using embedded sql in a display file pgm, how should you handle
> "position
> > to"?
> >
> > I am thinking of "select field, field2, etc where PositionToField >=
> value".
> >
> > But what if the user then presses page up?
> >
> > I don't want to do a fetch next through the entire cursor.  That could
> take
> > a long time.
> >
> > Thanks for your input,
> >
> > Phil
> >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> > _______________________________________________
> > This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> > To post a message email: RPG400-L@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> > or email: RPG400-L-request@midrange.com
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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.