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

scrolling horizontally


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

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Thu Aug 25, 2022 4:14 am
Reply with quote

I have created an ISPF table and have realized there are too many fields per line to fit on the screen width if I try to display it.

I am having a hard time finding anything written up on how to TBDISPL a table where the user can scroll the display horizontally.

Can anyone tell me a manual that describes this and what term I should use to find the description? I was thinking maybe I don't have the right term for this and that's why I can't find anything.

If you can just tell me the name of the manual, I can look it up.

Thanks
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: Thu Aug 25, 2022 5:59 am
Reply with quote

You can simulate horizontal scrolling by using two separate but similar panels and toggling between them based on LEFT/RIGHT commands entered by the user. Crude, but simple to implement.

The proper way to do it is to use a dynamic panel area. With that approach you leave TBDISPL behind, so consider carefully before going that route. It is well documented in the ISPF Dialog programming guide.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Aug 25, 2022 9:27 am
Reply with quote

Quote:
toggling between them based on LEFT/RIGHT commands


Use a variable name on the TBDISPL service. Then check zcmd for LEFT or RIGHT and change the value of the variable as necessary. The user can scroll horizontally a page at a time, but not based on cursor position.

Always display the same name or other key column so that the user has a point of reference. That is, those columns will appear on all panels, on the leftmost columns.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Fri Aug 26, 2022 7:34 am
Reply with quote

so they can only a page left or right. not a variable number of columns.

surprised... thought ISPF would provide a way to do that by now with tables (from when I last created panels in the 1980s).

I might limit the number of columns then. I already have the option to email them a report with everything. And I know nothing about creating dynamic panels.

is the 3.4 display created with dynamic panels? that isnice in that you can scroll part of the panel right (to see things like more catalog info), but it keeps the names of the datasets displayed regardless. just wondering.

Thanks for the help.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Aug 26, 2022 10:01 am
Reply with quote

Another method that I have seen is to create the normal table panel dynamically.

1. establish a LIBDEF for ISPPLIB using a temporary data set.
2. when the user scrolls horizontally, create a new member in your ISPPLIB that includes the desired columns.
3. perhaps use file tailoring to create the new temporary panel.
3. Use the new member name in the next TBDISPL service call.

Of course, this is a non-trivial exercise.
Back to top
View user's profile Send private message
hankoerlemans

New User


Joined: 25 Jan 2018
Posts: 57
Location: Australia

PostPosted: Fri Aug 26, 2022 10:09 am
Reply with quote

3.4 is not a table.

If you look in SISPPENU(ISRUDSL0) you can see only a ZDATA variable.
The hex 26 before it refers to 26 AREA(DYNAMIC) EXTEND(ON) SCROLL(ON)
.......which kind of a give away if you ever look at other panel source.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Aug 26, 2022 6:00 pm
Reply with quote

You cannot scroll sideways with TBDISPL, period.
Someone mentioned dynamic areas. I have used dynamic areas a lot, primarily in order to control display attributes by row / field. I did look into sideway scrolling some time ago, but it becomes very complicated very quickly if you have more than one field, plus the selection field, especially if you have different field attributes.
don.leahy's suggestion of multiple panels is probably the simplest method. Or could you simply utilize a wider screen?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Aug 26, 2022 6:57 pm
Reply with quote

Willy Jensen wrote:
Or could you simply utilize a wider screen?

That's by far the most sensible suggestion!

I run Tom Brennan's Vista TN3270 in a 62x160 configuration, which gives you roughly five times the display space of the standard 24x80 screen, and 75% more than the 43x132 model-whatever.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Sat Aug 27, 2022 12:26 am
Reply with quote

This is for a people in different areas, but all using ISPF. so.. wider screens would be nice - but something I don't think will be approved. icon_smile.gif

unless you are saying define a larger width to ISPF? I didn't think about that.

I came up with a quasi solution. I put the prime data in the first half of the line, and the secondary data on the right part of the line, followed by a couple of lines with other secondary data right aligned. so, the user can see easily what they are searching for on the left, but access the other information on the right when they find the main line they want to work with. It actually came out looking pretty good.

