• Subject: Re: Built in Functions
  • From: Carol Bastien <cabastien@xxxxxxxx>
  • Date: Thu, 15 Jul 1999 07:10:13 -0700
  • Organization: @Home Network

Hi Dave,

You may already know this but you can position the cursor w/o an indicator.  
I'll
paste a sample of the code here so you can see it.  I've had this sample for so 
long
I can't remember where I got it originally (probably from Bob Cosi).  Sorry 
it's not
ILE but if you want to use it, you can convert it easily.  Anyway you'll get the
idea.  Not sure it's more efficient than the indicator, but it gives you more
control over the cursor.

Position Cursor

DDS Keywords:
  A                                      CSRLOC(ROW COL)
  A            ROW            3  0H
  A            COL             3  0H


RPG Routines:
  FDSPF    CF  E                    WORKSTN
  F                                              KINFDS CSRPOS
   *
   * File Information Data Structure to determine cursor position
  ICSRPOS      DS
  I                                    B 370 3710SCR
  I                                    B 382 3830WDW
   * If not a window, position cursor based on screen location
  C           WDW       IFEQ *ZEROS
  C           SCR          DIV  256       ROW
  C                            MVR            COL
  C                            ELSE
   *
   * Else (a window), position cursor based on window location
  C           WDW       DIV  256       ROW
  C                            MVR            COL
  C                            ENDIF

- cb


Dave Mahadevan wrote:

> Position cursor display attribute is badly needed.  I just wish IBM addressed
> this  situation.  The AS/400 community has requested this ever since the 
>program
> to system field was conceived.  This will really eliminate the use of 
>indicators
> in DDS.   What good is the &FIELD when you also have to use an indicator to
> position cursor, this kinda defeats its purpose.   Also, program to system 
>field
> should be made available in the buffer (so idiots like me will know what I
> passed to it in the first place :-) )
>
> "Hatzenbeler, Tim" wrote:
>
> > I'm in complete favor of all the opcodes being %BIF's  It makes coding a lot
> > more readable when you don't have to mess with  column based indicators...
> > I say the more bif's the better....
> >
> > Now if there was only way to give named indicators out of the DDS for
> > DSPF/PRTF life would be perfect, or to increase the functionality of the
> > DspAtr in the DDS to do position cursoring...
> >
> > tim
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > * This is the RPG/400 Discussion Mailing List!  To submit a new         *
> > * message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
> > * from this list send email to MAJORDOMO@midrange.com and specify       *
> > * 'unsubscribe RPG400-L' in the body of your message.  Questions should *
> > * be directed to the list owner / operator: david@midrange.com          *
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> --
> Thank You.
>
> Regards
>
> Dave Mahadevan.. mailto:mahadevan@fuse.net
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This is the RPG/400 Discussion Mailing List!  To submit a new         *
> * message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
> * from this list send email to MAJORDOMO@midrange.com and specify       *
> * 'unsubscribe RPG400-L' in the body of your message.  Questions should *
> * be directed to the list owner / operator: david@midrange.com          *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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-2019 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].