IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

re-display panel with scrollable area


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Dec 06, 2013 6:03 am
Reply with quote

I have not figured this out yet...

I have a panel with a scrollable area, for example:

Code:
)ATTR
}  AREA(SCRL) EXTEND(ON)
...
)BODY
Command ===>_zcmd                   +
...
} SCRLAREA                                            }
)AREA SCRLAREA       
line 1 . . .  _var1 +
line 2 . . .  _var2 +
...
line 99 . . .  _var99+


Lets say that the user scrolls down some and sees line 55 through line 80. I would like for the user to press Enter and to be able to display line 55 through 80 again.

If the cursor is on var55, I can cause the panel to show var55 first through the use of the .CURSOR tag. But if the cursor is on the command line, I do not know the relative position of the scrollable area.

Is there a way to know the position?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Dec 06, 2013 6:40 pm
Reply with quote

Does the LVLINE variable tell you anything? Its intended use is for dynamic areas, but I have never tried it on a panel with a scrollable area.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Dec 06, 2013 10:29 pm
Reply with quote

Quote:
Does the LVLINE variable tell you anything?

It did not work:
Code:
ISPP286                                                               
                                                                       
Panel 'TESTPNL' error                                                 
The area referenced by the LVLINE function is not a dynamic or graphic
area on the panel.                                                     
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Dec 06, 2013 11:02 pm
Reply with quote

ZSCREENI? Perhaps you could parse it and figure out what is visible to the user at the time they hit ENTER and then re-position the area accordingly.

Just another guess, I have used ZSCREENI before, but never for this purpose.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Dec 07, 2013 1:02 am
Reply with quote

Quote:
and then re-position the area accordingly.

I was trying ZSCREENI earlier today. You can determine the current location, but I worry about scalability. That is, my proof of concept was for a few lines on a single panel. But implementing that for hundreds of lines on hundreds of panels is nightmarish.

And positioning to where you were before is problematic. I have not yet figured out how. If you use .CURSOR, there is a case where if your field is within the first page, no scrolling is done.

I am trying to use DOWN 20, for example, but that results in a Enter situation.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Dec 07, 2013 1:21 am
Reply with quote

newsflash: old dog learns new tricks!

I did not know this before. If you do not provide a panel parameter, the same panel and same position is displayed. Woot!
Code:
panel = "PANEL(TESTPNL)"   
Do while (rc=0)
  "DISPLAY" panel           
  panel = ''           
End
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Sat Dec 07, 2013 3:00 am
Reply with quote

Cool! I will have to remember that one.

I once had a panel with a very large scrollable area. There were many fields in the scrollable area that were defined as point and shoot. The idea was to mimiic hyperlinks so that selecting one would take you to another panel. On returning to the main panel, I had to bend over backwards using the .CURSOR field to reposition the area. If I had only known there was an easier way......
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Call program, directly from panel CLIST & REXX 9
No new posts How to display the leading zeros of a... DB2 7
No new posts panel creation question TSO/ISPF 12
No new posts Panel variable model line TSO/ISPF 3
Search our Forums:

Back to Top