I forgot that you can have multiple lines per row.. duh. was thinking 1 line per row. but this way, I don't have to redo the logic.

thanks, everyone. will have to look up defining width in ISPF - now I'm curious..
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Aug 27, 2022 3:08 pm
Reply with quote

"define a larger width to ISPF"
That was my suggestion. I have been amazed to find that quite a number of people still uses 24x80.
Width is done by the WIDTH parameter on the )BODY statement. It can be a variable.
But, yes multiple lines is also a common solution.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Aug 27, 2022 3:14 pm
Reply with quote

You should check the ZSCRMAXW variable to see if the logical screen is wide enough to handle your wide screen.
Or if the RC from the TBDISPL is gt 8 then show the ZERRLM varaible, which should say something about width.
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: Sun Aug 28, 2022 6:19 pm
Reply with quote

Willy Jensen wrote:
"define a larger width to ISPF"
That was my suggestion. I have been amazed to find that quite a number of people still uses 24x80.
Width is done by the WIDTH parameter on the )BODY statement. It can be a variable.
But, yes multiple lines is also a common solution.
I don’t understand why some people insist on using 24x80.

Another sideways scrolling trick is to use a variable )MODEL line. That way the driving Rexx program controls which fields appear in the TBDISPL panel.
Back to top
View user's profile Send private message
hankoerlemans

New User


Joined: 25 Jan 2018
Posts: 57
Location: Australia

PostPosted: Mon Aug 29, 2022 4:37 am
Reply with quote

If the client only checks that row*columns is less than 16384 than you have some amusing screen sizes. I think I knew someone that had a screen set at 100 rows or some such.
(Dont quote me on the 16384. Long time since I had to work out the max buffer size).
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: Wed Aug 31, 2022 7:24 am
Reply with quote

Willy Jensen wrote:
"define a larger width to ISPF"
That was my suggestion. I have been amazed to find that quite a number of people still uses 24x80.
Width is done by the WIDTH parameter on the )BODY statement. It can be a variable.
But, yes multiple lines is also a common solution.
I don’t understand why some people insist on using 24x80.

Another sideways scrolling trick is to use a variable )MODEL line. That way the driving Rexx program controls which fields appear in the TBDISPL panel.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Sat Sep 03, 2022 9:06 am
Reply with quote

I get an error when I try to do any width greater than 80. and I checked my ispf settings - have it at max and 3278.

so.. I think I will have to stick to the multiple lines / row solution. It looks fine, just limits how many rows of info I can display per screen. but.. that is livable for the information it provides.

so, I'm fine with that.

Thanks for the help.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sat Sep 03, 2022 10:05 am
Reply with quote

Quote:
I get an error when I try to do any width greater than 80. and I checked my ispf settings - have it at max and 3278.


You have to define the terminal dimensions in the emulator. Then use the ISPF max and 3278 settings.

Before trying to make your own panel work, verify that the larger screen works by using the editor on a file with larger LRECL. You should be able to see more data. It should also give you more data in browse, SDSF, and maybe others.

But for other panels that do not support wide screens, you will get the 80 character panel centered and black space on either side.

In the definition of your own panel, instead of setting a number, specify &ZSCREENW.

|updated with the name I meant to use.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Sep 03, 2022 2:07 pm
Reply with quote

I think you mean ZSCRMAXW, which contains the physical (or emulated) terminal screen width.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sun Sep 04, 2022 5:37 am
Reply with quote

Quote:
I think you mean ZSCRMAXW

Yeah, I do not know how I came up with that other name. Yikes!
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Wed Sep 07, 2022 3:21 am
Reply with quote

It worked! (with ZSCRMAXW icon_biggrin.gif )

but I can't figure out how to make the model line more than 80 chars because the panels are defined in pds with recfm = 80.

I looked up continuation of a model line (couldn't find anything)

tried define a variable like this:
&part1 = '50 chars of whatever"
&part2 = '50 more chars of whatever'
&part3 = 'last 20 chars'
Line = '&part1&part2&part3' as the model line.

it did not like that.

so how do you describe a 120 char line in a panel in a pds with lrecl=80?
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Sep 07, 2022 1:30 pm
Reply with quote

use the EXPAND parameter in the )BODY statement, i.e.

