View previous topic :: View next topic |
Author |
Message |
Ramkumar Beginner
Joined: 04 Apr 2005 Posts: 19 Topics: 10
|
Posted: Mon Apr 04, 2005 7:10 am Post subject: Cursor Positioning in ISPF Panels |
|
|
I am invoking a panel through a REXX program. I want to change the cursor position each time I display the screen, according to the input from the user. Is it possible? I tried .COURSOR = variable-name but the problem is that it can be set only in the INIT section. It cannot be altered from the program. If you have any solution please let me know.
Thanks & regards,
Ramkumar N. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon Apr 04, 2005 8:30 am Post subject: |
|
|
You can assign .CURSOR in the )INIT and )REINIT sections and you can pass a field name on the DISPLAY call. |
|
Back to top |
|
|
acevedo Beginner
Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Mon Apr 04, 2005 10:21 am Post subject: |
|
|
another option:
address ispexec "display panel(yourpanel) cursor("yourfield")"
HTH |
|
Back to top |
|
|
Ramkumar Beginner
Joined: 04 Apr 2005 Posts: 19 Topics: 10
|
Posted: Mon Apr 04, 2005 10:30 pm Post subject: |
|
|
Hi,
I tried CURSOR with DISPLAY .It's working. Thanks a lot. But if I want to hilight that field what can i do?
Regards,
Ramkumar. |
|
Back to top |
|
|
stefan Beginner
Joined: 20 Nov 2003 Posts: 41 Topics: 2 Location: Germany
|
Posted: Tue Apr 05, 2005 1:00 am Post subject: |
|
|
For highlighting the field on which the cursor is positioned, just use .ATTR (.CURSOR) = 'HILITE(RED)'. This will cause the field to be displayed in red. Any other attributes associated with the field remain in effect.
By the way, that's all written in the manual, very clear and easy to understand, with handy examples and numerous explanations. |
|
Back to top |
|
|
Ramkumar Beginner
Joined: 04 Apr 2005 Posts: 19 Topics: 10
|
Posted: Tue Apr 05, 2005 7:09 am Post subject: |
|
|
.ATTR(.CURSOR) option can be used if we are doing some verifications from the panel itself. But how can I hilight the field while I am placing the cursor using DISPLAY (panel) CURSOR(field). |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Apr 05, 2005 8:40 am Post subject: |
|
|
you can't. a 3270 display is a block mode device - you need an interaction with the host via an AID key (Enter, PF key, PA key) to get the host to update the screen. Moving the cursor around does not communicate with the host. |
|
Back to top |
|
|
stefan Beginner
Joined: 20 Nov 2003 Posts: 41 Topics: 2 Location: Germany
|
Posted: Wed Apr 06, 2005 7:25 am Post subject: |
|
|
Ramkumar,
you're not right that .ATTR option can only be used when verifying within the panel. I assume that you code a loop processing in your program. Within the loop you display the panel and check some entry fields afterwards. Upon these checks you decide to either leave the loop or to repeat it while setting the corresponding value to the variable used in the CURSOR() parameter of the DISPLAY service. If this is the logic you have choosen, you could use the following statements in the INIT section of your panel to highlight that field, to which the cursor is positioned at each turn:
Code: |
)INIT
&ACTCUR = .CURSOR
IF (&ACTCUR NE &Z)
.ATTR(.CURSOR) = 'HILITE(REV) COLOR(RED)'
|
This will definitely work fine. |
|
Back to top |
|
|
|
|