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



You've got the right idea, except that returning row and column position
means you have to hardcode these values in your program.  Instead, you
should return the record information (Record name, field name, and position)
like so:

A          R TEST2
A                                      CF03(03)
A                                      CF04(04)
A                                      RTNCSRLOC(*RECNAME &$CURREC &$CURFL-
A                                      D &$CURPOS)                         
A            $CURREC       10A  H
A            $CURFLD       10A  H
A            $CURPOS        4S 0H
A            CUSTNO         9S 0B 12 20

Every time the program returns from input, you can test for *IN04 and
$CurFld='yourFldName' to see if you need to display the pop-up.  You can
usually disregard the CURPOS and CURREC pieces....  

C                   ExFmt     Test2                                
C                                                                  
C                   Select                                         
C                   When      *In03                                 
C                   Seton                                        LR
C                                                                  
C                   When      $CurFld = 'CUSTNO' and *In04
C*  Prompt code goes here                                
C                   EndSl 

hth,


Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



-----Original Message-----
From: Gauri Kulkarni [mailto:gauri.kulkarni@xxxxxxxxx]
Sent: Thursday, December 30, 2004 5:44 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: Retrieving Cursor Position from Screen.


Hi,

Dealing with a screen and window subfile.
The program gets the USER IDs from a file when F4 is pressed on the screen.
Right now, the program is working fine. It pops up the list of USER IDs when
F4 is pressed on the screen.
The problem I am facing is, I want this window to be popped up only when the
cursor is within the range of particular field.


 The Screen is :


     Send CSV file in CCMAIL folder
     ------------------------------



   Enter Fiscal Year :      99

   Enter Period      :      99-

   Enter USER ID to  :      OOOOOOOO  F4 to get the list
   get the mail




                                                     F3: Exit

Here, I want the window to be popped up only if the cursor is at USER ID
field, for which I will have to get the cursor position (row/column). Right
now, program pops up window irrespective of the cursor position i.e. u press
F4 anywhere on the screen, window will pop up.

Does anybody know how to get these row, column values and how to handle them
in RPG?
The one I tried was RTNCSRLOC, but couldnt get much out of it.



Thanks and Regards,
Gauri.





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

Follow-Ups:

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.