Code:
)BODY expand(\\) width(&athwidth)                                 
"&athhdr                                                           
+Cmd =>_zcmd \ \+Scrl#scrl+                                       
+                                                                 
"Line cmds:    Delete, Edit, Insert, Repeat                       
+                                                                 
%   Data                                                           
)MODEL ROWS(SCAN)                                                 
#z ]data \ \+    +                                                 
)INIT


Also I think that you can mix 80 byte datasets with wider ones in the ISPPPLIB concatenation.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Sep 07, 2022 3:59 pm
Reply with quote

or perhaps better in your case, use a variable, i.e:
Code:
)Model clear(zsel) 
&$scr1mdl           
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Thu Sep 08, 2022 6:37 am
Reply with quote

I checked into making a wider Panel PDS record length - the problem is that to make it accessible to the different groups, and keep it around after I leave/retire - I need to promote it to a "prod" set of panel/msg/rexx/skel libraries. These are all rec length 80.

so, I tried different variations of defining a variable that I could put at the end of the model line that would have all the variables I would be able to define separately in a 132 width record.

but, it doesn't work. this combination gives me ISPFV021 - invalid rex var:

)model
_z# %field1 # %field 2 #&bigline
)init
&bigline = '%field3 #%field4 #%field 5 '



Then I tried varying where I used the & in front of the variables

This gives me the field names instead of the data for every row

)model
_z#%field1 #%field 2 #bigline
)init
&bigline = '%field3 #%field4 #%field 5 '

and this gives me the data for the first table row over and over for every row

)model
_z+ %field1 + %field 2 + restofline
)init
&bigline = '%&field3 #%&field4 #%&field5 '

I can't get the variable to work as part of the model line.

what I need is a way to indicate to ISPF that I want to continue the display line on the next 80 char record. like the continuation char that about every other language has. but I can't find anything in the documentation for that - which I find hard to believe that I'm the first person that has come across this. I just must not be searching for the right "phrase".
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Sep 08, 2022 9:43 am
Reply with quote

From Dialog Developer's Guide
Quote:
Variable model lines can be specified in the panel definition. If a variable, a name preceded by an ampersand, begins in column 1 of any model line, the value of that variable defines the model line.

These rules apply to variable model lines:
1. The variable must be the only information on the model line. If any other data is present, an error results.

2. If the value of the variable is greater than the screen width, an error results.

3. The variable can contain any character string that is a valid panel definition model line, except that the variable cannot define a variable model line. A variable whose value is all blanks is acceptable.

4. If the variable contains the character string OMIT starting in column 1, that variable model line will not be used in the model definition.

5. All model line variables must be initialized before the table display service is called with a nonblank panel name. Changes to the variables that occur within the panel or the dialog function are not honored until table display is called again with a nonblank panel name.

6. If variable model lines are being used, the panel is retrieved from disk every time that table display is called with a nonblank panel name and the value of the variable model line has changed.

7. If the SFIHDR keyword is specified on the )MODEL header statement, the first variable model line is assumed to define scroll indicator fields for scrollable fields that are defined on subsequent variable model lines.


You broke rule #1.

Also, heed Willy's recommendation about the EXPAND keyword.

So, I think you need to do something like this:

Code:
/*rexx*/
bigline2 = 'OMIT'
...


Code:

)ATTR
 | TYPE(OUTPUT) CAPS(OFF) JUST(ASIS )
)BODY expand(\\) width(&ZSCRMAXW)
...
+    Field1    Field2    Field3   Field4  |z +  Field5
)model
_z# %field1 # %field 2 #%field3 #%field4      #%field5 \ \#
&bigline2
)init
&zvars = 'F4SCRL'
if &myview = &z
   &myview = 1
if &myview = 1
   &bigline2 = 'OMIT'
Else
   &bigline2 = '        #%field6 #%field7      #%field8 \ \#'

)PROC
If &zcmd = 'RIGHT'
   &myview = 2
