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



Changed the title because of my spelling mistake.

Thanks, I learnt a new keyword.

But it seems to be a little simpler :
I already had this :
A RTNCSRLOC(*WINDOW &LINE &COLUMN)

This is to tell the RPG pgm where the cursor is when the user hits the function key.

So I added this :
A CSRLOC(&LINE &COLUMN)

(without the indicator, same field names) to set the position of the cursor before displaying the screen.

Then in the rpg :

Line=7;
Column=8;
Exfmt screen;



-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de ssc1478

Screen 1 line x, column y
F20 goes to data entry screen, first field at line x1, column y1.
F12 returns from the procedure.
Screen 1 line x1, column y1

How do I get the cursor back to its original line and column?

It's been a long time since I did any dspf programming. I
know this worked years ago when I wrote it but no guarantees.

You need this in the control record in the dspf source:
A RTNCSRLOC(&CSRRCD &CSRFLD)

A 43 CSRLOC(CSRROW CSRCOL)

A CSRFLD 10A H

A CSRRCD 10A H

A CSRROW 3S 0H

A CSRCOL 3S 0H

In the rpg pgm you need get the cursor position:

Ddspfds ds

D csrPos 370 371b 0

and before displaying the next screen:
csrrow = %div(csrpos:256);

csrcol = %rem(csrpos:256);

csrloc = *on;

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.