|
Hi, I had the same problem few days back. I have been answered by Eric using RTNCSRLOC on this - ---------------------------------------------------------------------------- ---- 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 ---------------------------------------------------------------------------- -------- Try this out. This one worked out fine. Hope this helps. Regards, Gauri. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jeff Young Sent: Friday, September 16, 2005 10:49 PM To: RPG programming on the AS400 / iSeries Subject: Re: Positioning a windowed subfile Look at the DDS keyword RTNCSRLOC. It will return the location of the cursor to your program in separate row and column fields. murali dhar <hydchap1@xxxxxxxxx> wrote: Iam trying to get the inquiry window to pop up where the cursor is positioned in subfile program. When the user presses F4 to call the subfile inquiry program , the program needs to retrieve the cursor position of the screen to pass the coordinates to the subfile program.This process is coded in the following lines... F subfile C F E WORKSTN F KINFDS INFDS I INFDS DS I 370 371 LINPOS I B 1 20LIN I 2 2 L I DS I B 1 20POS I 2 2 P C MOVE *ZEROS LIN C MOVE *ZEROS POS C MOVELLINPOS L C MOVE LINPOS P C Z-ADD LIN SL 30 C Z-ADD POS SP 30 Can some advise better ile code to the above or any much simplified code? Thank you, __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- 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. Jeff Young Sr. Programmer Analyst Dynax Solutions, Inc. A wholly owned subsidiary of enherent Corp. IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 IBM Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3 IBM Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- 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. http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at netadmin@xxxxxxxxx and delete this mail. _____________________________________________________________________
As an Amazon Associate we earn from qualifying purchases.
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.