If &zcmd = 'LEFT'
   &myview = 1
...
)FIELD
 FIELD(field4) LEN(32) IND(F4SCRL,'<>')


Where field5 and field8 have the long data. You can use the expand characters (\\) in multiple fields... it splits the expansion among each of those fields.

Notice the use of the OMIT keyword to not display the second line.

You should also consider use of the )FIELD section to make a field scrollable. Your )MODEL lines specify the display length based on the placement of the attribute characters. But you can use a )FIELD definition to define a longer length.

For example, the model lines in the example above specify that FIELD4 is 12 characters long. The panel will show the first 12 characters. But because of the )FIELD definition, you can put the cursor in the FIELD4 column and press the RIGHT key to see the next 12 characters and so on, up to 32 characters.


If I recall correctly, the behavior of the RIGHT and LEFT keys are different depending on where the cursor is. If the cursor is in FIELD4, ISPF will scroll the column without your dialog knowing about it. If the cursor is somewhere else, your dialog will see &zcmd as RIGHT.

The sample code is untested, as I have retired. If you tweak this to make it work, please provide a working example. Thanks.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Sep 08, 2022 2:51 pm
Reply with quote

Here is a sample using 2 variable model lines.
1. Panel
Code:
)ATTR                                                         
 _ type(input)  caps(on) just(left) color(turq) hilite(uscore)
 # TYPE(output) COLOR(turq ) caps(off)                       
 @ type(output) color(green) caps(off)                       
 + type(text)   color(green) skip(on)                         
 " type(text)   color(blue ) skip(on)                         
)BODY expand(\\) width(&scrwdth)                             
"\ \Backups\ \+                                               
+Cmd =>_zcmd \ \+Scrl@scrl+                                   
+                                                             
)MODEL clear(zsel)                                           
&model1                                                       
&model2                                                       
)INIT                                                         
 .zvars = '(zsel)'                                           
)PROC                                                         
)END

2. REXX pgm, note the test for and seting of screen width, and the use of the text 'OMIT' in the 2nd vaiable for wide screens.
Code:
 Address ispexec                                                               
 "control errors return"                                                       
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 2 Line(s) not Displayed
 zerrlm  = ''                                                                 
 "tbcreate" @table "names(seq name type vol cat) nowrite"                     
 if rc<>0 then call close 'Tbcreate rc' rc zerrlm                             
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -   12 Line(s) not Displayed
 do qn                                                                         
   pull seq =6 name =51 type =60 vol =67 cat                                   
   "tbadd" @table                                                             
 end                                                                           
 "vget zscrmaxw"                                                               
 if zscrmaxw>=120 then do                                                     
   model1=left('_Z  ' left('#seq',5) left('#name',45) left('@type',15),         
          left('@vol',7) left('@cat',45),120)                                 
   model2='OMIT'                                                               
   scrwdth=120                                                                 
 end                                                                           
 else do                                                                       
   model1=left('_Z  ' left('#seq',5) left('#name',45) left('@type',9),80)     
   model2=left('    '  left('@vol',7) left('@cat',45),80)                     
   scrwdth=80                                                                 
 end                                                                           
 "tbtop"   @table                                                             
 "tbdispl" @table "panel(zzp)"                                                 
 say 'rc='rc 'lm='zerrlm 
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: Thu Sep 08, 2022 6:57 pm
Reply with quote

A little OT, but still on the subject of screen geometry, I grew tired of trying to design my panels to fit on a 24 line screen so I always code them as a (vertical) scrollable area, even when not really needed. ISPF makes this trivial to do using the )AREA statement.

This has freed me to create deeper panels without losing any functionality for the stick-in-the-mud traditionalists who insist on using an obsolete screen size. Let them scroll.
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Trouble Scrolling TBDISPL in my Panel TSO/ISPF 6
No new posts Regarding SCROLLING LOGIC IN CICS CICS 3
No new posts Merge 2 files horizontally based on key DFSORT/ICETOOL 3
No new posts Scrolling logic in CICS CICS 8
No new posts Sort required to format file Horizont... DFSORT/ICETOOL 9
Search our Forums:

Back to Top