Lynn Harris
asked on
AS400 RPG36 Cursor location on a Screen
Hi,
I have been tasked with adding pop-up search windows to an OLD RPG36 program. (I can not convert or rewrite. Believe me I tried to sell these.) No DDS - 36 screen as well. Can anyone tell be how to determine the cursor location when the function key is press? Yes, new search and windows will be written in RPGLE.
Thank you!!
Lynn
I have been tasked with adding pop-up search windows to an OLD RPG36 program. (I can not convert or rewrite. Believe me I tried to sell these.) No DDS - 36 screen as well. Can anyone tell be how to determine the cursor location when the function key is press? Yes, new search and windows will be written in RPGLE.
Thank you!!
Lynn
Never did much S36 display file programming. I'd guess you can get it from the File Information Data Structure.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
All I know about SUBRCP is that it is a third-party subroutine for RPG II:
http://www.sspi-software.com/rpg_subr.html
Tom's solution using DSM API QsnGetCsrAdr is elegant. Nice solution.
http://www.sspi-software.com/rpg_subr.html
Tom's solution using DSM API QsnGetCsrAdr is elegant. Nice solution.
ASKER
Thank You both for your responses. I'm sorry it took me so long to get back. I went dark (haha) for the long weekend.
I will give this a try today.
Thank you!
I will give this a try today.
Thank you!
@Gary, I wasn't aware it was 3rd-party; but it's clearly not a big problem in the AS/400-series. The PARM() interface was given by the earlier OP, IIRC. I assumed it was from some system docs, but I guess it doesn't really matter if it's all external anyway.
Tom
Tom
ASKER
Hi,
First, if I should post this as a separate question please let me know and I will do so. Thanks.
I finally got a change to try the program Tom posted. I'm unable to get it to compile. I've compile listing. No Errors, but no compile.
Severity
Total 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-79 80-89 90-99
0 0 0 0 0 0 0 0 0 0 0
Program CLCURRTN not created in library LWCH. Maximum error severity 00.
* * * * * E N D O F M E S S A G E S U M M A R Y * * * * *
* * * * * E N D O F C O M P I L A T I O N * * * * *
At first I was getting * CPD0726 10 Variable declared but not referred to. &
* CPD0791 00 No labels used in program. I removed the variables and put a dummy label at the bottom. (I did some looking any it appears there is a PTF related to the label error.)
Any suggestion would be greatly appreciated.
Thanks,
Lynn
rtncur.txt
First, if I should post this as a separate question please let me know and I will do so. Thanks.
I finally got a change to try the program Tom posted. I'm unable to get it to compile. I've compile listing. No Errors, but no compile.
Severity
Total 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-79 80-89 90-99
0 0 0 0 0 0 0 0 0 0 0
Program CLCURRTN not created in library LWCH. Maximum error severity 00.
* * * * * E N D O F M E S S A G E S U M M A R Y * * * * *
* * * * * E N D O F C O M P I L A T I O N * * * * *
At first I was getting * CPD0726 10 Variable declared but not referred to. &
* CPD0791 00 No labels used in program. I removed the variables and put a dummy label at the bottom. (I did some looking any it appears there is a PTF related to the label error.)
Any suggestion would be greatly appreciated.
Thanks,
Lynn
rtncur.txt
Look at the job log. You'll probably see that you had a error at the binding step, and an unresolved reference for the symbol "QsnGetCsrAdr".
DSM APIs are in service program QSNAPI, and you'll need to include that when you compile. IBM supplies a binding directory with this service program listed (binding dir is also named QSNAPI). I recommend adding an h-spec:
h bnddir(QSNAPI) dftactgrp(*no) actgrp(QILE_ortheActivatio nGroupOfYo urChoice)
- Gary
DSM APIs are in service program QSNAPI, and you'll need to include that when you compile. IBM supplies a binding directory with this service program listed (binding dir is also named QSNAPI). I recommend adding an h-spec:
h bnddir(QSNAPI) dftactgrp(*no) actgrp(QILE_ortheActivatio
- Gary